diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 8e159f1d5..1fdac69e5 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -26,6 +26,6 @@ on: jobs: coding-standards: name: "Coding Standards" - uses: "doctrine/.github/.github/workflows/coding-standards.yml@v12.2.0" + uses: "doctrine/.github/.github/workflows/coding-standards.yml@13.1.0" with: composer-options: "--prefer-dist --prefer-stable" diff --git a/.github/workflows/composer-lint.yml b/.github/workflows/composer-lint.yml index a9876185a..4fc0e0848 100644 --- a/.github/workflows/composer-lint.yml +++ b/.github/workflows/composer-lint.yml @@ -17,4 +17,4 @@ on: jobs: composer-lint: name: "Composer Lint" - uses: "doctrine/.github/.github/workflows/composer-lint.yml@v12.2.0" + uses: "doctrine/.github/.github/workflows/composer-lint.yml@13.1.0" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6254c7602..b3bd59704 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -1,5 +1,4 @@ - -name: "Continuous Integration" +name: "CI: PHPUnit" on: pull_request: @@ -27,7 +26,15 @@ on: jobs: phpunit: - name: "PHPUnit" + name: > + ${{ format('PHP {0} - Sf {1} - deps {2} - stab. {3}', + matrix.php-version || 'Ø', + matrix.symfony-require || 'Ø', + matrix.dependencies || 'Ø', + matrix.stability || 'Ø' + ) }} + ${{ matrix.remove-orm && ' - remove ORM' }} + ${{ matrix.remove-doctrine-messenger && ' - remove Messenger' }} runs-on: "ubuntu-latest" env: SYMFONY_REQUIRE: ${{matrix.symfony-require}} @@ -88,7 +95,7 @@ jobs: steps: - name: "Checkout" - uses: "actions/checkout@v5" + uses: "actions/checkout@v6" with: fetch-depth: 2 @@ -123,7 +130,7 @@ jobs: run: "vendor/bin/phpunit --coverage-clover=coverage.xml" - name: "Upload coverage file" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v6" with: name: "phpunit-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}.coverage" path: "coverage.xml" @@ -138,12 +145,12 @@ jobs: steps: - name: "Checkout" - uses: "actions/checkout@v5" + uses: "actions/checkout@v6" with: fetch-depth: 2 - name: "Download coverage files" - uses: "actions/download-artifact@v6" + uses: "actions/download-artifact@v7" with: path: "reports" diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 7722f764f..defe5c5b6 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -17,4 +17,4 @@ on: jobs: documentation: name: "Documentation" - uses: "doctrine/.github/.github/workflows/documentation.yml@v12.2.0" \ No newline at end of file + uses: "doctrine/.github/.github/workflows/documentation.yml@13.1.0" \ No newline at end of file diff --git a/.github/workflows/release-on-milestone-closed.yml b/.github/workflows/release-on-milestone-closed.yml index 634210120..b82f876ec 100644 --- a/.github/workflows/release-on-milestone-closed.yml +++ b/.github/workflows/release-on-milestone-closed.yml @@ -8,7 +8,7 @@ on: jobs: release: name: "Git tag, release & create merge-up PR" - uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@v12.2.0" + uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@13.1.0" secrets: GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 19cd93448..c45d0a6ac 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -26,4 +26,4 @@ on: jobs: static-analysis: name: "Static Analysis" - uses: "doctrine/.github/.github/workflows/phpstan.yml@v12.2.0" + uses: "doctrine/.github/.github/workflows/phpstan.yml@13.1.0" diff --git a/.github/workflows/test-dev-stability.yml b/.github/workflows/test-dev-stability.yml index 82b919db6..b96c7dddd 100644 --- a/.github/workflows/test-dev-stability.yml +++ b/.github/workflows/test-dev-stability.yml @@ -27,7 +27,7 @@ jobs: steps: - name: "Checkout" - uses: "actions/checkout@v5" + uses: "actions/checkout@v6" with: fetch-depth: 2 diff --git a/.github/workflows/website-schema.yml b/.github/workflows/website-schema.yml index 80312010a..7746acb4c 100644 --- a/.github/workflows/website-schema.yml +++ b/.github/workflows/website-schema.yml @@ -18,4 +18,4 @@ on: jobs: json-validate: name: "Validate JSON schema" - uses: "doctrine/.github/.github/workflows/website-schema.yml@v12.2.0" + uses: "doctrine/.github/.github/workflows/website-schema.yml@13.1.0" diff --git a/docs/en/doctrine-console.rst b/docs/en/doctrine-console.rst new file mode 100644 index 000000000..97dbe3f1b --- /dev/null +++ b/docs/en/doctrine-console.rst @@ -0,0 +1,78 @@ +Doctrine Console +================ + +Some Doctrine packages such as ``doctrine/dbal`` and ``doctrine/orm`` +provide useful console commands to interact with your database and your +entities: + +- `Doctrine DBAL Commands + `_ +- `Doctrine ORM Commands + `_ + +This bundle automatically registers those commands, but it renames them +in the process so as to group them under the ``doctrine:`` namespace. + +Note that the bundle also provide some additional commands that are not +part of the aforementioned packages. + +Command Name Mapping +-------------------- + +The following table shows the mapping between the original Doctrine command +names and the names used by this bundle: + ++--------------------------------------------+---------------------------------------+ +| Bundle Command Name | Original Doctrine Command Name | ++============================================+=======================================+ +| ``doctrine:query:sql`` | ``dbal:run-sql`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:cache:clear-metadata`` | ``orm:clear-cache:metadata`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:cache:clear-query`` | ``orm:clear-cache:query`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:cache:clear-result`` | ``orm:clear-cache:result`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:cache:clear-collection-region`` | ``orm:clear-cache:region:collection`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:cache:clear-entity-region`` | ``orm:clear-cache:region:entity`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:cache:clear-query-region`` | ``orm:clear-cache:region:query`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:mapping:convert`` | ``orm:convert-mapping`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:schema:create`` | ``orm:schema-tool:create`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:schema:drop`` | ``orm:schema-tool:drop`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:schema:update`` | ``orm:schema-tool:update`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:ensure-production-settings`` | ``orm:ensure-production-settings`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:mapping:info`` | ``orm:info`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:mapping:describe`` | ``orm:mapping:describe`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:query:dql`` | ``orm:run-dql`` | ++--------------------------------------------+---------------------------------------+ +| ``doctrine:schema:validate`` | ``orm:validate-schema`` | ++--------------------------------------------+---------------------------------------+ + +Additionally, the bundle provides the following commands: + +- ``doctrine:database:create`` +- ``doctrine:database:drop`` +- ``doctrine:mapping:import`` + +To get a list of all available Doctrine commands, run: + +.. code-block:: console + + php bin/console list doctrine + +It is possible to get help on any specific command. For example, +to get help on the ``doctrine:schema:update`` command, run: + +.. code-block:: console + + php bin/console doctrine:schema:update --help diff --git a/docs/en/index.rst b/docs/en/index.rst index a96897086..6e535144f 100644 --- a/docs/en/index.rst +++ b/docs/en/index.rst @@ -7,6 +7,7 @@ configuration options, console commands and even a web debug toolbar collector. .. toctree:: installation + doctrine-console entity-listeners event-listeners custom-id-generators diff --git a/tests/DependencyInjection/Fixtures/Bundles/MappedSuperclassBundle/Entity/TestAnnotationEntity.php b/tests/DependencyInjection/Fixtures/Bundles/MappedSuperclassBundle/Entity/TestAnnotationEntity.php new file mode 100644 index 000000000..dfb3393c8 --- /dev/null +++ b/tests/DependencyInjection/Fixtures/Bundles/MappedSuperclassBundle/Entity/TestAnnotationEntity.php @@ -0,0 +1,16 @@ +