-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from MacPaw/feat/orc-154-upgrade-doctrine-orm-…
…3-version feat(o10r-symfony-template-154): Upgrade doctrine/orm to 3.* version
- Loading branch information
Showing
14 changed files
with
93 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,16 +22,22 @@ jobs: | |
- '6.1.*' | ||
- '6.2.*' | ||
- '7.0.*' | ||
doctrine-orm-versions: | ||
- '^2.17' | ||
- '^3.0' | ||
exclude: | ||
- php: '8.1' | ||
symfony-versions: '7.0.*' | ||
- doctrine-orm-versions: '^3.0' | ||
symfony-versions: '4.4.*' | ||
include: | ||
- description: 'Log Code Coverage' | ||
php: '8.2' | ||
coverage: 'xdebug' | ||
doctrine-orm-versions: '^3.0' | ||
symfony-versions: '^7.0' | ||
|
||
name: PHP ${{ matrix.php }} ${{ matrix.description }} | ||
name: PHP ${{ matrix.php }} Symfony ${{ matrix.symfony-versions }} Doctrine ${{ matrix.doctrine-orm-versions }} ${{ matrix.description }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
@@ -66,6 +72,7 @@ jobs: | |
run: | | ||
composer require symfony/dependency-injection:${{ matrix.symfony-versions }} --no-update --no-scripts | ||
composer require symfony/http-kernel:${{ matrix.symfony-versions }} --no-update --no-scripts | ||
composer require doctrine/orm:${{ matrix.doctrine-orm-versions }} --no-update --no-scripts | ||
composer require --dev symfony/console:${{ matrix.symfony-versions }} --no-update --no-scripts | ||
composer require --dev symfony/property-access:${{ matrix.symfony-versions }} --no-update --no-scripts | ||
|
@@ -80,9 +87,8 @@ jobs: | |
run: vendor/bin/phpunit --coverage-clover=coverage.xml | ||
if: matrix.coverage == 'xdebug' | ||
|
||
- name: Run codecov | ||
uses: codecov/codecov-action@v1 | ||
- name: Upload coverage reports to Codecov | ||
if: matrix.coverage == 'xdebug' | ||
uses: codecov/[email protected] | ||
with: | ||
file: './coverage.xml' | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
/package-lock.json | ||
/node_modules/ | ||
/.idea/ | ||
/coverage | ||
/clover.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,5 @@ includes: | |
|
||
parameters: | ||
level: max | ||
checkMissingIterableValueType: false | ||
paths: | ||
- src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
$containerConfigurator->extension('doctrine', [ | ||
'dbal' => [ | ||
'url' => 'sqlite:///%kernel.cache_dir%/data.db', | ||
'options' => [ | ||
'collation' => 'utf8mb4_unicode_ci', | ||
], | ||
], | ||
'orm' => [ | ||
'auto_generate_proxy_classes' => true, | ||
'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware', | ||
'auto_mapping' => true, | ||
'mappings' => [ | ||
'App' => [ | ||
'is_bundle' => false, | ||
'type' => 'xml', | ||
'dir' => '%kernel.project_dir%/config/doctrine_entity', | ||
'prefix' => 'BehatDoctrineFixtures\Tests\Functional\App\Entity', | ||
'alias' => 'App', | ||
], | ||
], | ||
], | ||
]); | ||
}; |
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
tests/Functional/App/config/doctrine_entity/BaseEntity.orm.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
<entity name="BehatDoctrineFixtures\Tests\Functional\App\Entity\BaseEntity" table="base_entity"> | ||
<id name="id" type="integer"> | ||
<generator strategy="AUTO"/> | ||
<options> | ||
<option name="collation">utf8_unicode_ci</option> | ||
</options> | ||
</id> | ||
</entity> | ||
</doctrine-mapping> |
6 changes: 0 additions & 6 deletions
6
tests/Functional/App/config/doctrine_entity/BaseEntity.orm.yml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
$containerConfigurator->extension('doctrine_migrations', [ | ||
'storage' => [ | ||
'table_storage' => [ | ||
'table_name' => 'migration_versions', | ||
], | ||
], | ||
'migrations_paths' => [ | ||
'BehatDoctrineFixtures\Tests\Functional\App\Migrations' => '%kernel.project_dir%/Migrations', | ||
], | ||
'organize_migrations' => 'BY_YEAR', | ||
'custom_template' => '%kernel.project_dir%/config/doctrine_migrations.template', | ||
]); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters