File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 3434 - name : Constrain Symfony version
3535 run : |
3636 sed -ri 's/"symfony\/([^"]+)": "[^"]+"/"symfony\/\1": "${{ matrix.symfony-version }}"/g' composer.json
37+ # symfony/clock does not exist for 5.4 (added in 6.2); keep it installable on 5.4 jobs
38+ if [ "${{ matrix.symfony-version }}" = "5.4.*" ]; then
39+ sed -ri 's/"symfony\/clock": "[^"]+"/"symfony\/clock": "^6.2 | ^7.0"/' composer.json
40+ fi
3741
3842 - name : Constrain Doctrine ORM version
3943 run : |
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5+ use Composer \InstalledVersions ;
56use Symfony \Component \DependencyInjection \Loader \Configurator \ContainerConfigurator ;
6- use Symfony \Component \HttpKernel \Kernel ;
77
88return static function (ContainerConfigurator $ containerConfigurator ): void {
99 $ containerConfigurator ->parameters ()
1010 ->set ('kernel.secret ' , 'test_secret ' )
1111 ->set ('locale ' , 'en ' );
1212
13+ $ frameworkBundleVersion = InstalledVersions::getVersion ('symfony/framework-bundle ' );
1314 $ frameworkConfig = [
1415 'secret ' => '%kernel.secret% ' ,
1516 'test ' => true ,
1617 ];
17- if (Kernel:: VERSION_ID >= 60100 ) {
18+ if (null !== $ frameworkBundleVersion && \version_compare ( $ frameworkBundleVersion , ' 6.1.0 ' , ' >= ' ) ) {
1819 $ frameworkConfig ['http_method_override ' ] = false ;
1920 }
20- if (Kernel:: VERSION_ID >= 60400 ) {
21+ if (null !== $ frameworkBundleVersion && \version_compare ( $ frameworkBundleVersion , ' 6.4.0 ' , ' >= ' ) ) {
2122 $ frameworkConfig ['handle_all_throwables ' ] = true ;
2223 $ frameworkConfig ['php_errors ' ] = ['log ' => true ];
2324 }
4142 ],
4243 ],
4344 ];
44- if (Kernel:: VERSION_ID >= 60400 ) {
45+ if (null !== $ frameworkBundleVersion && \version_compare ( $ frameworkBundleVersion , ' 6.4.0 ' , ' >= ' ) ) {
4546 $ doctrineOrm ['mappings ' ]['Fixtures ' ]['type ' ] = 'attribute ' ;
4647 }
4748
You can’t perform that action at this time.
0 commit comments