diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml new file mode 100644 index 000000000..8aeaf0741 --- /dev/null +++ b/.github/workflows/test-pull-request.yml @@ -0,0 +1,135 @@ +name: Test Pull Request + +on: + pull_request: + branches: + - develop + +jobs: + unit: + name: Unit Tests + runs-on: ubuntu-latest + steps: + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: stable + + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'true' + fetch-depth: 0 + + - name: Run Unit Tests + run: ./scripts/unit.sh + + integration-matrix: + name: Integration Matrix + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + needs: unit + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'true' + + - name: Set Matrix + id: set-matrix + run: | + matrix="$(jq -r -c '.integration.matrix' ./config.json)" + printf "Output: matrix=%s\n" "${matrix}" + printf "matrix=%s\n" "${matrix}" >> "$GITHUB_OUTPUT" + + integration: + name: Integration Test + runs-on: ubuntu-latest + needs: integration-matrix + strategy: + matrix: + include: ${{ fromJSON(needs.integration-matrix.outputs.matrix) }} + steps: + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: stable + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: 'true' + + - name: Run Integration Tests + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + ./scripts/integration.sh \ + --platform docker \ + --github-token "${GITHUB_TOKEN}" \ + --cached ${{ matrix.cached }} \ + --parallel ${{ matrix.parallel }} + + roundup: + name: Integration Tests + if: ${{ always() }} + runs-on: ubuntu-latest + needs: integration + steps: + - run: | + result="${{ needs.integration.result }}" + if [[ "${result}" == "success" ]]; then + echo "All integration tests passed" + exit 0 + else + echo "One or more integration tests failed" + exit 1 + fi + + approve: + name: Approve Bot PRs + if: ${{ github.event.pull_request.user.login == 'cf-buildpacks-eng' || github.event.pull_request.user.login == 'dependabot[bot]' }} + runs-on: ubuntu-latest + needs: roundup + steps: + + - name: Check Commit Verification + id: unverified-commits + uses: paketo-buildpacks/github-config/actions/pull-request/check-unverified-commits@main + with: + token: ${{ secrets.CF_BOT_GITHUB_TOKEN }} + repo: ${{ github.repository }} + number: ${{ github.event.number }} + + - name: Check for Human Commits + id: human-commits + uses: paketo-buildpacks/github-config/actions/pull-request/check-human-commits@main + with: + token: ${{ secrets.CF_BOT_GITHUB_TOKEN }} + repo: ${{ github.repository }} + number: ${{ github.event.number }} + bots: 'dependabot[bot],web-flow,cf-buildpacks-eng' + + - name: Checkout + if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false' + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Dispatch + if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false' + uses: paketo-buildpacks/github-config/actions/dispatch@main + with: + repos: ${{ github.repository }} + token: ${{ secrets.CF_BOT_GITHUB_TOKEN }} + event: approve-bot-pr + payload: | + { + "number": "${{ github.event.pull_request.number }}", + "login": "${{ github.event.pull_request.user.login }}", + "tracker_story": "${{ steps.story-id.outputs.story_id }}" + } diff --git a/.gitignore b/.gitignore index 61035c87f..2e1a62a6b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ binaries/precise/* binaries/trusty/* !binaries/trusty/index*.json *.pyc -*.so *.swp /env *_buildpack*.zip diff --git a/config.json b/config.json index 09435b97b..f9c8767b6 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,19 @@ { - "stack": "cflinuxfs3", + "stack": "cflinuxfs4", "oses": [ "linux" - ] + ], + "integration": { + "harness": "switchblade", + "matrix": [ + { + "cached": false, + "parallel": true + }, + { + "cached": true, + "parallel": true + } + ] + } } diff --git a/fixtures/cake/.bp-config/options.json b/fixtures/cake/.bp-config/options.json new file mode 100644 index 000000000..622a8a2fc --- /dev/null +++ b/fixtures/cake/.bp-config/options.json @@ -0,0 +1,7 @@ +{ + "COMPOSER_VENDOR_DIR": "vendor", + "COMPOSER_INSTALL_OPTIONS": ["--no-interaction"], + "WEBDIR": "webroot", + "LIBDIR": "library", + "PHP_EXTENSIONS": ["pdo", "pdo_sqlite", "mcrypt", "pdo_mysql"] +} diff --git a/fixtures/cake_local_deps/.editorconfig b/fixtures/cake/.editorconfig similarity index 100% rename from fixtures/cake_local_deps/.editorconfig rename to fixtures/cake/.editorconfig diff --git a/fixtures/cake_local_deps/.gitattributes b/fixtures/cake/.gitattributes similarity index 100% rename from fixtures/cake_local_deps/.gitattributes rename to fixtures/cake/.gitattributes diff --git a/fixtures/cake_local_deps/.gitignore b/fixtures/cake/.gitignore similarity index 100% rename from fixtures/cake_local_deps/.gitignore rename to fixtures/cake/.gitignore diff --git a/fixtures/cake_local_deps/.htaccess b/fixtures/cake/.htaccess similarity index 100% rename from fixtures/cake_local_deps/.htaccess rename to fixtures/cake/.htaccess diff --git a/fixtures/cake_local_deps/README.md b/fixtures/cake/README.md similarity index 100% rename from fixtures/cake_local_deps/README.md rename to fixtures/cake/README.md diff --git a/fixtures/cake_local_deps/bin/bash_completion.sh b/fixtures/cake/bin/bash_completion.sh similarity index 100% rename from fixtures/cake_local_deps/bin/bash_completion.sh rename to fixtures/cake/bin/bash_completion.sh diff --git a/fixtures/cake_local_deps/bin/cake b/fixtures/cake/bin/cake similarity index 100% rename from fixtures/cake_local_deps/bin/cake rename to fixtures/cake/bin/cake diff --git a/fixtures/cake_local_deps/bin/cake.bat b/fixtures/cake/bin/cake.bat similarity index 100% rename from fixtures/cake_local_deps/bin/cake.bat rename to fixtures/cake/bin/cake.bat diff --git a/fixtures/cake_local_deps/bin/cake.php b/fixtures/cake/bin/cake.php similarity index 100% rename from fixtures/cake_local_deps/bin/cake.php rename to fixtures/cake/bin/cake.php diff --git a/fixtures/cake_local_deps/composer.json b/fixtures/cake/composer.json similarity index 100% rename from fixtures/cake_local_deps/composer.json rename to fixtures/cake/composer.json diff --git a/fixtures/cake_local_deps/composer.lock b/fixtures/cake/composer.lock similarity index 100% rename from fixtures/cake_local_deps/composer.lock rename to fixtures/cake/composer.lock diff --git a/fixtures/cake_local_deps/config/.env.example b/fixtures/cake/config/.env.example similarity index 100% rename from fixtures/cake_local_deps/config/.env.example rename to fixtures/cake/config/.env.example diff --git a/fixtures/cake_local_deps/config/Migrations/20221214032650_CreateUsers.php b/fixtures/cake/config/Migrations/20221214032650_CreateUsers.php similarity index 100% rename from fixtures/cake_local_deps/config/Migrations/20221214032650_CreateUsers.php rename to fixtures/cake/config/Migrations/20221214032650_CreateUsers.php diff --git a/fixtures/cake_local_deps/config/Migrations/schema-dump-default.lock b/fixtures/cake/config/Migrations/schema-dump-default.lock similarity index 100% rename from fixtures/cake_local_deps/config/Migrations/schema-dump-default.lock rename to fixtures/cake/config/Migrations/schema-dump-default.lock diff --git a/fixtures/cake_local_deps/config/app.php b/fixtures/cake/config/app.php similarity index 100% rename from fixtures/cake_local_deps/config/app.php rename to fixtures/cake/config/app.php diff --git a/fixtures/cake_local_deps/config/app_local.example.php b/fixtures/cake/config/app_local.example.php similarity index 100% rename from fixtures/cake_local_deps/config/app_local.example.php rename to fixtures/cake/config/app_local.example.php diff --git a/fixtures/cake_local_deps/config/bootstrap.php b/fixtures/cake/config/bootstrap.php similarity index 100% rename from fixtures/cake_local_deps/config/bootstrap.php rename to fixtures/cake/config/bootstrap.php diff --git a/fixtures/cake_local_deps/config/bootstrap_cli.php b/fixtures/cake/config/bootstrap_cli.php similarity index 100% rename from fixtures/cake_local_deps/config/bootstrap_cli.php rename to fixtures/cake/config/bootstrap_cli.php diff --git a/fixtures/cake_local_deps/config/paths.php b/fixtures/cake/config/paths.php similarity index 100% rename from fixtures/cake_local_deps/config/paths.php rename to fixtures/cake/config/paths.php diff --git a/fixtures/cake_local_deps/config/requirements.php b/fixtures/cake/config/requirements.php similarity index 100% rename from fixtures/cake_local_deps/config/requirements.php rename to fixtures/cake/config/requirements.php diff --git a/fixtures/cake_local_deps/config/routes.php b/fixtures/cake/config/routes.php similarity index 100% rename from fixtures/cake_local_deps/config/routes.php rename to fixtures/cake/config/routes.php diff --git a/fixtures/cake_local_deps/config/schema/i18n.sql b/fixtures/cake/config/schema/i18n.sql similarity index 100% rename from fixtures/cake_local_deps/config/schema/i18n.sql rename to fixtures/cake/config/schema/i18n.sql diff --git a/fixtures/cake_local_deps/config/schema/sessions.sql b/fixtures/cake/config/schema/sessions.sql similarity index 100% rename from fixtures/cake_local_deps/config/schema/sessions.sql rename to fixtures/cake/config/schema/sessions.sql diff --git a/fixtures/cake_local_deps/config/schema/users.sql b/fixtures/cake/config/schema/users.sql similarity index 100% rename from fixtures/cake_local_deps/config/schema/users.sql rename to fixtures/cake/config/schema/users.sql diff --git a/fixtures/cake_local_deps/index.php b/fixtures/cake/index.php similarity index 100% rename from fixtures/cake_local_deps/index.php rename to fixtures/cake/index.php diff --git a/fixtures/cake_local_deps/phpcs.xml b/fixtures/cake/phpcs.xml similarity index 100% rename from fixtures/cake_local_deps/phpcs.xml rename to fixtures/cake/phpcs.xml diff --git a/fixtures/cake_local_deps/phpstan.neon b/fixtures/cake/phpstan.neon similarity index 100% rename from fixtures/cake_local_deps/phpstan.neon rename to fixtures/cake/phpstan.neon diff --git a/fixtures/cake_local_deps/phpunit.xml.dist b/fixtures/cake/phpunit.xml.dist similarity index 100% rename from fixtures/cake_local_deps/phpunit.xml.dist rename to fixtures/cake/phpunit.xml.dist diff --git a/fixtures/cake_local_deps/plugins/.gitkeep b/fixtures/cake/plugins/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/plugins/.gitkeep rename to fixtures/cake/plugins/.gitkeep diff --git a/fixtures/cake_local_deps/resources/.gitkeep b/fixtures/cake/resources/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/resources/.gitkeep rename to fixtures/cake/resources/.gitkeep diff --git a/fixtures/cake_local_deps/src/Application.php b/fixtures/cake/src/Application.php similarity index 100% rename from fixtures/cake_local_deps/src/Application.php rename to fixtures/cake/src/Application.php diff --git a/fixtures/cake_local_deps/src/Console/Installer.php b/fixtures/cake/src/Console/Installer.php similarity index 100% rename from fixtures/cake_local_deps/src/Console/Installer.php rename to fixtures/cake/src/Console/Installer.php diff --git a/fixtures/cake_local_deps/src/Controller/AppController.php b/fixtures/cake/src/Controller/AppController.php similarity index 100% rename from fixtures/cake_local_deps/src/Controller/AppController.php rename to fixtures/cake/src/Controller/AppController.php diff --git a/fixtures/cake_local_deps/src/Controller/Component/.gitkeep b/fixtures/cake/src/Controller/Component/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/src/Controller/Component/.gitkeep rename to fixtures/cake/src/Controller/Component/.gitkeep diff --git a/fixtures/cake_local_deps/src/Controller/ErrorController.php b/fixtures/cake/src/Controller/ErrorController.php similarity index 100% rename from fixtures/cake_local_deps/src/Controller/ErrorController.php rename to fixtures/cake/src/Controller/ErrorController.php diff --git a/fixtures/cake_local_deps/src/Controller/PagesController.php b/fixtures/cake/src/Controller/PagesController.php similarity index 100% rename from fixtures/cake_local_deps/src/Controller/PagesController.php rename to fixtures/cake/src/Controller/PagesController.php diff --git a/fixtures/cake_local_deps/src/Controller/UsersController.php b/fixtures/cake/src/Controller/UsersController.php similarity index 100% rename from fixtures/cake_local_deps/src/Controller/UsersController.php rename to fixtures/cake/src/Controller/UsersController.php diff --git a/fixtures/cake_local_deps/src/Model/Behavior/.gitkeep b/fixtures/cake/src/Model/Behavior/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/src/Model/Behavior/.gitkeep rename to fixtures/cake/src/Model/Behavior/.gitkeep diff --git a/fixtures/cake_local_deps/src/Model/Entity/User.php b/fixtures/cake/src/Model/Entity/User.php similarity index 100% rename from fixtures/cake_local_deps/src/Model/Entity/User.php rename to fixtures/cake/src/Model/Entity/User.php diff --git a/fixtures/cake_local_deps/src/Model/Table/UsersTable.php b/fixtures/cake/src/Model/Table/UsersTable.php similarity index 100% rename from fixtures/cake_local_deps/src/Model/Table/UsersTable.php rename to fixtures/cake/src/Model/Table/UsersTable.php diff --git a/fixtures/cake_local_deps/src/View/AjaxView.php b/fixtures/cake/src/View/AjaxView.php similarity index 100% rename from fixtures/cake_local_deps/src/View/AjaxView.php rename to fixtures/cake/src/View/AjaxView.php diff --git a/fixtures/cake_local_deps/src/View/AppView.php b/fixtures/cake/src/View/AppView.php similarity index 100% rename from fixtures/cake_local_deps/src/View/AppView.php rename to fixtures/cake/src/View/AppView.php diff --git a/fixtures/cake_local_deps/src/View/Cell/.gitkeep b/fixtures/cake/src/View/Cell/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/src/View/Cell/.gitkeep rename to fixtures/cake/src/View/Cell/.gitkeep diff --git a/fixtures/cake_local_deps/src/View/Helper/.gitkeep b/fixtures/cake/src/View/Helper/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/src/View/Helper/.gitkeep rename to fixtures/cake/src/View/Helper/.gitkeep diff --git a/fixtures/cake_local_deps/templates/Error/error400.php b/fixtures/cake/templates/Error/error400.php similarity index 100% rename from fixtures/cake_local_deps/templates/Error/error400.php rename to fixtures/cake/templates/Error/error400.php diff --git a/fixtures/cake_local_deps/templates/Error/error500.php b/fixtures/cake/templates/Error/error500.php similarity index 100% rename from fixtures/cake_local_deps/templates/Error/error500.php rename to fixtures/cake/templates/Error/error500.php diff --git a/fixtures/cake_local_deps/templates/Pages/home.php b/fixtures/cake/templates/Pages/home.php similarity index 100% rename from fixtures/cake_local_deps/templates/Pages/home.php rename to fixtures/cake/templates/Pages/home.php diff --git a/fixtures/cake_local_deps/templates/Users/add_user.php b/fixtures/cake/templates/Users/add_user.php similarity index 100% rename from fixtures/cake_local_deps/templates/Users/add_user.php rename to fixtures/cake/templates/Users/add_user.php diff --git a/fixtures/cake_local_deps/templates/Users/list_users.php b/fixtures/cake/templates/Users/list_users.php similarity index 100% rename from fixtures/cake_local_deps/templates/Users/list_users.php rename to fixtures/cake/templates/Users/list_users.php diff --git a/fixtures/cake_local_deps/templates/cell/.gitkeep b/fixtures/cake/templates/cell/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/templates/cell/.gitkeep rename to fixtures/cake/templates/cell/.gitkeep diff --git a/fixtures/cake_local_deps/templates/element/flash/default.php b/fixtures/cake/templates/element/flash/default.php similarity index 100% rename from fixtures/cake_local_deps/templates/element/flash/default.php rename to fixtures/cake/templates/element/flash/default.php diff --git a/fixtures/cake_local_deps/templates/element/flash/error.php b/fixtures/cake/templates/element/flash/error.php similarity index 100% rename from fixtures/cake_local_deps/templates/element/flash/error.php rename to fixtures/cake/templates/element/flash/error.php diff --git a/fixtures/cake_local_deps/templates/element/flash/info.php b/fixtures/cake/templates/element/flash/info.php similarity index 100% rename from fixtures/cake_local_deps/templates/element/flash/info.php rename to fixtures/cake/templates/element/flash/info.php diff --git a/fixtures/cake_local_deps/templates/element/flash/success.php b/fixtures/cake/templates/element/flash/success.php similarity index 100% rename from fixtures/cake_local_deps/templates/element/flash/success.php rename to fixtures/cake/templates/element/flash/success.php diff --git a/fixtures/cake_local_deps/templates/element/flash/warning.php b/fixtures/cake/templates/element/flash/warning.php similarity index 100% rename from fixtures/cake_local_deps/templates/element/flash/warning.php rename to fixtures/cake/templates/element/flash/warning.php diff --git a/fixtures/cake_local_deps/templates/email/html/default.php b/fixtures/cake/templates/email/html/default.php similarity index 100% rename from fixtures/cake_local_deps/templates/email/html/default.php rename to fixtures/cake/templates/email/html/default.php diff --git a/fixtures/cake_local_deps/templates/email/text/default.php b/fixtures/cake/templates/email/text/default.php similarity index 100% rename from fixtures/cake_local_deps/templates/email/text/default.php rename to fixtures/cake/templates/email/text/default.php diff --git a/fixtures/cake_local_deps/templates/layout/ajax.php b/fixtures/cake/templates/layout/ajax.php similarity index 100% rename from fixtures/cake_local_deps/templates/layout/ajax.php rename to fixtures/cake/templates/layout/ajax.php diff --git a/fixtures/cake_local_deps/templates/layout/default.php b/fixtures/cake/templates/layout/default.php similarity index 100% rename from fixtures/cake_local_deps/templates/layout/default.php rename to fixtures/cake/templates/layout/default.php diff --git a/fixtures/cake_local_deps/templates/layout/email/html/default.php b/fixtures/cake/templates/layout/email/html/default.php similarity index 100% rename from fixtures/cake_local_deps/templates/layout/email/html/default.php rename to fixtures/cake/templates/layout/email/html/default.php diff --git a/fixtures/cake_local_deps/templates/layout/email/text/default.php b/fixtures/cake/templates/layout/email/text/default.php similarity index 100% rename from fixtures/cake_local_deps/templates/layout/email/text/default.php rename to fixtures/cake/templates/layout/email/text/default.php diff --git a/fixtures/cake_local_deps/templates/layout/error.php b/fixtures/cake/templates/layout/error.php similarity index 100% rename from fixtures/cake_local_deps/templates/layout/error.php rename to fixtures/cake/templates/layout/error.php diff --git a/fixtures/cake_local_deps/tests/Fixture/.gitkeep b/fixtures/cake/tests/Fixture/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/tests/Fixture/.gitkeep rename to fixtures/cake/tests/Fixture/.gitkeep diff --git a/fixtures/cake_local_deps/tests/TestCase/ApplicationTest.php b/fixtures/cake/tests/TestCase/ApplicationTest.php similarity index 100% rename from fixtures/cake_local_deps/tests/TestCase/ApplicationTest.php rename to fixtures/cake/tests/TestCase/ApplicationTest.php diff --git a/fixtures/cake_local_deps/tests/TestCase/Controller/Component/.gitkeep b/fixtures/cake/tests/TestCase/Controller/Component/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/tests/TestCase/Controller/Component/.gitkeep rename to fixtures/cake/tests/TestCase/Controller/Component/.gitkeep diff --git a/fixtures/cake_local_deps/tests/TestCase/Controller/PagesControllerTest.php b/fixtures/cake/tests/TestCase/Controller/PagesControllerTest.php similarity index 100% rename from fixtures/cake_local_deps/tests/TestCase/Controller/PagesControllerTest.php rename to fixtures/cake/tests/TestCase/Controller/PagesControllerTest.php diff --git a/fixtures/cake_local_deps/tests/TestCase/Model/Behavior/.gitkeep b/fixtures/cake/tests/TestCase/Model/Behavior/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/tests/TestCase/Model/Behavior/.gitkeep rename to fixtures/cake/tests/TestCase/Model/Behavior/.gitkeep diff --git a/fixtures/cake_local_deps/tests/TestCase/View/Helper/.gitkeep b/fixtures/cake/tests/TestCase/View/Helper/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/tests/TestCase/View/Helper/.gitkeep rename to fixtures/cake/tests/TestCase/View/Helper/.gitkeep diff --git a/fixtures/cake_local_deps/tests/bootstrap.php b/fixtures/cake/tests/bootstrap.php similarity index 100% rename from fixtures/cake_local_deps/tests/bootstrap.php rename to fixtures/cake/tests/bootstrap.php diff --git a/fixtures/cake_local_deps/tests/schema.sql b/fixtures/cake/tests/schema.sql similarity index 100% rename from fixtures/cake_local_deps/tests/schema.sql rename to fixtures/cake/tests/schema.sql diff --git a/fixtures/cake_local_deps/webroot/.htaccess b/fixtures/cake/webroot/.htaccess similarity index 100% rename from fixtures/cake_local_deps/webroot/.htaccess rename to fixtures/cake/webroot/.htaccess diff --git a/fixtures/cake_local_deps/webroot/css/cake.css b/fixtures/cake/webroot/css/cake.css similarity index 100% rename from fixtures/cake_local_deps/webroot/css/cake.css rename to fixtures/cake/webroot/css/cake.css diff --git a/fixtures/cake_local_deps/webroot/css/home.css b/fixtures/cake/webroot/css/home.css similarity index 100% rename from fixtures/cake_local_deps/webroot/css/home.css rename to fixtures/cake/webroot/css/home.css diff --git a/fixtures/cake_local_deps/webroot/css/milligram.min.css b/fixtures/cake/webroot/css/milligram.min.css similarity index 100% rename from fixtures/cake_local_deps/webroot/css/milligram.min.css rename to fixtures/cake/webroot/css/milligram.min.css diff --git a/fixtures/cake_local_deps/webroot/css/normalize.min.css b/fixtures/cake/webroot/css/normalize.min.css similarity index 100% rename from fixtures/cake_local_deps/webroot/css/normalize.min.css rename to fixtures/cake/webroot/css/normalize.min.css diff --git a/fixtures/cake_local_deps/webroot/favicon.ico b/fixtures/cake/webroot/favicon.ico similarity index 100% rename from fixtures/cake_local_deps/webroot/favicon.ico rename to fixtures/cake/webroot/favicon.ico diff --git a/fixtures/cake_local_deps/webroot/font/cakedingbats-webfont.eot b/fixtures/cake/webroot/font/cakedingbats-webfont.eot similarity index 100% rename from fixtures/cake_local_deps/webroot/font/cakedingbats-webfont.eot rename to fixtures/cake/webroot/font/cakedingbats-webfont.eot diff --git a/fixtures/cake_local_deps/webroot/font/cakedingbats-webfont.svg b/fixtures/cake/webroot/font/cakedingbats-webfont.svg similarity index 100% rename from fixtures/cake_local_deps/webroot/font/cakedingbats-webfont.svg rename to fixtures/cake/webroot/font/cakedingbats-webfont.svg diff --git a/fixtures/cake_local_deps/webroot/font/cakedingbats-webfont.ttf b/fixtures/cake/webroot/font/cakedingbats-webfont.ttf similarity index 100% rename from fixtures/cake_local_deps/webroot/font/cakedingbats-webfont.ttf rename to fixtures/cake/webroot/font/cakedingbats-webfont.ttf diff --git a/fixtures/cake_local_deps/webroot/font/cakedingbats-webfont.woff b/fixtures/cake/webroot/font/cakedingbats-webfont.woff similarity index 100% rename from fixtures/cake_local_deps/webroot/font/cakedingbats-webfont.woff rename to fixtures/cake/webroot/font/cakedingbats-webfont.woff diff --git a/fixtures/cake_local_deps/webroot/font/cakedingbats-webfont.woff2 b/fixtures/cake/webroot/font/cakedingbats-webfont.woff2 similarity index 100% rename from fixtures/cake_local_deps/webroot/font/cakedingbats-webfont.woff2 rename to fixtures/cake/webroot/font/cakedingbats-webfont.woff2 diff --git a/fixtures/cake_local_deps/webroot/img/cake-logo.png b/fixtures/cake/webroot/img/cake-logo.png similarity index 100% rename from fixtures/cake_local_deps/webroot/img/cake-logo.png rename to fixtures/cake/webroot/img/cake-logo.png diff --git a/fixtures/cake_local_deps/webroot/img/cake.icon.png b/fixtures/cake/webroot/img/cake.icon.png similarity index 100% rename from fixtures/cake_local_deps/webroot/img/cake.icon.png rename to fixtures/cake/webroot/img/cake.icon.png diff --git a/fixtures/cake_local_deps/webroot/img/cake.logo.svg b/fixtures/cake/webroot/img/cake.logo.svg similarity index 100% rename from fixtures/cake_local_deps/webroot/img/cake.logo.svg rename to fixtures/cake/webroot/img/cake.logo.svg diff --git a/fixtures/cake_local_deps/webroot/img/cake.power.gif b/fixtures/cake/webroot/img/cake.power.gif similarity index 100% rename from fixtures/cake_local_deps/webroot/img/cake.power.gif rename to fixtures/cake/webroot/img/cake.power.gif diff --git a/fixtures/cake_local_deps/webroot/index.php b/fixtures/cake/webroot/index.php similarity index 100% rename from fixtures/cake_local_deps/webroot/index.php rename to fixtures/cake/webroot/index.php diff --git a/fixtures/cake_local_deps/webroot/js/.gitkeep b/fixtures/cake/webroot/js/.gitkeep similarity index 100% rename from fixtures/cake_local_deps/webroot/js/.gitkeep rename to fixtures/cake/webroot/js/.gitkeep diff --git a/fixtures/cake_local_deps/.bp-config/options.json b/fixtures/cake_local_deps/.bp-config/options.json deleted file mode 100644 index e2c3b3f9b..000000000 --- a/fixtures/cake_local_deps/.bp-config/options.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "COMPOSER_VENDOR_DIR": "vendor", - "COMPOSER_INSTALL_OPTIONS": ["--no-interaction"], - "WEBDIR": "webroot", - "LIBDIR": "library", - "PHP_EXTENSIONS": ["pdo", "pdo_sqlite", "mcrypt"] -} diff --git a/fixtures/cake_remote_deps/.bp-config/options.json b/fixtures/cake_remote_deps/.bp-config/options.json deleted file mode 100644 index e2c3b3f9b..000000000 --- a/fixtures/cake_remote_deps/.bp-config/options.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "COMPOSER_VENDOR_DIR": "vendor", - "COMPOSER_INSTALL_OPTIONS": ["--no-interaction"], - "WEBDIR": "webroot", - "LIBDIR": "library", - "PHP_EXTENSIONS": ["pdo", "pdo_sqlite", "mcrypt"] -} diff --git a/fixtures/cake_remote_deps/.editorconfig b/fixtures/cake_remote_deps/.editorconfig deleted file mode 100644 index a7b4d46fe..000000000 --- a/fixtures/cake_remote_deps/.editorconfig +++ /dev/null @@ -1,23 +0,0 @@ -; This file is for unifying the coding style for different editors and IDEs. -; More information at https://editorconfig.org - -root = true - -[*] -indent_style = space -indent_size = 4 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.bat] -end_of_line = crlf - -[*.yml] -indent_size = 2 - -[*.twig] -insert_final_newline = false - -[Makefile] -indent_style = tab diff --git a/fixtures/cake_remote_deps/.gitattributes b/fixtures/cake_remote_deps/.gitattributes deleted file mode 100644 index 5b3e6f91d..000000000 --- a/fixtures/cake_remote_deps/.gitattributes +++ /dev/null @@ -1,35 +0,0 @@ -# Define the line ending behavior of the different file extensions -# Set default behavior, in case users don't have core.autocrlf set. -* text text=auto eol=lf - -# Declare files that will always have CRLF line endings on checkout. -*.bat eol=crlf - -# Declare files that will always have LF line endings on checkout. -*.pem eol=lf - -# Denote all files that are truly binary and should not be modified. -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.webp binary -*.avif binary -*.ico binary -*.mo binary -*.pdf binary -*.xls binary -*.xlsx binary -*.phar binary -*.woff binary -*.woff2 binary -*.ttf binary -*.otf binary -*.eot binary -*.gz binary -*.bz2 binary -*.7z binary -*.zip binary -*.webm binary -*.mp4 binary -*.ogv binary diff --git a/fixtures/cake_remote_deps/.gitignore b/fixtures/cake_remote_deps/.gitignore deleted file mode 100644 index 9432fd0b9..000000000 --- a/fixtures/cake_remote_deps/.gitignore +++ /dev/null @@ -1,52 +0,0 @@ -# CakePHP specific files # -########################## -/config/app_local.php -/config/.env -/logs/* -/tmp/* -/vendor/* - -# OS generated files # -###################### -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -# Icon must end with two \r -Icon -ehthumbs.db -Thumbs.db -.directory - -# Tool specific files # -####################### -# PHPUnit -.phpunit.result.cache -tests.sqlite -# vim -*~ -*.swp -*.swo -# sublime text & textmate -*.sublime-* -*.stTheme.cache -*.tmlanguage.cache -*.tmPreferences.cache -# Eclipse -.settings/* -# JetBrains, aka PHPStorm, IntelliJ IDEA -.idea/* -# NetBeans -nbproject/* -# Visual Studio Code -.vscode -# nova -.nova -# Sass preprocessor -.sass-cache/ -# node -/node_modules/* -# yarn -yarn-debug.log -yarn-error.log diff --git a/fixtures/cake_remote_deps/.htaccess b/fixtures/cake_remote_deps/.htaccess deleted file mode 100644 index 54b08e82e..000000000 --- a/fixtures/cake_remote_deps/.htaccess +++ /dev/null @@ -1,12 +0,0 @@ -# Uncomment the following to prevent the httpoxy vulnerability -# See: https://httpoxy.org/ -# -# RequestHeader unset Proxy -# - - - RewriteEngine on - RewriteRule ^(\.well-known/.*)$ $1 [L] - RewriteRule ^$ webroot/ [L] - RewriteRule (.*) webroot/$1 [L] - diff --git a/fixtures/cake_remote_deps/README.md b/fixtures/cake_remote_deps/README.md deleted file mode 100644 index 8e58d5180..000000000 --- a/fixtures/cake_remote_deps/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# CakePHP Application Skeleton - -![Build Status](https://github.com/cakephp/app/actions/workflows/ci.yml/badge.svg?branch=master) -[![Total Downloads](https://img.shields.io/packagist/dt/cakephp/app.svg?style=flat-square)](https://packagist.org/packages/cakephp/app) -[![PHPStan](https://img.shields.io/badge/PHPStan-level%207-brightgreen.svg?style=flat-square)](https://github.com/phpstan/phpstan) - -A skeleton for creating applications with [CakePHP](https://cakephp.org) 4.x. - -The framework source code can be found here: [cakephp/cakephp](https://github.com/cakephp/cakephp). - -## Installation - -1. Download [Composer](https://getcomposer.org/doc/00-intro.md) or update `composer self-update`. -2. Run `php composer.phar create-project --prefer-dist cakephp/app [app_name]`. - -If Composer is installed globally, run - -```bash -composer create-project --prefer-dist cakephp/app -``` - -In case you want to use a custom app dir name (e.g. `/myapp/`): - -```bash -composer create-project --prefer-dist cakephp/app myapp -``` - -You can now either use your machine's webserver to view the default home page, or start -up the built-in webserver with: - -```bash -bin/cake server -p 8765 -``` - -Then visit `http://localhost:8765` to see the welcome page. - -## Update - -Since this skeleton is a starting point for your application and various files -would have been modified as per your needs, there isn't a way to provide -automated upgrades, so you have to do any updates manually. - -## Configuration - -Read and edit the environment specific `config/app_local.php` and setup the -`'Datasources'` and any other configuration relevant for your application. -Other environment agnostic settings can be changed in `config/app.php`. - -## Layout - -The app skeleton uses [Milligram](https://milligram.io/) (v1.3) minimalist CSS -framework by default. You can, however, replace it with any other library or -custom styles. diff --git a/fixtures/cake_remote_deps/bin/bash_completion.sh b/fixtures/cake_remote_deps/bin/bash_completion.sh deleted file mode 100644 index a3d3feba9..000000000 --- a/fixtures/cake_remote_deps/bin/bash_completion.sh +++ /dev/null @@ -1,47 +0,0 @@ -# -# Bash completion file for CakePHP console. -# Copy this file to a file named `cake` under `/etc/bash_completion.d/`. -# For more info check https://book.cakephp.org/4/en/console-commands/completion.html#how-to-enable-bash-autocompletion-for-the-cakephp-console -# - -_cake() -{ - local cur prev opts cake - COMPREPLY=() - cake="${COMP_WORDS[0]}" - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - - if [[ "$cur" == -* ]] ; then - if [[ ${COMP_CWORD} = 1 ]] ; then - opts=$(${cake} completion options) - elif [[ ${COMP_CWORD} = 2 ]] ; then - opts=$(${cake} completion options "${COMP_WORDS[1]}") - else - opts=$(${cake} completion options "${COMP_WORDS[1]}" "${COMP_WORDS[2]}") - fi - - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - - if [[ ${COMP_CWORD} = 1 ]] ; then - opts=$(${cake} completion commands) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - - if [[ ${COMP_CWORD} = 2 ]] ; then - opts=$(${cake} completion subcommands $prev) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - if [[ $COMPREPLY = "" ]] ; then - _filedir - return 0 - fi - return 0 - fi - - return 0 -} - -complete -F _cake cake bin/cake diff --git a/fixtures/cake_remote_deps/bin/cake b/fixtures/cake_remote_deps/bin/cake deleted file mode 100755 index 4b696c883..000000000 --- a/fixtures/cake_remote_deps/bin/cake +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env sh -################################################################################ -# -# Cake is a shell script for invoking CakePHP shell commands -# -# CakePHP(tm) : Rapid Development Framework (https://cakephp.org) -# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) -# -# Licensed under The MIT License -# For full copyright and license information, please see the LICENSE.txt -# Redistributions of files must retain the above copyright notice. -# -# @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) -# @link https://cakephp.org CakePHP(tm) Project -# @since 1.2.0 -# @license https://opensource.org/licenses/mit-license.php MIT License -# -################################################################################ - -# Canonicalize by following every symlink of the given name recursively -canonicalize() { - NAME="$1" - if [ -f "$NAME" ] - then - DIR=$(dirname -- "$NAME") - NAME=$(cd -P "$DIR" > /dev/null && pwd -P)/$(basename -- "$NAME") - fi - while [ -h "$NAME" ]; do - DIR=$(dirname -- "$NAME") - SYM=$(readlink "$NAME") - NAME=$(cd "$DIR" > /dev/null && cd "$(dirname -- "$SYM")" > /dev/null && pwd)/$(basename -- "$SYM") - done - echo "$NAME" -} - -# Find a CLI version of PHP -findCliPhp() { - for TESTEXEC in php php-cli /usr/local/bin/php - do - SAPI=$(echo "" | $TESTEXEC 2>/dev/null) - if [ "$SAPI" = "cli" ] - then - echo $TESTEXEC - return - fi - done - echo "Failed to find a CLI version of PHP; falling back to system standard php executable" >&2 - echo "php"; -} - -# If current path is a symlink, resolve to real path -realname="$0" -if [ -L "$realname" ] -then - realname=$(readlink -f "$0") -fi - -CONSOLE=$(dirname -- "$(canonicalize "$realname")") -APP=$(dirname "$CONSOLE") - -# If your CLI PHP is somewhere that this doesn't find, you can define a PHP environment -# variable with the correct path in it. -if [ -z "$PHP" ] -then - PHP=$(findCliPhp) -fi - -if [ "$(basename "$realname")" != 'cake' ] -then - exec "$PHP" "$CONSOLE"/cake.php "$(basename "$realname")" "$@" -else - exec "$PHP" "$CONSOLE"/cake.php "$@" -fi - -exit diff --git a/fixtures/cake_remote_deps/bin/cake.bat b/fixtures/cake_remote_deps/bin/cake.bat deleted file mode 100644 index ad1378229..000000000 --- a/fixtures/cake_remote_deps/bin/cake.bat +++ /dev/null @@ -1,27 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Cake is a Windows batch script for invoking CakePHP shell commands -:: -:: CakePHP(tm) : Rapid Development Framework (https://cakephp.org) -:: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) -:: -:: Licensed under The MIT License -:: Redistributions of files must retain the above copyright notice. -:: -:: @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) -:: @link https://cakephp.org CakePHP(tm) Project -:: @since 2.0.0 -:: @license https://opensource.org/licenses/mit-license.php MIT License -:: -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -@echo off - -SET app=%0 -SET lib=%~dp0 - -php "%lib%cake.php" %* - -echo. - -exit /B %ERRORLEVEL% diff --git a/fixtures/cake_remote_deps/bin/cake.php b/fixtures/cake_remote_deps/bin/cake.php deleted file mode 100644 index 320ee3643..000000000 --- a/fixtures/cake_remote_deps/bin/cake.php +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/php -q -run($argv)); diff --git a/fixtures/cake_remote_deps/composer.json b/fixtures/cake_remote_deps/composer.json deleted file mode 100644 index 2ad920a21..000000000 --- a/fixtures/cake_remote_deps/composer.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "cakephp/app", - "description": "CakePHP skeleton app", - "homepage": "https://cakephp.org", - "type": "project", - "license": "MIT", - "require": { - "php": ">=7.4", - "cakephp/cakephp": "4.4.*", - "cakephp/migrations": "^3.2", - "cakephp/plugin-installer": "^1.3", - "mobiledetect/mobiledetectlib": "^2.8" - }, - "require-dev": { - "cakephp/bake": "^2.6", - "cakephp/cakephp-codesniffer": "^4.5", - "cakephp/debug_kit": "^4.5", - "josegonzalez/dotenv": "^3.2", - "phpunit/phpunit": "~8.5.0 || ^9.3" - }, - "suggest": { - "markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.", - "dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan/Psalm compatibility.", - "phpstan/phpstan": "PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code.", - "cakephp/repl": "Console tools for a REPL interface for CakePHP applications." - }, - "autoload": { - "psr-4": { - "App\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "App\\Test\\": "tests/", - "Cake\\Test\\": "vendor/cakephp/cakephp/tests/" - } - }, - "scripts": { - "post-install-cmd": "App\\Console\\Installer::postInstall", - "post-create-project-cmd": "App\\Console\\Installer::postInstall", - "check": [ - "@test", - "@cs-check" - ], - "cs-check": "phpcs --colors -p src/ tests/", - "cs-fix": "phpcbf --colors -p src/ tests/", - "stan": "phpstan analyse", - "test": "phpunit --colors=always" - }, - "prefer-stable": true, - "config": { - "sort-packages": true, - "allow-plugins": { - "cakephp/plugin-installer": true, - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} diff --git a/fixtures/cake_remote_deps/composer.lock b/fixtures/cake_remote_deps/composer.lock deleted file mode 100644 index 2e8882775..000000000 --- a/fixtures/cake_remote_deps/composer.lock +++ /dev/null @@ -1,5791 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "cf4acc9af81e6ac2fc72dbbb514c2b0d", - "packages": [ - { - "name": "cakephp/cakephp", - "version": "4.4.8", - "source": { - "type": "git", - "url": "https://github.com/cakephp/cakephp.git", - "reference": "ad188775dde89ad758dad9923ff558900914d59c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/cakephp/zipball/ad188775dde89ad758dad9923ff558900914d59c", - "reference": "ad188775dde89ad758dad9923ff558900914d59c", - "shasum": "" - }, - "require": { - "cakephp/chronos": "^2.2", - "composer/ca-bundle": "^1.2", - "ext-intl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "laminas/laminas-diactoros": "^2.2.2", - "laminas/laminas-httphandlerrunner": "^1.1 || ^2.0", - "league/container": "^4.2.0", - "php": ">=7.4.0", - "psr/container": "^1.1 || ^2.0", - "psr/http-client": "^1.0", - "psr/http-server-handler": "^1.0", - "psr/http-server-middleware": "^1.0", - "psr/log": "^1.0 || ^2.0", - "psr/simple-cache": "^1.0 || ^2.0" - }, - "replace": { - "cakephp/cache": "self.version", - "cakephp/collection": "self.version", - "cakephp/console": "self.version", - "cakephp/core": "self.version", - "cakephp/database": "self.version", - "cakephp/datasource": "self.version", - "cakephp/event": "self.version", - "cakephp/filesystem": "self.version", - "cakephp/form": "self.version", - "cakephp/http": "self.version", - "cakephp/i18n": "self.version", - "cakephp/log": "self.version", - "cakephp/orm": "self.version", - "cakephp/utility": "self.version", - "cakephp/validation": "self.version" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^4.5", - "mikey179/vfsstream": "^1.6.10", - "paragonie/csp-builder": "^2.3", - "phpunit/phpunit": "^8.5 || ^9.3" - }, - "suggest": { - "ext-curl": "To enable more efficient network calls in Http\\Client.", - "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.", - "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()", - "paragonie/csp-builder": "CSP builder, to use the CSP Middleware" - }, - "type": "library", - "autoload": { - "files": [ - "src/Core/functions.php", - "src/Collection/functions.php", - "src/I18n/functions.php", - "src/Routing/functions.php", - "src/Utility/bootstrap.php" - ], - "psr-4": { - "Cake\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/cakephp/graphs/contributors" - } - ], - "description": "The CakePHP framework", - "homepage": "https://cakephp.org", - "keywords": [ - "conventions over configuration", - "dry", - "form", - "framework", - "mvc", - "orm", - "psr-7", - "rapid-development", - "validation" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/cakephp/issues", - "source": "https://github.com/cakephp/cakephp" - }, - "time": "2022-12-02T02:29:42+00:00" - }, - { - "name": "cakephp/chronos", - "version": "2.3.2", - "source": { - "type": "git", - "url": "https://github.com/cakephp/chronos.git", - "reference": "a21b7b633f483c4cf525d200219d200f551ee38b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/chronos/zipball/a21b7b633f483c4cf525d200219d200f551ee38b", - "reference": "a21b7b633f483c4cf525d200219d200f551ee38b", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^4.5", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "autoload": { - "files": [ - "src/carbon_compat.php" - ], - "psr-4": { - "Cake\\Chronos\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - }, - { - "name": "The CakePHP Team", - "homepage": "https://cakephp.org" - } - ], - "description": "A simple API extension for DateTime.", - "homepage": "https://cakephp.org", - "keywords": [ - "date", - "datetime", - "time" - ], - "support": { - "issues": "https://github.com/cakephp/chronos/issues", - "source": "https://github.com/cakephp/chronos" - }, - "time": "2022-11-08T02:17:04+00:00" - }, - { - "name": "cakephp/migrations", - "version": "3.7.1", - "source": { - "type": "git", - "url": "https://github.com/cakephp/migrations.git", - "reference": "bbe44b610bbf51bda751114ecabfe5dd172a6dab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/migrations/zipball/bbe44b610bbf51bda751114ecabfe5dd172a6dab", - "reference": "bbe44b610bbf51bda751114ecabfe5dd172a6dab", - "shasum": "" - }, - "require": { - "cakephp/cache": "^4.3.0", - "cakephp/orm": "^4.3.0", - "php": ">=7.4.0", - "robmorgan/phinx": "^0.13.2" - }, - "require-dev": { - "cakephp/bake": "^2.6.0", - "cakephp/cakephp": "^4.3.0", - "cakephp/cakephp-codesniffer": "^4.1", - "phpunit/phpunit": "^9.5.0" - }, - "suggest": { - "cakephp/bake": "If you want to generate migrations.", - "dereuromark/cakephp-ide-helper": "If you want to have IDE suggest/autocomplete when creating migrations." - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "Migrations\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/migrations/graphs/contributors" - } - ], - "description": "Database Migration plugin for CakePHP based on Phinx", - "homepage": "https://github.com/cakephp/migrations", - "keywords": [ - "cakephp", - "migrations" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/migrations/issues", - "source": "https://github.com/cakephp/migrations" - }, - "time": "2022-12-10T12:39:01+00:00" - }, - { - "name": "cakephp/plugin-installer", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/cakephp/plugin-installer.git", - "reference": "e27027aa2d3d8ab64452c6817629558685a064cb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/plugin-installer/zipball/e27027aa2d3d8ab64452c6817629558685a064cb", - "reference": "e27027aa2d3d8ab64452c6817629558685a064cb", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.6.0" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^3.3", - "composer/composer": "^2.0", - "phpunit/phpunit": "^5.7 || ^6.5 || ^8.5 || ^9.3" - }, - "type": "composer-plugin", - "extra": { - "class": "Cake\\Composer\\Plugin" - }, - "autoload": { - "psr-4": { - "Cake\\Composer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://cakephp.org" - } - ], - "description": "A composer installer for CakePHP 3.0+ plugins.", - "support": { - "issues": "https://github.com/cakephp/plugin-installer/issues", - "source": "https://github.com/cakephp/plugin-installer/tree/1.3.1" - }, - "time": "2020-10-29T04:00:42+00:00" - }, - { - "name": "composer/ca-bundle", - "version": "1.3.4", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "69098eca243998b53eed7a48d82dedd28b447cd5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/69098eca243998b53eed7a48d82dedd28b447cd5", - "reference": "69098eca243998b53eed7a48d82dedd28b447cd5", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "psr/log": "^1.0", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.4" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-10-12T12:08:29+00:00" - }, - { - "name": "laminas/laminas-diactoros", - "version": "2.22.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "df8c7f9e11d854269f4aa7c06ffa38caa42e4405" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/df8c7f9e11d854269f4aa7c06ffa38caa42e4405", - "reference": "df8c7f9e11d854269f4aa7c06ffa38caa42e4405", - "shasum": "" - }, - "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "conflict": { - "zendframework/zend-diactoros": "*" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "ext-dom": "*", - "ext-gd": "*", - "ext-libxml": "*", - "http-interop/http-factory-tests": "^0.9.0", - "laminas/laminas-coding-standard": "^2.4.0", - "php-http/psr7-integration-tests": "^1.1.1", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.0", - "vimeo/psalm": "^4.29.0" - }, - "type": "library", - "extra": { - "laminas": { - "config-provider": "Laminas\\Diactoros\\ConfigProvider", - "module": "Laminas\\Diactoros" - } - }, - "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php", - "src/functions/create_uploaded_file.legacy.php", - "src/functions/marshal_headers_from_sapi.legacy.php", - "src/functions/marshal_method_from_sapi.legacy.php", - "src/functions/marshal_protocol_version_from_sapi.legacy.php", - "src/functions/marshal_uri_from_sapi.legacy.php", - "src/functions/normalize_server.legacy.php", - "src/functions/normalize_uploaded_files.legacy.php", - "src/functions/parse_cookie_header.legacy.php" - ], - "psr-4": { - "Laminas\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "PSR HTTP Message implementations", - "homepage": "https://laminas.dev", - "keywords": [ - "http", - "laminas", - "psr", - "psr-17", - "psr-7" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-diactoros/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-diactoros/issues", - "rss": "https://github.com/laminas/laminas-diactoros/releases.atom", - "source": "https://github.com/laminas/laminas-diactoros" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-11-22T05:54:54+00:00" - }, - { - "name": "laminas/laminas-httphandlerrunner", - "version": "2.4.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-httphandlerrunner.git", - "reference": "d15af53895fd581b5a448a09fd9a4baebc4ae6e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/d15af53895fd581b5a448a09fd9a4baebc4ae6e5", - "reference": "d15af53895fd581b5a448a09fd9a4baebc4ae6e5", - "shasum": "" - }, - "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", - "psr/http-message": "^1.0", - "psr/http-message-implementation": "^1.0", - "psr/http-server-handler": "^1.0" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-diactoros": "^2.18", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.28" - }, - "type": "library", - "extra": { - "laminas": { - "config-provider": "Laminas\\HttpHandlerRunner\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\HttpHandlerRunner\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.", - "homepage": "https://laminas.dev", - "keywords": [ - "components", - "laminas", - "mezzio", - "psr-15", - "psr-7" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-httphandlerrunner/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-httphandlerrunner/issues", - "rss": "https://github.com/laminas/laminas-httphandlerrunner/releases.atom", - "source": "https://github.com/laminas/laminas-httphandlerrunner" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-10-25T13:41:39+00:00" - }, - { - "name": "league/container", - "version": "4.2.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/container.git", - "reference": "375d13cb828649599ef5d48a339c4af7a26cd0ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/container/zipball/375d13cb828649599ef5d48a339c4af7a26cd0ab", - "reference": "375d13cb828649599ef5d48a339c4af7a26cd0ab", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "psr/container": "^1.1 || ^2.0" - }, - "provide": { - "psr/container-implementation": "^1.0" - }, - "replace": { - "orno/di": "~2.0" - }, - "require-dev": { - "nette/php-generator": "^3.4", - "nikic/php-parser": "^4.10", - "phpstan/phpstan": "^0.12.47", - "phpunit/phpunit": "^8.5.17", - "roave/security-advisories": "dev-latest", - "scrutinizer/ocular": "^1.8", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev", - "dev-4.x": "4.x-dev", - "dev-3.x": "3.x-dev", - "dev-2.x": "2.x-dev", - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Container\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Phil Bennett", - "email": "mail@philbennett.co.uk", - "role": "Developer" - } - ], - "description": "A fast and intuitive dependency injection container.", - "homepage": "https://github.com/thephpleague/container", - "keywords": [ - "container", - "dependency", - "di", - "injection", - "league", - "provider", - "service" - ], - "support": { - "issues": "https://github.com/thephpleague/container/issues", - "source": "https://github.com/thephpleague/container/tree/4.2.0" - }, - "funding": [ - { - "url": "https://github.com/philipobenito", - "type": "github" - } - ], - "time": "2021-11-16T10:29:06+00:00" - }, - { - "name": "mobiledetect/mobiledetectlib", - "version": "2.8.41", - "source": { - "type": "git", - "url": "https://github.com/serbanghita/Mobile-Detect.git", - "reference": "fc9cccd4d3706d5a7537b562b59cc18f9e4c0cb1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/fc9cccd4d3706d5a7537b562b59cc18f9e4c0cb1", - "reference": "fc9cccd4d3706d5a7537b562b59cc18f9e4c0cb1", - "shasum": "" - }, - "require": { - "php": ">=5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8.35||~5.7" - }, - "type": "library", - "autoload": { - "psr-0": { - "Detection": "namespaced/" - }, - "classmap": [ - "Mobile_Detect.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Serban Ghita", - "email": "serbanghita@gmail.com", - "homepage": "http://mobiledetect.net", - "role": "Developer" - } - ], - "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", - "homepage": "https://github.com/serbanghita/Mobile-Detect", - "keywords": [ - "detect mobile devices", - "mobile", - "mobile detect", - "mobile detector", - "php mobile detect" - ], - "support": { - "issues": "https://github.com/serbanghita/Mobile-Detect/issues", - "source": "https://github.com/serbanghita/Mobile-Detect/tree/2.8.41" - }, - "time": "2022-11-08T18:31:26+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "psr/http-client", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client/tree/master" - }, - "time": "2020-06-29T06:28:15+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" - }, - "time": "2019-04-30T12:38:16+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/master" - }, - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "psr/http-server-handler", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "handler", - "http", - "http-interop", - "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" - ], - "support": { - "issues": "https://github.com/php-fig/http-server-handler/issues", - "source": "https://github.com/php-fig/http-server-handler/tree/master" - }, - "time": "2018-10-30T16:46:14+00:00" - }, - { - "name": "psr/http-server-middleware", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0", - "psr/http-server-handler": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side middleware", - "keywords": [ - "http", - "http-interop", - "middleware", - "psr", - "psr-15", - "psr-7", - "request", - "response" - ], - "support": { - "issues": "https://github.com/php-fig/http-server-middleware/issues", - "source": "https://github.com/php-fig/http-server-middleware/tree/master" - }, - "time": "2018-10-30T17:12:04+00:00" - }, - { - "name": "psr/log", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/2.0.0" - }, - "time": "2021-07-14T16:41:46+00:00" - }, - { - "name": "psr/simple-cache", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/8707bf3cea6f710bf6ef05491234e3ab06f6432a", - "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "support": { - "source": "https://github.com/php-fig/simple-cache/tree/2.0.0" - }, - "time": "2021-10-29T13:22:09+00:00" - }, - { - "name": "robmorgan/phinx", - "version": "0.13.3", - "source": { - "type": "git", - "url": "https://github.com/cakephp/phinx.git", - "reference": "da741d10879bcdd235a830d589ae51659f746262" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/phinx/zipball/da741d10879bcdd235a830d589ae51659f746262", - "reference": "da741d10879bcdd235a830d589ae51659f746262", - "shasum": "" - }, - "require": { - "cakephp/database": "^4.0", - "php": ">=7.2", - "psr/container": "^1.0 || ^2.0", - "symfony/config": "^3.4|^4.0|^5.0|^6.0", - "symfony/console": "^3.4|^4.0|^5.0|^6.0" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^4.0", - "ext-json": "*", - "ext-pdo": "*", - "phpunit/phpunit": "^8.5|^9.3", - "sebastian/comparator": ">=1.2.3", - "symfony/yaml": "^3.4|^4.0|^5.0" - }, - "suggest": { - "ext-json": "Install if using JSON configuration format", - "ext-pdo": "PDO extension is needed", - "symfony/yaml": "Install if using YAML configuration format" - }, - "bin": [ - "bin/phinx" - ], - "type": "library", - "autoload": { - "psr-4": { - "Phinx\\": "src/Phinx/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Rob Morgan", - "email": "robbym@gmail.com", - "homepage": "https://robmorgan.id.au", - "role": "Lead Developer" - }, - { - "name": "Woody Gilk", - "email": "woody.gilk@gmail.com", - "homepage": "https://shadowhand.me", - "role": "Developer" - }, - { - "name": "Richard Quadling", - "email": "rquadling@gmail.com", - "role": "Developer" - }, - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/phinx/graphs/contributors", - "role": "Developer" - } - ], - "description": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app.", - "homepage": "https://phinx.org", - "keywords": [ - "database", - "database migrations", - "db", - "migrations", - "phinx" - ], - "support": { - "issues": "https://github.com/cakephp/phinx/issues", - "source": "https://github.com/cakephp/phinx/tree/0.13.3" - }, - "time": "2022-12-01T16:30:23+00:00" - }, - { - "name": "symfony/config", - "version": "v6.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "ebf27792246165a2a0b6b69ec9c620cac8c5a2f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/ebf27792246165a2a0b6b69ec9c620cac8c5a2f0", - "reference": "ebf27792246165a2a0b6b69ec9c620cac8c5a2f0", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/filesystem": "^5.4|^6.0", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/finder": "<5.4" - }, - "require-dev": { - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", - "symfony/messenger": "^5.4|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/yaml": "^5.4|^6.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/config/tree/v6.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-02T09:08:04+00:00" - }, - { - "name": "symfony/console", - "version": "v6.2.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f", - "reference": "58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.4|^6.0" - }, - "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v6.2.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-12-01T13:44:20+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.3-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-25T10:21:52+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v6.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/50b2523c874605cf3d4acf7a9e2b30b6a440a016", - "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-20T13:01:27+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v3.1.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/925e713fe8fcacf6bc05e936edd8dd5441a21239", - "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/container": "^2.0" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.1.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-30T19:18:58+00:00" - }, - { - "name": "symfony/string", - "version": "v6.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "145702685e0d12f81d755c71127bfff7582fdd36" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/145702685e0d12f81d755c71127bfff7582fdd36", - "reference": "145702685e0d12f81d755c71127bfff7582fdd36", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/translation-contracts": "<2.0" - }, - "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", - "symfony/translation-contracts": "^2.0|^3.0", - "symfony/var-exporter": "^5.4|^6.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v6.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-30T17:13:47+00:00" - } - ], - "packages-dev": [ - { - "name": "brick/varexporter", - "version": "0.3.7", - "source": { - "type": "git", - "url": "https://github.com/brick/varexporter.git", - "reference": "3e263cd718d242594c52963760fee2059fd5833c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/brick/varexporter/zipball/3e263cd718d242594c52963760fee2059fd5833c", - "reference": "3e263cd718d242594c52963760fee2059fd5833c", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.0", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^8.5 || ^9.0", - "vimeo/psalm": "4.23.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Brick\\VarExporter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A powerful alternative to var_export(), which can export closures and objects without __set_state()", - "keywords": [ - "var_export" - ], - "support": { - "issues": "https://github.com/brick/varexporter/issues", - "source": "https://github.com/brick/varexporter/tree/0.3.7" - }, - "funding": [ - { - "url": "https://github.com/BenMorel", - "type": "github" - } - ], - "time": "2022-06-29T23:37:57+00:00" - }, - { - "name": "cakephp/bake", - "version": "2.8.2", - "source": { - "type": "git", - "url": "https://github.com/cakephp/bake.git", - "reference": "ef021497ab517c33ecd97d2184200d8990ffc0ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/bake/zipball/ef021497ab517c33ecd97d2184200d8990ffc0ab", - "reference": "ef021497ab517c33ecd97d2184200d8990ffc0ab", - "shasum": "" - }, - "require": { - "brick/varexporter": "^0.3.5", - "cakephp/cakephp": "^4.3.0", - "cakephp/twig-view": "^1.0.2", - "nikic/php-parser": "^4.13.2", - "php": ">=7.2" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^4.0", - "cakephp/debug_kit": "^4.1", - "cakephp/plugin-installer": "^1.3", - "phpunit/phpunit": "^8.5 || ^9.3" - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "Bake\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/bake/graphs/contributors" - } - ], - "description": "Bake plugin for CakePHP", - "homepage": "https://github.com/cakephp/bake", - "keywords": [ - "bake", - "cakephp" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/bake/issues", - "source": "https://github.com/cakephp/bake" - }, - "time": "2022-10-05T18:45:20+00:00" - }, - { - "name": "cakephp/cakephp-codesniffer", - "version": "4.6.0", - "source": { - "type": "git", - "url": "https://github.com/cakephp/cakephp-codesniffer.git", - "reference": "5a64e6e6434128f6a1549318de86c564737d5cda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/cakephp-codesniffer/zipball/5a64e6e6434128f6a1549318de86c564737d5cda", - "reference": "5a64e6e6434128f6a1549318de86c564737d5cda", - "shasum": "" - }, - "require": { - "php": ">=7.2.0", - "slevomat/coding-standard": "^6.3.6 || ^7.0 || ^8.0", - "squizlabs/php_codesniffer": "^3.6" - }, - "require-dev": { - "phpunit/phpunit": "^7.1" - }, - "type": "phpcodesniffer-standard", - "autoload": { - "psr-4": { - "CakePHP\\": "CakePHP/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/cakephp-codesniffer/graphs/contributors" - } - ], - "description": "CakePHP CodeSniffer Standards", - "homepage": "https://cakephp.org", - "keywords": [ - "codesniffer", - "framework" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/cakephp-codesniffer/issues", - "source": "https://github.com/cakephp/cakephp-codesniffer" - }, - "time": "2022-07-04T03:29:58+00:00" - }, - { - "name": "cakephp/debug_kit", - "version": "4.9.2", - "source": { - "type": "git", - "url": "https://github.com/cakephp/debug_kit.git", - "reference": "c6590fca606783bce5b0564a2997cd76042cf652" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/debug_kit/zipball/c6590fca606783bce5b0564a2997cd76042cf652", - "reference": "c6590fca606783bce5b0564a2997cd76042cf652", - "shasum": "" - }, - "require": { - "cakephp/cakephp": "^4.4.0", - "cakephp/chronos": "^2.0", - "composer/composer": "^1.3 | ^2.0", - "jdorn/sql-formatter": "^1.2", - "php": ">=7.4" - }, - "require-dev": { - "cakephp/authorization": "^2.0", - "cakephp/cakephp-codesniffer": "^4.0", - "phpunit/phpunit": "~8.5.0 | ^9.3" - }, - "suggest": { - "ext-pdo_sqlite": "DebugKit needs to store panel data in a database. SQLite is simple and easy to use." - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "DebugKit\\": "src/", - "DebugKit\\Test\\Fixture\\": "tests/Fixture/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mark Story", - "homepage": "https://mark-story.com", - "role": "Author" - }, - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/debug_kit/graphs/contributors" - } - ], - "description": "CakePHP Debug Kit", - "homepage": "https://github.com/cakephp/debug_kit", - "keywords": [ - "cakephp", - "debug", - "kit" - ], - "support": { - "forum": "http://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/debug_kit/issues", - "source": "https://github.com/cakephp/debug_kit" - }, - "time": "2022-11-26T08:47:15+00:00" - }, - { - "name": "cakephp/twig-view", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/cakephp/twig-view.git", - "reference": "14df50360b809a171d0688020fbdfe513763f89b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/twig-view/zipball/14df50360b809a171d0688020fbdfe513763f89b", - "reference": "14df50360b809a171d0688020fbdfe513763f89b", - "shasum": "" - }, - "require": { - "cakephp/cakephp": "^4.0", - "jasny/twig-extensions": "^1.3", - "php": ">=7.2", - "twig/markdown-extra": "^3.0", - "twig/twig": "^3.0" - }, - "conflict": { - "wyrihaximus/twig-view": "*" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^4.0", - "cakephp/debug_kit": "^4.0", - "cakephp/plugin-installer": "^1.3", - "michelf/php-markdown": "^1.9", - "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^8.5 || ^9.3" - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "Cake\\TwigView\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/cakephp/graphs/contributors" - } - ], - "description": "Twig powered View for CakePHP", - "keywords": [ - "cakephp", - "template", - "twig", - "view" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/twig-view/issues", - "source": "https://github.com/cakephp/twig-view" - }, - "time": "2021-09-17T14:07:52+00:00" - }, - { - "name": "composer/class-map-generator", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/class-map-generator.git", - "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/1e1cb2b791facb2dfe32932a7718cf2571187513", - "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513", - "shasum": "" - }, - "require": { - "composer/pcre": "^2 || ^3", - "php": "^7.2 || ^8.0", - "symfony/finder": "^4.4 || ^5.3 || ^6" - }, - "require-dev": { - "phpstan/phpstan": "^1.6", - "phpstan/phpstan-deprecation-rules": "^1", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/filesystem": "^5.4 || ^6", - "symfony/phpunit-bridge": "^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\ClassMapGenerator\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Utilities to scan PHP code and generate class maps.", - "keywords": [ - "classmap" - ], - "support": { - "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-06-19T11:31:27+00:00" - }, - { - "name": "composer/composer", - "version": "2.4.4", - "source": { - "type": "git", - "url": "https://github.com/composer/composer.git", - "reference": "e8d9087229bcdbc5867594d3098091412f1130cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/e8d9087229bcdbc5867594d3098091412f1130cf", - "reference": "e8d9087229bcdbc5867594d3098091412f1130cf", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.0", - "composer/class-map-generator": "^1.0", - "composer/metadata-minifier": "^1.0", - "composer/pcre": "^2 || ^3", - "composer/semver": "^3.0", - "composer/spdx-licenses": "^1.5.7", - "composer/xdebug-handler": "^2.0.2 || ^3.0.3", - "justinrainbow/json-schema": "^5.2.11", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1.0 || ^2.0 || ^3.0", - "react/promise": "^2.8", - "seld/jsonlint": "^1.4", - "seld/phar-utils": "^1.2", - "seld/signal-handler": "^2.0", - "symfony/console": "^5.4.11 || ^6.0.11", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/polyfill-php73": "^1.24", - "symfony/polyfill-php80": "^1.24", - "symfony/process": "^5.4 || ^6.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.4.1", - "phpstan/phpstan-deprecation-rules": "^1", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1", - "phpstan/phpstan-symfony": "^1.2.10", - "symfony/phpunit-bridge": "^6.0" - }, - "suggest": { - "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", - "ext-zip": "Enabling the zip extension allows you to unzip archives", - "ext-zlib": "Allow gzip compression of HTTP requests" - }, - "bin": [ - "bin/composer" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.4-dev" - }, - "phpstan": { - "includes": [ - "phpstan/rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "Composer\\": "src/Composer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "https://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", - "homepage": "https://getcomposer.org/", - "keywords": [ - "autoload", - "dependency", - "package" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.4.4" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-10-27T12:39:29+00:00" - }, - { - "name": "composer/metadata-minifier", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/metadata-minifier.git", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "composer/composer": "^2", - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\MetadataMinifier\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Small utility library that handles metadata minification and expansion.", - "keywords": [ - "composer", - "compression" - ], - "support": { - "issues": "https://github.com/composer/metadata-minifier/issues", - "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-04-07T13:37:33+00:00" - }, - { - "name": "composer/pcre", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-11-17T09:50:14+00:00" - }, - { - "name": "composer/semver", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-04-01T19:23:25+00:00" - }, - { - "name": "composer/spdx-licenses", - "version": "1.5.7", - "source": { - "type": "git", - "url": "https://github.com/composer/spdx-licenses.git", - "reference": "c848241796da2abf65837d51dce1fae55a960149" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/c848241796da2abf65837d51dce1fae55a960149", - "reference": "c848241796da2abf65837d51dce1fae55a960149", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Spdx\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "SPDX licenses list and validation library.", - "keywords": [ - "license", - "spdx", - "validator" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/spdx-licenses/issues", - "source": "https://github.com/composer/spdx-licenses/tree/1.5.7" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-05-23T07:37:50+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", - "shasum": "" - }, - "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T21:32:43+00:00" - }, - { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", - "source": { - "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" - }, - "require-dev": { - "composer/composer": "*", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" - }, - "autoload": { - "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - }, - { - "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcbf", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], - "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" - }, - "time": "2022-02-04T12:51:07+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-03-03T08:28:38+00:00" - }, - { - "name": "jasny/twig-extensions", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/jasny/twig-extensions.git", - "reference": "a694eb02f6fc14ff8e2fceb8b80882c0c926102b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jasny/twig-extensions/zipball/a694eb02f6fc14ff8e2fceb8b80882c0c926102b", - "reference": "a694eb02f6fc14ff8e2fceb8b80882c0c926102b", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "twig/twig": "^2.0 | ^3.0" - }, - "require-dev": { - "ext-intl": "*", - "ext-pcre": "*", - "jasny/php-code-quality": "^2.5", - "php": ">=7.2.0" - }, - "suggest": { - "ext-intl": "Required for the use of the LocalDate Twig extension", - "ext-pcre": "Required for the use of the PCRE Twig extension" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jasny\\Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Arnold Daniels", - "email": "arnold@jasny.net", - "homepage": "http://www.jasny.net" - } - ], - "description": "A set of useful Twig filters", - "homepage": "http://github.com/jasny/twig-extensions#README", - "keywords": [ - "PCRE", - "array", - "date", - "datetime", - "preg", - "regex", - "templating", - "text", - "time" - ], - "support": { - "issues": "https://github.com/jasny/twig-extensions/issues", - "source": "https://github.com/jasny/twig-extensions" - }, - "time": "2019-12-10T16:04:23+00:00" - }, - { - "name": "jdorn/sql-formatter", - "version": "v1.2.17", - "source": { - "type": "git", - "url": "https://github.com/jdorn/sql-formatter.git", - "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/64990d96e0959dff8e059dfcdc1af130728d92bc", - "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "lib" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jeremy Dorn", - "email": "jeremy@jeremydorn.com", - "homepage": "http://jeremydorn.com/" - } - ], - "description": "a PHP SQL highlighting library", - "homepage": "https://github.com/jdorn/sql-formatter/", - "keywords": [ - "highlight", - "sql" - ], - "support": { - "issues": "https://github.com/jdorn/sql-formatter/issues", - "source": "https://github.com/jdorn/sql-formatter/tree/master" - }, - "time": "2014-01-12T16:20:24+00:00" - }, - { - "name": "josegonzalez/dotenv", - "version": "3.2.0", - "source": { - "type": "git", - "url": "https://github.com/josegonzalez/php-dotenv.git", - "reference": "f19174d9d7213a6c20e8e5e268aa7dd042d821ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/josegonzalez/php-dotenv/zipball/f19174d9d7213a6c20e8e5e268aa7dd042d821ca", - "reference": "f19174d9d7213a6c20e8e5e268aa7dd042d821ca", - "shasum": "" - }, - "require": { - "m1/env": "2.*", - "php": ">=5.5.0" - }, - "require-dev": { - "php-mock/php-mock-phpunit": "^1.1", - "satooshi/php-coveralls": "1.*", - "squizlabs/php_codesniffer": "2.*" - }, - "type": "library", - "autoload": { - "psr-0": { - "josegonzalez\\Dotenv": [ - "src", - "tests" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jose Diaz-Gonzalez", - "email": "dotenv@josegonzalez.com", - "homepage": "http://josediazgonzalez.com", - "role": "Maintainer" - } - ], - "description": "dotenv file parsing for PHP", - "homepage": "https://github.com/josegonzalez/php-dotenv", - "keywords": [ - "configuration", - "dotenv", - "php" - ], - "support": { - "issues": "https://github.com/josegonzalez/php-dotenv/issues", - "source": "https://github.com/josegonzalez/php-dotenv/tree/master" - }, - "time": "2017-09-19T15:49:58+00:00" - }, - { - "name": "justinrainbow/json-schema", - "version": "5.2.12", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", - "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" - }, - "time": "2022-04-13T08:02:27+00:00" - }, - { - "name": "m1/env", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/m1/Env.git", - "reference": "5c296e3e13450a207e12b343f3af1d7ab569f6f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/m1/Env/zipball/5c296e3e13450a207e12b343f3af1d7ab569f6f3", - "reference": "5c296e3e13450a207e12b343f3af1d7ab569f6f3", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*", - "scrutinizer/ocular": "~1.1", - "squizlabs/php_codesniffer": "^2.3" - }, - "suggest": { - "josegonzalez/dotenv": "For loading of .env", - "m1/vars": "For loading of configs" - }, - "type": "library", - "autoload": { - "psr-4": { - "M1\\Env\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Miles Croxford", - "email": "hello@milescroxford.com", - "homepage": "http://milescroxford.com", - "role": "Developer" - } - ], - "description": "Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.", - "homepage": "https://github.com/m1/Env", - "keywords": [ - ".env", - "config", - "dotenv", - "env", - "loader", - "m1", - "parser", - "support" - ], - "support": { - "issues": "https://github.com/m1/Env/issues", - "source": "https://github.com/m1/Env/tree/2.2.0" - }, - "time": "2020-02-19T09:02:13+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.15.2", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" - }, - "time": "2022-11-12T15:38:23+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "6ff970a7101acfe99b3048e4bbfbc094e55c5b04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6ff970a7101acfe99b3048e4bbfbc094e55c5b04", - "reference": "6ff970a7101acfe99b3048e4bbfbc094e55c5b04", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.15.0" - }, - "time": "2022-12-07T16:12:39+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.20", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "af7463c955007de36db0c5e26d03e2f933c2e980" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/af7463c955007de36db0c5e26d03e2f933c2e980", - "reference": "af7463c955007de36db0c5e26d03e2f933c2e980", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.20" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-12-13T07:49:28+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.27", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38", - "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" - } - ], - "time": "2022-12-09T07:31:23+00:00" - }, - { - "name": "react/promise", - "version": "v2.9.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ], - "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.9.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-02-11T10:27:51+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T12:41:17+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-03T09:37:03+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T06:03:37+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-14T08:28:10+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "3.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-12T14:47:03+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "seld/jsonlint", - "version": "1.9.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "4211420d25eba80712bff236a98960ef68b866b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", - "reference": "4211420d25eba80712bff236a98960ef68b866b7", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "support": { - "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], - "time": "2022-04-01T13:37:23+00:00" - }, - { - "name": "seld/phar-utils", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", - "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\PharUtils\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "PHAR file format utilities, for when PHP phars you up", - "keywords": [ - "phar" - ], - "support": { - "issues": "https://github.com/Seldaek/phar-utils/issues", - "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1" - }, - "time": "2022-08-31T10:31:18+00:00" - }, - { - "name": "seld/signal-handler", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/signal-handler.git", - "reference": "f69d119511dc0360440cdbdaa71829c149b7be75" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/signal-handler/zipball/f69d119511dc0360440cdbdaa71829c149b7be75", - "reference": "f69d119511dc0360440cdbdaa71829c149b7be75", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "require-dev": { - "phpstan/phpstan": "^1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.3", - "phpunit/phpunit": "^7.5.20 || ^8.5.23", - "psr/log": "^1 || ^2 || ^3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\Signal\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development", - "keywords": [ - "posix", - "sigint", - "signal", - "sigterm", - "unix" - ], - "support": { - "issues": "https://github.com/Seldaek/signal-handler/issues", - "source": "https://github.com/Seldaek/signal-handler/tree/2.0.1" - }, - "time": "2022-07-20T18:31:45+00:00" - }, - { - "name": "slevomat/coding-standard", - "version": "8.7.0", - "source": { - "type": "git", - "url": "https://github.com/slevomat/coding-standard.git", - "reference": "326d195209d196be02f8c2a0034529262fc7ffcc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/326d195209d196be02f8c2a0034529262fc7ffcc", - "reference": "326d195209d196be02f8c2a0034529262fc7ffcc", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": ">=1.15.0 <1.16.0", - "squizlabs/php_codesniffer": "^3.7.1" - }, - "require-dev": { - "phing/phing": "2.17.4", - "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.4.10|1.9.3", - "phpstan/phpstan-deprecation-rules": "1.1.0", - "phpstan/phpstan-phpunit": "1.0.0|1.3.1", - "phpstan/phpstan-strict-rules": "1.4.4", - "phpunit/phpunit": "7.5.20|8.5.21|9.5.27" - }, - "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "8.x-dev" - } - }, - "autoload": { - "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", - "keywords": [ - "dev", - "phpcs" - ], - "support": { - "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.7.0" - }, - "funding": [ - { - "url": "https://github.com/kukulich", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", - "type": "tidelift" - } - ], - "time": "2022-12-13T15:02:08+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.7.1", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2022-06-18T07:21:10+00:00" - }, - { - "name": "symfony/finder", - "version": "v6.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "eb2355f69519e4ef33f1835bca4c935f5d42e570" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/eb2355f69519e4ef33f1835bca4c935f5d42e570", - "reference": "eb2355f69519e4ef33f1835bca4c935f5d42e570", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "require-dev": { - "symfony/filesystem": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v6.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-10-09T08:55:40+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/process", - "version": "v6.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/ba6e55359f8f755fe996c58a81e00eaa67a35877", - "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v6.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-02T09:08:04+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "twig/markdown-extra", - "version": "v3.4.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/markdown-extra.git", - "reference": "25ed505b6ffd3b00f922ca682489dfbaf44eb1f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/markdown-extra/zipball/25ed505b6ffd3b00f922ca682489dfbaf44eb1f7", - "reference": "25ed505b6ffd3b00f922ca682489dfbaf44eb1f7", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "twig/twig": "^2.7|^3.0" - }, - "require-dev": { - "erusev/parsedown": "^1.7", - "league/commonmark": "^1.0|^2.0", - "league/html-to-markdown": "^4.8|^5.0", - "michelf/php-markdown": "^1.8", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "psr-4": { - "Twig\\Extra\\Markdown\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - } - ], - "description": "A Twig extension for Markdown", - "homepage": "https://twig.symfony.com", - "keywords": [ - "html", - "markdown", - "twig" - ], - "support": { - "source": "https://github.com/twigphp/markdown-extra/tree/v3.4.0" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2022-01-29T15:34:05+00:00" - }, - { - "name": "twig/twig", - "version": "v3.4.3", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/c38fd6b0b7f370c198db91ffd02e23b517426b58", - "reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.4.3" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2022-09-28T08:42:51+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": true, - "prefer-lowest": false, - "platform": { - "php": ">=7.4" - }, - "platform-dev": [], - "plugin-api-version": "2.3.0" -} diff --git a/fixtures/cake_remote_deps/config/.env.example b/fixtures/cake_remote_deps/config/.env.example deleted file mode 100644 index e90937b65..000000000 --- a/fixtures/cake_remote_deps/config/.env.example +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -# Used as a default to seed config/.env which -# enables you to use environment variables to configure -# the aspects of your application that vary by -# environment. -# -# Having this file in production is considered a **SECURITY RISK** and also decreases -# the bootstrap performance of your application. -# -# To use this file, first copy it into `config/.env`. Also ensure the related -# code block for loading this file is uncommented in `config/bootstrap.php` -# -# In development .env files are parsed by PHP -# and set into the environment. This provides a simpler -# development workflow over standard environment variables. -export APP_NAME="__APP_NAME__" -export DEBUG="true" -export APP_ENCODING="UTF-8" -export APP_DEFAULT_LOCALE="en_US" -export APP_DEFAULT_TIMEZONE="UTC" -export SECURITY_SALT="__SALT__" - -# Uncomment these to define cache configuration via environment variables. -#export CACHE_DURATION="+2 minutes" -#export CACHE_DEFAULT_URL="file:///path/to/tmp/cache/?prefix=${APP_NAME}_default_&duration=${CACHE_DURATION}" -#export CACHE_CAKECORE_URL="file:///path/to/tmp/cache/persistent?prefix=${APP_NAME}_cake_core_&serialize=true&duration=${CACHE_DURATION}" -#export CACHE_CAKEMODEL_URL="file:///path/to/tmp/cache/models?prefix=${APP_NAME}_cake_model_&serialize=true&duration=${CACHE_DURATION}" - -# Uncomment these to define email transport configuration via environment variables. -#export EMAIL_TRANSPORT_DEFAULT_URL="" - -# Uncomment these to define database configuration via environment variables. -#export DATABASE_URL="mysql://my_app:secret@localhost/${APP_NAME}?encoding=utf8&timezone=UTC&cacheMetadata=true"eIdentifiers=false&persistent=false" -#export DATABASE_TEST_URL="mysql://my_app:secret@localhost/test_${APP_NAME}?encoding=utf8&timezone=UTC&cacheMetadata=true"eIdentifiers=false&persistent=false" - -# Uncomment these to define logging configuration via environment variables. -#export LOG_DEBUG_URL="file:///path/to/logs/?levels[]=notice&levels[]=info&levels[]=debug&file=debug" -#export LOG_ERROR_URL="file:///path/to/logs/?levels[]=warning&levels[]=error&levels[]=critical&levels[]=alert&levels[]=emergency&file=error" diff --git a/fixtures/cake_remote_deps/config/Migrations/20221214032650_CreateUsers.php b/fixtures/cake_remote_deps/config/Migrations/20221214032650_CreateUsers.php deleted file mode 100644 index 230280566..000000000 --- a/fixtures/cake_remote_deps/config/Migrations/20221214032650_CreateUsers.php +++ /dev/null @@ -1,35 +0,0 @@ -table('users'); - $table->addColumn('name', 'string', [ - 'default' => null, - 'limit' => 255, - 'null' => false, - ]); - $table->addColumn('email', 'string', [ - 'default' => null, - 'limit' => 255, - 'null' => false, - ]); - $table->addColumn('phone_no', 'string', [ - 'default' => null, - 'limit' => 255, - 'null' => false, - ]); - $table->create(); - } -} diff --git a/fixtures/cake_remote_deps/config/Migrations/schema-dump-default.lock b/fixtures/cake_remote_deps/config/Migrations/schema-dump-default.lock deleted file mode 100644 index 47ecd5793..000000000 Binary files a/fixtures/cake_remote_deps/config/Migrations/schema-dump-default.lock and /dev/null differ diff --git a/fixtures/cake_remote_deps/config/app.php b/fixtures/cake_remote_deps/config/app.php deleted file mode 100644 index 067d0de96..000000000 --- a/fixtures/cake_remote_deps/config/app.php +++ /dev/null @@ -1,424 +0,0 @@ - filter_var(env('DEBUG', false), FILTER_VALIDATE_BOOLEAN), - - /* - * Configure basic information about the application. - * - * - namespace - The namespace to find app classes under. - * - defaultLocale - The default locale for translation, formatting currencies and numbers, date and time. - * - encoding - The encoding used for HTML + database connections. - * - base - The base directory the app resides in. If false this - * will be auto detected. - * - dir - Name of app directory. - * - webroot - The webroot directory. - * - wwwRoot - The file path to webroot. - * - baseUrl - To configure CakePHP to *not* use mod_rewrite and to - * use CakePHP pretty URLs, remove these .htaccess - * files: - * /.htaccess - * /webroot/.htaccess - * And uncomment the baseUrl key below. - * - fullBaseUrl - A base URL to use for absolute links. When set to false (default) - * CakePHP generates required value based on `HTTP_HOST` environment variable. - * However, you can define it manually to optimize performance or if you - * are concerned about people manipulating the `Host` header. - * - imageBaseUrl - Web path to the public images directory under webroot. - * - cssBaseUrl - Web path to the public css directory under webroot. - * - jsBaseUrl - Web path to the public js directory under webroot. - * - paths - Configure paths for non class based resources. Supports the - * `plugins`, `templates`, `locales` subkeys, which allow the definition of - * paths for plugins, view templates and locale files respectively. - */ - 'App' => [ - 'namespace' => 'App', - 'encoding' => env('APP_ENCODING', 'UTF-8'), - 'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'), - 'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'UTC'), - 'base' => false, - 'dir' => 'src', - 'webroot' => 'webroot', - 'wwwRoot' => WWW_ROOT, - //'baseUrl' => env('SCRIPT_NAME'), - 'fullBaseUrl' => false, - 'imageBaseUrl' => 'img/', - 'cssBaseUrl' => 'css/', - 'jsBaseUrl' => 'js/', - 'paths' => [ - 'plugins' => [ROOT . DS . 'plugins' . DS], - 'templates' => [ROOT . DS . 'templates' . DS], - 'locales' => [RESOURCES . 'locales' . DS], - ], - ], - - /* - * Security and encryption configuration - * - * - salt - A random string used in security hashing methods. - * The salt value is also used as the encryption key. - * You should treat it as extremely sensitive data. - */ - 'Security' => [ - 'salt' => env('SECURITY_SALT', 'e738c5c43d330c600cf089a781a292592b64e6000d41e1f363bd5b3701f68625'), - ], - - /* - * Apply timestamps with the last modified time to static assets (js, css, images). - * Will append a querystring parameter containing the time the file was modified. - * This is useful for busting browser caches. - * - * Set to true to apply timestamps when debug is true. Set to 'force' to always - * enable timestamping regardless of debug value. - */ - 'Asset' => [ - //'timestamp' => true, - // 'cacheTime' => '+1 year' - ], - - /* - * Configure the cache adapters. - */ - 'Cache' => [ - 'default' => [ - 'className' => FileEngine::class, - 'path' => CACHE, - 'url' => env('CACHE_DEFAULT_URL', null), - ], - - /* - * Configure the cache used for general framework caching. - * Translation cache files are stored with this configuration. - * Duration will be set to '+2 minutes' in bootstrap.php when debug = true - * If you set 'className' => 'Null' core cache will be disabled. - */ - '_cake_core_' => [ - 'className' => FileEngine::class, - 'prefix' => 'myapp_cake_core_', - 'path' => CACHE . 'persistent' . DS, - 'serialize' => true, - 'duration' => '+1 years', - 'url' => env('CACHE_CAKECORE_URL', null), - ], - - /* - * Configure the cache for model and datasource caches. This cache - * configuration is used to store schema descriptions, and table listings - * in connections. - * Duration will be set to '+2 minutes' in bootstrap.php when debug = true - */ - '_cake_model_' => [ - 'className' => FileEngine::class, - 'prefix' => 'myapp_cake_model_', - 'path' => CACHE . 'models' . DS, - 'serialize' => true, - 'duration' => '+1 years', - 'url' => env('CACHE_CAKEMODEL_URL', null), - ], - - /* - * Configure the cache for routes. The cached routes collection is built the - * first time the routes are processed through `config/routes.php`. - * Duration will be set to '+2 seconds' in bootstrap.php when debug = true - */ - '_cake_routes_' => [ - 'className' => FileEngine::class, - 'prefix' => 'myapp_cake_routes_', - 'path' => CACHE, - 'serialize' => true, - 'duration' => '+1 years', - 'url' => env('CACHE_CAKEROUTES_URL', null), - ], - ], - - /* - * Configure the Error and Exception handlers used by your application. - * - * By default errors are displayed using Debugger, when debug is true and logged - * by Cake\Log\Log when debug is false. - * - * In CLI environments exceptions will be printed to stderr with a backtrace. - * In web environments an HTML page will be displayed for the exception. - * With debug true, framework errors like Missing Controller will be displayed. - * When debug is false, framework errors will be coerced into generic HTTP errors. - * - * Options: - * - * - `errorLevel` - int - The level of errors you are interested in capturing. - * - `trace` - boolean - Whether or not backtraces should be included in - * logged errors/exceptions. - * - `log` - boolean - Whether or not you want exceptions logged. - * - `exceptionRenderer` - string - The class responsible for rendering uncaught exceptions. - * The chosen class will be used for for both CLI and web environments. If you want different - * classes used in CLI and web environments you'll need to write that conditional logic as well. - * The conventional location for custom renderers is in `src/Error`. Your exception renderer needs to - * implement the `render()` method and return either a string or Http\Response. - * `errorRenderer` - string - The class responsible for rendering PHP errors. The selected - * class will be used for both web and CLI contexts. If you want different classes for each environment - * you'll need to write that conditional logic as well. Error renderers need to - * to implement the `Cake\Error\ErrorRendererInterface`. - * - `skipLog` - array - List of exceptions to skip for logging. Exceptions that - * extend one of the listed exceptions will also be skipped for logging. - * E.g.: - * `'skipLog' => ['Cake\Http\Exception\NotFoundException', 'Cake\Http\Exception\UnauthorizedException']` - * - `extraFatalErrorMemory` - int - The number of megabytes to increase the memory limit by - * when a fatal error is encountered. This allows - * breathing room to complete logging or error handling. - * - `ignoredDeprecationPaths` - array - A list of glob compatible file paths that deprecations - * should be ignored in. Use this to ignore deprecations for plugins or parts of - * your application that still emit deprecations. - */ - 'Error' => [ - 'errorLevel' => E_ALL, - 'skipLog' => [], - 'log' => true, - 'trace' => true, - 'ignoredDeprecationPaths' => [], - ], - - /* - * Debugger configuration - * - * Define development error values for Cake\Error\Debugger - * - * - `editor` Set the editor URL format you want to use. - * By default atom, emacs, macvim, phpstorm, sublime, textmate, and vscode are - * available. You can add additional editor link formats using - * `Debugger::addEditor()` during your application bootstrap. - * - `outputMask` A mapping of `key` to `replacement` values that - * `Debugger` should replace in dumped data and logs generated by `Debugger`. - */ - 'Debugger' => [ - 'editor' => 'phpstorm', - ], - - /* - * Email configuration. - * - * By defining transports separately from delivery profiles you can easily - * re-use transport configuration across multiple profiles. - * - * You can specify multiple configurations for production, development and - * testing. - * - * Each transport needs a `className`. Valid options are as follows: - * - * Mail - Send using PHP mail function - * Smtp - Send using SMTP - * Debug - Do not send the email, just return the result - * - * You can add custom transports (or override existing transports) by adding the - * appropriate file to src/Mailer/Transport. Transports should be named - * 'YourTransport.php', where 'Your' is the name of the transport. - */ - 'EmailTransport' => [ - 'default' => [ - 'className' => MailTransport::class, - /* - * The keys host, port, timeout, username, password, client and tls - * are used in SMTP transports - */ - 'host' => 'localhost', - 'port' => 25, - 'timeout' => 30, - /* - * It is recommended to set these options through your environment or app_local.php - */ - //'username' => null, - //'password' => null, - 'client' => null, - 'tls' => false, - 'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null), - ], - ], - - /* - * Email delivery profiles - * - * Delivery profiles allow you to predefine various properties about email - * messages from your application and give the settings a name. This saves - * duplication across your application and makes maintenance and development - * easier. Each profile accepts a number of keys. See `Cake\Mailer\Email` - * for more information. - */ - 'Email' => [ - 'default' => [ - 'transport' => 'default', - 'from' => 'you@localhost', - /* - * Will by default be set to config value of App.encoding, if that exists otherwise to UTF-8. - */ - //'charset' => 'utf-8', - //'headerCharset' => 'utf-8', - ], - ], - - /* - * Connection information used by the ORM to connect - * to your application's datastores. - * - * ### Notes - * - Drivers include Mysql Postgres Sqlite Sqlserver - * See vendor\cakephp\cakephp\src\Database\Driver for complete list - * - Do not use periods in database name - it may lead to error. - * See https://github.com/cakephp/cakephp/issues/6471 for details. - * - 'encoding' is recommended to be set to full UTF-8 4-Byte support. - * E.g set it to 'utf8mb4' in MariaDB and MySQL and 'utf8' for any - * other RDBMS. - */ - 'Datasources' => [ - 'default' => [ - 'className' => Connection::class, - 'driver' => \Cake\Database\Driver\Sqlite::class, - 'persistent' => false, - 'host' => 'localhost', - /* - * CakePHP will use the default DB port based on the driver selected - * MySQL on MAMP uses port 8889, MAMP users will want to uncomment - * the following line and set the port accordingly - */ - //'port' => 'non_standard_port_number', - 'username' => 'my_app', - 'password' => 'secret', - 'database' => '/tmp/test.db', - /* - * You do not need to set this flag to use full utf-8 encoding (internal default since CakePHP 3.6). - */ - //'encoding' => 'utf8mb4', - 'timezone' => 'UTC', - 'flags' => [], - 'cacheMetadata' => true, - 'log' => false, - - /** - * Set identifier quoting to true if you are using reserved words or - * special characters in your table or column names. Enabling this - * setting will result in queries built using the Query Builder having - * identifiers quoted when creating SQL. It should be noted that this - * decreases performance because each query needs to be traversed and - * manipulated before being executed. - */ - 'quoteIdentifiers' => false, - - /** - * During development, if using MySQL < 5.6, uncommenting the - * following line could boost the speed at which schema metadata is - * fetched from the database. It can also be set directly with the - * mysql configuration directive 'innodb_stats_on_metadata = 0' - * which is the recommended value in production environments - */ - //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'], - - 'url' => env('DATABASE_URL', null), - ], - - /** - * The test connection is used during the test suite. - */ - 'test' => [ - 'className' => Connection::class, - 'driver' => Mysql::class, - 'persistent' => false, - 'host' => 'localhost', - //'port' => 'non_standard_port_number', - 'username' => 'my_app', - 'password' => 'secret', - 'database' => 'test_myapp', - //'encoding' => 'utf8mb4', - 'timezone' => 'UTC', - 'cacheMetadata' => true, - 'quoteIdentifiers' => false, - 'log' => false, - //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'], - 'url' => env('DATABASE_TEST_URL', null), - ], - ], - - /* - * Configures logging options - */ - 'Log' => [ - 'debug' => [ - 'className' => FileLog::class, - 'path' => LOGS, - 'file' => 'debug', - 'url' => env('LOG_DEBUG_URL', null), - 'scopes' => false, - 'levels' => ['notice', 'info', 'debug'], - ], - 'error' => [ - 'className' => FileLog::class, - 'path' => LOGS, - 'file' => 'error', - 'url' => env('LOG_ERROR_URL', null), - 'scopes' => false, - 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'], - ], - // To enable this dedicated query log, you need set your datasource's log flag to true - 'queries' => [ - 'className' => FileLog::class, - 'path' => LOGS, - 'file' => 'queries', - 'url' => env('LOG_QUERIES_URL', null), - 'scopes' => ['queriesLog'], - ], - ], - - /* - * Session configuration. - * - * Contains an array of settings to use for session configuration. The - * `defaults` key is used to define a default preset to use for sessions, any - * settings declared here will override the settings of the default config. - * - * ## Options - * - * - `cookie` - The name of the cookie to use. Defaults to value set for `session.name` php.ini config. - * Avoid using `.` in cookie names, as PHP will drop sessions from cookies with `.` in the name. - * - `cookiePath` - The url path for which session cookie is set. Maps to the - * `session.cookie_path` php.ini config. Defaults to base path of app. - * - `timeout` - The time in minutes the session should be valid for. - * Pass 0 to disable checking timeout. - * Please note that php.ini's session.gc_maxlifetime must be equal to or greater - * than the largest Session['timeout'] in all served websites for it to have the - * desired effect. - * - `defaults` - The default configuration set to use as a basis for your session. - * There are four built-in options: php, cake, cache, database. - * - `handler` - Can be used to enable a custom session handler. Expects an - * array with at least the `engine` key, being the name of the Session engine - * class to use for managing the session. CakePHP bundles the `CacheSession` - * and `DatabaseSession` engines. - * - `ini` - An associative array of additional ini values to set. - * - * The built-in `defaults` options are: - * - * - 'php' - Uses settings defined in your php.ini. - * - 'cake' - Saves session files in CakePHP's /tmp directory. - * - 'database' - Uses CakePHP's database sessions. - * - 'cache' - Use the Cache class to save sessions. - * - * To define a custom session handler, save it at src/Network/Session/.php. - * Make sure the class implements PHP's `SessionHandlerInterface` and set - * Session.handler to - * - * To use database sessions, load the SQL file located at config/schema/sessions.sql - */ - 'Session' => [ - 'defaults' => 'php', - ], -]; diff --git a/fixtures/cake_remote_deps/config/app_local.example.php b/fixtures/cake_remote_deps/config/app_local.example.php deleted file mode 100644 index 7147e5a9b..000000000 --- a/fixtures/cake_remote_deps/config/app_local.example.php +++ /dev/null @@ -1,128 +0,0 @@ - filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN), - - /* - * Security and encryption configuration - * - * - salt - A random string used in security hashing methods. - * The salt value is also used as the encryption key. - * You should treat it as extremely sensitive data. - */ - 'Security' => [ - 'salt' => env('SECURITY_SALT', '__SALT__'), - ], - - /* - * Connection information used by the ORM to connect - * to your application's datastores. - * - * See app.php for more configuration options. - */ - 'Datasources' => [ - 'default' => [ - 'className' => Connection::class, - 'driver' => \Cake\Database\Driver\Sqlite::class, - 'persistent' => false, - 'host' => 'localhost', - /* - * CakePHP will use the default DB port based on the driver selected - * MySQL on MAMP uses port 8889, MAMP users will want to uncomment - * the following line and set the port accordingly - */ - //'port' => 'non_standard_port_number', - 'username' => 'my_app', - 'password' => 'secret', - 'database' => '/tmp/test.db', - /* - * You do not need to set this flag to use full utf-8 encoding (internal default since CakePHP 3.6). - */ - //'encoding' => 'utf8mb4', - 'timezone' => 'UTC', - 'flags' => [], - 'cacheMetadata' => true, - 'log' => false, - - /** - * Set identifier quoting to true if you are using reserved words or - * special characters in your table or column names. Enabling this - * setting will result in queries built using the Query Builder having - * identifiers quoted when creating SQL. It should be noted that this - * decreases performance because each query needs to be traversed and - * manipulated before being executed. - */ - 'quoteIdentifiers' => false, - - /** - * During development, if using MySQL < 5.6, uncommenting the - * following line could boost the speed at which schema metadata is - * fetched from the database. It can also be set directly with the - * mysql configuration directive 'innodb_stats_on_metadata = 0' - * which is the recommended value in production environments - */ - //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'], - - 'url' => env('DATABASE_URL', null), - ], - - /** - * The test connection is used during the test suite. - */ - 'test' => [ - 'className' => Connection::class, - 'driver' => Mysql::class, - 'persistent' => false, - 'host' => 'localhost', - //'port' => 'non_standard_port_number', - 'username' => 'my_app', - 'password' => 'secret', - 'database' => 'test_myapp', - //'encoding' => 'utf8mb4', - 'timezone' => 'UTC', - 'cacheMetadata' => true, - 'quoteIdentifiers' => false, - 'log' => false, - //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'], - 'url' => env('DATABASE_TEST_URL', null), - ], - ], - - /* - * Email configuration. - * - * Host and credential configuration in case you are using SmtpTransport - * - * See app.php for more configuration options. - */ - 'EmailTransport' => [ - 'default' => [ - 'host' => 'localhost', - 'port' => 25, - 'username' => null, - 'password' => null, - 'client' => null, - 'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null), - ], - ], -]; diff --git a/fixtures/cake_remote_deps/config/bootstrap.php b/fixtures/cake_remote_deps/config/bootstrap.php deleted file mode 100644 index e616d938c..000000000 --- a/fixtures/cake_remote_deps/config/bootstrap.php +++ /dev/null @@ -1,223 +0,0 @@ -parse() -// ->putenv() -// ->toEnv() -// ->toServer(); -// } - -/* - * Read configuration file and inject configuration into various - * CakePHP classes. - * - * By default there is only one configuration file. It is often a good - * idea to create multiple configuration files, and separate the configuration - * that changes from configuration that does not. This makes deployment simpler. - */ -try { - Configure::config('default', new PhpConfig()); - Configure::load('app', 'default', false); -} catch (\Exception $e) { - exit($e->getMessage() . "\n"); -} - -/* - * Load an environment local configuration file to provide overrides to your configuration. - * Notice: For security reasons app_local.php **should not** be included in your git repo. - */ -if (file_exists(CONFIG . 'app_local.php')) { - Configure::load('app_local', 'default'); -} - -/* - * When debug = true the metadata cache should only last - * for a short time. - */ -if (Configure::read('debug')) { - Configure::write('Cache._cake_model_.duration', '+2 minutes'); - Configure::write('Cache._cake_core_.duration', '+2 minutes'); - // disable router cache during development - Configure::write('Cache._cake_routes_.duration', '+2 seconds'); -} - -/* - * Set the default server timezone. Using UTC makes time calculations / conversions easier. - * Check http://php.net/manual/en/timezones.php for list of valid timezone strings. - */ -date_default_timezone_set(Configure::read('App.defaultTimezone')); - -/* - * Configure the mbstring extension to use the correct encoding. - */ -mb_internal_encoding(Configure::read('App.encoding')); - -/* - * Set the default locale. This controls how dates, number and currency is - * formatted and sets the default language to use for translations. - */ -ini_set('intl.default_locale', Configure::read('App.defaultLocale')); - -/* - * Register application error and exception handlers. - */ -(new ErrorTrap(Configure::read('Error')))->register(); -(new ExceptionTrap(Configure::read('Error')))->register(); - -/* - * Include the CLI bootstrap overrides. - */ -if (PHP_SAPI === 'cli') { - require CONFIG . 'bootstrap_cli.php'; -} - -/* - * Set the full base URL. - * This URL is used as the base of all absolute links. - */ -$fullBaseUrl = Configure::read('App.fullBaseUrl'); -if (!$fullBaseUrl) { - /* - * When using proxies or load balancers, SSL/TLS connections might - * get terminated before reaching the server. If you trust the proxy, - * you can enable `$trustProxy` to rely on the `X-Forwarded-Proto` - * header to determine whether to generate URLs using `https`. - * - * See also https://book.cakephp.org/4/en/controllers/request-response.html#trusting-proxy-headers - */ - $trustProxy = false; - - $s = null; - if (env('HTTPS') || ($trustProxy && env('HTTP_X_FORWARDED_PROTO') === 'https')) { - $s = 's'; - } - - $httpHost = env('HTTP_HOST'); - if (isset($httpHost)) { - $fullBaseUrl = 'http' . $s . '://' . $httpHost; - } - unset($httpHost, $s); -} -if ($fullBaseUrl) { - Router::fullBaseUrl($fullBaseUrl); -} -unset($fullBaseUrl); - -Cache::setConfig(Configure::consume('Cache')); -ConnectionManager::setConfig(Configure::consume('Datasources')); -TransportFactory::setConfig(Configure::consume('EmailTransport')); -Mailer::setConfig(Configure::consume('Email')); -Log::setConfig(Configure::consume('Log')); -Security::setSalt(Configure::consume('Security.salt')); - -/* - * Setup detectors for mobile and tablet. - * If you don't use these checks you can safely remove this code - * and the mobiledetect package from composer.json. - */ -ServerRequest::addDetector('mobile', function ($request) { - $detector = new \Detection\MobileDetect(); - - return $detector->isMobile(); -}); -ServerRequest::addDetector('tablet', function ($request) { - $detector = new \Detection\MobileDetect(); - - return $detector->isTablet(); -}); - -/* - * You can enable default locale format parsing by adding calls - * to `useLocaleParser()`. This enables the automatic conversion of - * locale specific date formats. For details see - * @link https://book.cakephp.org/4/en/core-libraries/internationalization-and-localization.html#parsing-localized-datetime-data - */ -// \Cake\Database\TypeFactory::build('time') -// ->useLocaleParser(); -// \Cake\Database\TypeFactory::build('date') -// ->useLocaleParser(); -// \Cake\Database\TypeFactory::build('datetime') -// ->useLocaleParser(); -// \Cake\Database\TypeFactory::build('timestamp') -// ->useLocaleParser(); -// \Cake\Database\TypeFactory::build('datetimefractional') -// ->useLocaleParser(); -// \Cake\Database\TypeFactory::build('timestampfractional') -// ->useLocaleParser(); -// \Cake\Database\TypeFactory::build('datetimetimezone') -// ->useLocaleParser(); -// \Cake\Database\TypeFactory::build('timestamptimezone') -// ->useLocaleParser(); - -// There is no time-specific type in Cake -TypeFactory::map('time', StringType::class); - -/* - * Custom Inflector rules, can be set to correctly pluralize or singularize - * table, model, controller names or whatever other string is passed to the - * inflection functions. - */ -//Inflector::rules('plural', ['/^(inflect)or$/i' => '\1ables']); -//Inflector::rules('irregular', ['red' => 'redlings']); -//Inflector::rules('uninflected', ['dontinflectme']); diff --git a/fixtures/cake_remote_deps/config/bootstrap_cli.php b/fixtures/cake_remote_deps/config/bootstrap_cli.php deleted file mode 100644 index fc0dc30bb..000000000 --- a/fixtures/cake_remote_deps/config/bootstrap_cli.php +++ /dev/null @@ -1,35 +0,0 @@ -= 50.1 is needed to use CakePHP. Please update the `libicu` package of your system.' . PHP_EOL, - E_USER_ERROR - ); -} - -/* - * You can remove this if you are confident you have mbstring installed. - */ -if (!extension_loaded('mbstring')) { - trigger_error('You must enable the mbstring extension to use CakePHP.', E_USER_ERROR); -} diff --git a/fixtures/cake_remote_deps/config/routes.php b/fixtures/cake_remote_deps/config/routes.php deleted file mode 100644 index 1442a4889..000000000 --- a/fixtures/cake_remote_deps/config/routes.php +++ /dev/null @@ -1,94 +0,0 @@ -setRouteClass(DashedRoute::class); - - $routes->scope('/', function (RouteBuilder $builder) { - /* - * Here, we are connecting '/' (base path) to a controller called 'Pages', - * its action called 'display', and we pass a param to select the view file - * to use (in this case, templates/Pages/home.php)... - */ - $builder->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']); - - /* - * ...and connect the rest of 'Pages' controller's URLs. - */ - $builder->connect('/pages/*', 'Pages::display'); - - $builder->connect('/users', ['controller' => 'Users', 'action' => 'listUsers']); - $builder->connect('/users/add', ['controller' => 'Users', 'action' => 'addUser']); - - /* - * Connect catchall routes for all controllers. - * - * The `fallbacks` method is a shortcut for - * - * ``` - * $builder->connect('/{controller}', ['action' => 'index']); - * $builder->connect('/{controller}/{action}/*', []); - * ``` - * - * You can remove these routes once you've connected the - * routes you want in your application. - */ - $builder->fallbacks(); - }); - - /* - * If you need a different set of middleware or none at all, - * open new scope and define routes there. - * - * ``` - * $routes->scope('/api', function (RouteBuilder $builder) { - * // No $builder->applyMiddleware() here. - * - * // Parse specified extensions from URLs - * // $builder->setExtensions(['json', 'xml']); - * - * // Connect API actions here. - * }); - * ``` - */ -}; diff --git a/fixtures/cake_remote_deps/config/schema/i18n.sql b/fixtures/cake_remote_deps/config/schema/i18n.sql deleted file mode 100644 index e59d1e651..000000000 --- a/fixtures/cake_remote_deps/config/schema/i18n.sql +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) -# -# Licensed under The MIT License -# For full copyright and license information, please see the LICENSE.txt -# Redistributions of files must retain the above copyright notice. -# MIT License (https://opensource.org/licenses/mit-license.php) - -CREATE TABLE i18n ( - id int NOT NULL auto_increment, - locale varchar(6) NOT NULL, - model varchar(255) NOT NULL, - foreign_key int(10) NOT NULL, - field varchar(255) NOT NULL, - content text, - PRIMARY KEY (id), - UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field), - INDEX I18N_FIELD(model, foreign_key, field) -); diff --git a/fixtures/cake_remote_deps/config/schema/sessions.sql b/fixtures/cake_remote_deps/config/schema/sessions.sql deleted file mode 100644 index 1aa0a0f54..000000000 --- a/fixtures/cake_remote_deps/config/schema/sessions.sql +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) -# -# Licensed under The MIT License -# For full copyright and license information, please see the LICENSE.txt -# Redistributions of files must retain the above copyright notice. -# MIT License (https://opensource.org/licenses/mit-license.php) - -CREATE TABLE `sessions` ( - `id` char(40) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, - `created` datetime DEFAULT CURRENT_TIMESTAMP, -- optional, requires MySQL 5.6.5+ - `modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- optional, requires MySQL 5.6.5+ - `data` blob DEFAULT NULL, -- for PostgreSQL use bytea instead of blob - `expires` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/fixtures/cake_remote_deps/config/schema/users.sql b/fixtures/cake_remote_deps/config/schema/users.sql deleted file mode 100644 index 9ae579cdd..000000000 --- a/fixtures/cake_remote_deps/config/schema/users.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE IF NOT EXISTS `users` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(32) NOT NULL, - `email` varchar(32) NOT NULL, - `phone_no` varchar(32) NOT NULL, - PRIMARY KEY (`id`) - ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=58 ; diff --git a/fixtures/cake_remote_deps/index.php b/fixtures/cake_remote_deps/index.php deleted file mode 100644 index 459176916..000000000 --- a/fixtures/cake_remote_deps/index.php +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - diff --git a/fixtures/cake_remote_deps/phpstan.neon b/fixtures/cake_remote_deps/phpstan.neon deleted file mode 100644 index 7bf37ab94..000000000 --- a/fixtures/cake_remote_deps/phpstan.neon +++ /dev/null @@ -1,8 +0,0 @@ -parameters: - level: 8 - checkMissingIterableValueType: false - treatPhpDocTypesAsCertain: false - paths: - - src/ - excludePaths: - - src/Console/Installer.php diff --git a/fixtures/cake_remote_deps/phpunit.xml.dist b/fixtures/cake_remote_deps/phpunit.xml.dist deleted file mode 100644 index 1f587f900..000000000 --- a/fixtures/cake_remote_deps/phpunit.xml.dist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - tests/TestCase/ - - - - - - - - - - - - - src/ - plugins/*/src/ - - src/Console/Installer.php - - - - diff --git a/fixtures/cake_remote_deps/src/Application.php b/fixtures/cake_remote_deps/src/Application.php deleted file mode 100644 index 848283a5f..000000000 --- a/fixtures/cake_remote_deps/src/Application.php +++ /dev/null @@ -1,136 +0,0 @@ -bootstrapCli(); - } else { - FactoryLocator::add( - 'Table', - (new TableLocator())->allowFallbackClass(false) - ); - } - - /* - * Only try to load DebugKit in development mode - * Debug Kit should not be installed on a production system - */ - if (Configure::read('debug')) { - $this->addPlugin('DebugKit'); - } - - // Load more plugins here - } - - /** - * Setup the middleware queue your application will use. - * - * @param \Cake\Http\MiddlewareQueue $middlewareQueue The middleware queue to setup. - * @return \Cake\Http\MiddlewareQueue The updated middleware queue. - */ - public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue - { - $middlewareQueue - // Catch any exceptions in the lower layers, - // and make an error page/response - ->add(new ErrorHandlerMiddleware(Configure::read('Error'))) - - // Handle plugin/theme assets like CakePHP normally does. - ->add(new AssetMiddleware([ - 'cacheTime' => Configure::read('Asset.cacheTime'), - ])) - - // Add routing middleware. - // If you have a large number of routes connected, turning on routes - // caching in production could improve performance. For that when - // creating the middleware instance specify the cache config name by - // using it's second constructor argument: - // `new RoutingMiddleware($this, '_cake_routes_')` - ->add(new RoutingMiddleware($this)) - - // Parse various types of encoded request bodies so that they are - // available as array through $request->getData() - // https://book.cakephp.org/4/en/controllers/middleware.html#body-parser-middleware - ->add(new BodyParserMiddleware()) - - // Cross Site Request Forgery (CSRF) Protection Middleware - // https://book.cakephp.org/4/en/security/csrf.html#cross-site-request-forgery-csrf-middleware - ->add(new CsrfProtectionMiddleware([ - 'httponly' => true, - ])); - - return $middlewareQueue; - } - - /** - * Register application container services. - * - * @param \Cake\Core\ContainerInterface $container The Container to update. - * @return void - * @link https://book.cakephp.org/4/en/development/dependency-injection.html#dependency-injection - */ - public function services(ContainerInterface $container): void - { - } - - /** - * Bootstrapping for CLI application. - * - * That is when running commands. - * - * @return void - */ - protected function bootstrapCli(): void - { - $this->addOptionalPlugin('Cake/Repl'); - $this->addOptionalPlugin('Bake'); - - $this->addPlugin('Migrations'); - - // Load more plugins here - } -} diff --git a/fixtures/cake_remote_deps/src/Console/Installer.php b/fixtures/cake_remote_deps/src/Console/Installer.php deleted file mode 100644 index 4bdccc104..000000000 --- a/fixtures/cake_remote_deps/src/Console/Installer.php +++ /dev/null @@ -1,246 +0,0 @@ -getIO(); - - $rootDir = dirname(dirname(__DIR__)); - - static::createAppLocalConfig($rootDir, $io); - static::createWritableDirectories($rootDir, $io); - - static::setFolderPermissions($rootDir, $io); - static::setSecuritySalt($rootDir, $io); - - if (class_exists(CodeceptionInstaller::class)) { - CodeceptionInstaller::customizeCodeceptionBinary($event); - } - } - - /** - * Create config/app_local.php file if it does not exist. - * - * @param string $dir The application's root directory. - * @param \Composer\IO\IOInterface $io IO interface to write to console. - * @return void - */ - public static function createAppLocalConfig($dir, $io) - { - $appLocalConfig = $dir . '/config/app_local.php'; - $appLocalConfigTemplate = $dir . '/config/app_local.example.php'; - if (!file_exists($appLocalConfig)) { - copy($appLocalConfigTemplate, $appLocalConfig); - $io->write('Created `config/app_local.php` file'); - } - } - - /** - * Create the `logs` and `tmp` directories. - * - * @param string $dir The application's root directory. - * @param \Composer\IO\IOInterface $io IO interface to write to console. - * @return void - */ - public static function createWritableDirectories($dir, $io) - { - foreach (static::WRITABLE_DIRS as $path) { - $path = $dir . '/' . $path; - if (!file_exists($path)) { - mkdir($path); - $io->write('Created `' . $path . '` directory'); - } - } - } - - /** - * Set globally writable permissions on the "tmp" and "logs" directory. - * - * This is not the most secure default, but it gets people up and running quickly. - * - * @param string $dir The application's root directory. - * @param \Composer\IO\IOInterface $io IO interface to write to console. - * @return void - */ - public static function setFolderPermissions($dir, $io) - { - // ask if the permissions should be changed - if ($io->isInteractive()) { - $validator = function ($arg) { - if (in_array($arg, ['Y', 'y', 'N', 'n'])) { - return $arg; - } - throw new Exception('This is not a valid answer. Please choose Y or n.'); - }; - $setFolderPermissions = $io->askAndValidate( - 'Set Folder Permissions ? (Default to Y) [Y,n]? ', - $validator, - 10, - 'Y' - ); - - if (in_array($setFolderPermissions, ['n', 'N'])) { - return; - } - } - - // Change the permissions on a path and output the results. - $changePerms = function ($path) use ($io) { - $currentPerms = fileperms($path) & 0777; - $worldWritable = $currentPerms | 0007; - if ($worldWritable == $currentPerms) { - return; - } - - $res = chmod($path, $worldWritable); - if ($res) { - $io->write('Permissions set on ' . $path); - } else { - $io->write('Failed to set permissions on ' . $path); - } - }; - - $walker = function ($dir) use (&$walker, $changePerms) { - $files = array_diff(scandir($dir), ['.', '..']); - foreach ($files as $file) { - $path = $dir . '/' . $file; - - if (!is_dir($path)) { - continue; - } - - $changePerms($path); - $walker($path); - } - }; - - $walker($dir . '/tmp'); - $changePerms($dir . '/tmp'); - $changePerms($dir . '/logs'); - } - - /** - * Set the security.salt value in the application's config file. - * - * @param string $dir The application's root directory. - * @param \Composer\IO\IOInterface $io IO interface to write to console. - * @return void - */ - public static function setSecuritySalt($dir, $io) - { - $newKey = hash('sha256', Security::randomBytes(64)); - static::setSecuritySaltInFile($dir, $io, $newKey, 'app_local.php'); - } - - /** - * Set the security.salt value in a given file - * - * @param string $dir The application's root directory. - * @param \Composer\IO\IOInterface $io IO interface to write to console. - * @param string $newKey key to set in the file - * @param string $file A path to a file relative to the application's root - * @return void - */ - public static function setSecuritySaltInFile($dir, $io, $newKey, $file) - { - $config = $dir . '/config/' . $file; - $content = file_get_contents($config); - - $content = str_replace('__SALT__', $newKey, $content, $count); - - if ($count == 0) { - $io->write('No Security.salt placeholder to replace.'); - - return; - } - - $result = file_put_contents($config, $content); - if ($result) { - $io->write('Updated Security.salt value in config/' . $file); - - return; - } - $io->write('Unable to update Security.salt value.'); - } - - /** - * Set the APP_NAME value in a given file - * - * @param string $dir The application's root directory. - * @param \Composer\IO\IOInterface $io IO interface to write to console. - * @param string $appName app name to set in the file - * @param string $file A path to a file relative to the application's root - * @return void - */ - public static function setAppNameInFile($dir, $io, $appName, $file) - { - $config = $dir . '/config/' . $file; - $content = file_get_contents($config); - $content = str_replace('__APP_NAME__', $appName, $content, $count); - - if ($count == 0) { - $io->write('No __APP_NAME__ placeholder to replace.'); - - return; - } - - $result = file_put_contents($config, $content); - if ($result) { - $io->write('Updated __APP_NAME__ value in config/' . $file); - - return; - } - $io->write('Unable to update __APP_NAME__ value.'); - } -} diff --git a/fixtures/cake_remote_deps/src/Controller/AppController.php b/fixtures/cake_remote_deps/src/Controller/AppController.php deleted file mode 100644 index 809c93d43..000000000 --- a/fixtures/cake_remote_deps/src/Controller/AppController.php +++ /dev/null @@ -1,53 +0,0 @@ -loadComponent('FormProtection');` - * - * @return void - */ - public function initialize(): void - { - parent::initialize(); - - $this->loadComponent('RequestHandler'); - $this->loadComponent('Flash'); - - /* - * Enable the following component for recommended CakePHP form protection settings. - * see https://book.cakephp.org/4/en/controllers/components/form-protection.html - */ - //$this->loadComponent('FormProtection'); - } -} diff --git a/fixtures/cake_remote_deps/src/Controller/ErrorController.php b/fixtures/cake_remote_deps/src/Controller/ErrorController.php deleted file mode 100644 index 27dfde501..000000000 --- a/fixtures/cake_remote_deps/src/Controller/ErrorController.php +++ /dev/null @@ -1,70 +0,0 @@ -loadComponent('RequestHandler'); - } - - /** - * beforeFilter callback. - * - * @param \Cake\Event\EventInterface $event Event. - * @return \Cake\Http\Response|null|void - */ - public function beforeFilter(EventInterface $event) - { - } - - /** - * beforeRender callback. - * - * @param \Cake\Event\EventInterface $event Event. - * @return \Cake\Http\Response|null|void - */ - public function beforeRender(EventInterface $event) - { - parent::beforeRender($event); - - $this->viewBuilder()->setTemplatePath('Error'); - } - - /** - * afterFilter callback. - * - * @param \Cake\Event\EventInterface $event Event. - * @return \Cake\Http\Response|null|void - */ - public function afterFilter(EventInterface $event) - { - } -} diff --git a/fixtures/cake_remote_deps/src/Controller/PagesController.php b/fixtures/cake_remote_deps/src/Controller/PagesController.php deleted file mode 100644 index a51bd4b38..000000000 --- a/fixtures/cake_remote_deps/src/Controller/PagesController.php +++ /dev/null @@ -1,73 +0,0 @@ -redirect('/'); - } - if (in_array('..', $path, true) || in_array('.', $path, true)) { - throw new ForbiddenException(); - } - $page = $subpage = null; - - if (!empty($path[0])) { - $page = $path[0]; - } - if (!empty($path[1])) { - $subpage = $path[1]; - } - $this->set(compact('page', 'subpage')); - - try { - return $this->render(implode('/', $path)); - } catch (MissingTemplateException $exception) { - if (Configure::read('debug')) { - throw $exception; - } - throw new NotFoundException(); - } - } -} diff --git a/fixtures/cake_remote_deps/src/Controller/UsersController.php b/fixtures/cake_remote_deps/src/Controller/UsersController.php deleted file mode 100644 index 1769c1a22..000000000 --- a/fixtures/cake_remote_deps/src/Controller/UsersController.php +++ /dev/null @@ -1,37 +0,0 @@ -loadModel("Users"); - } - - public function listUsers() - { - $users = $this->Users->find()->all()->toList(); - $this->set("title", "List Users"); - $this->set(compact("users")); - } - - public function addUser() - { - $user = $this->Users->newEmptyEntity(); - if ($this->request->is('post')) { - $user = $this->Users->patchEntity($user, $this->request->getData()); - if ($this->Users->save($user)) { - $this->Flash->success(__('The user has been created.')); - return $this->redirect(['action' => 'listUsers']); - } - $this->Flash->error(__('Failed to create user. Please, try again.')); - } - $this->set("title", "Add User"); - $this->set(compact("user")); - } -} diff --git a/fixtures/cake_remote_deps/src/Model/Entity/User.php b/fixtures/cake_remote_deps/src/Model/Entity/User.php deleted file mode 100644 index abb55a091..000000000 --- a/fixtures/cake_remote_deps/src/Model/Entity/User.php +++ /dev/null @@ -1,14 +0,0 @@ - true, - "email" => true, - "phone_no" => true - ]; -} diff --git a/fixtures/cake_remote_deps/src/Model/Table/UsersTable.php b/fixtures/cake_remote_deps/src/Model/Table/UsersTable.php deleted file mode 100644 index 93963e41e..000000000 --- a/fixtures/cake_remote_deps/src/Model/Table/UsersTable.php +++ /dev/null @@ -1,13 +0,0 @@ -setTable("users"); - } -} diff --git a/fixtures/cake_remote_deps/src/View/AjaxView.php b/fixtures/cake_remote_deps/src/View/AjaxView.php deleted file mode 100644 index dd9d7d984..000000000 --- a/fixtures/cake_remote_deps/src/View/AjaxView.php +++ /dev/null @@ -1,46 +0,0 @@ -response = $this->response->withType('ajax'); - } -} diff --git a/fixtures/cake_remote_deps/src/View/AppView.php b/fixtures/cake_remote_deps/src/View/AppView.php deleted file mode 100644 index 7ccc7c2e9..000000000 --- a/fixtures/cake_remote_deps/src/View/AppView.php +++ /dev/null @@ -1,41 +0,0 @@ -loadHelper('Html');` - * - * @return void - */ - public function initialize(): void - { - } -} diff --git a/fixtures/cake_remote_deps/src/View/Cell/.gitkeep b/fixtures/cake_remote_deps/src/View/Cell/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/fixtures/cake_remote_deps/src/View/Helper/.gitkeep b/fixtures/cake_remote_deps/src/View/Helper/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/fixtures/cake_remote_deps/templates/Error/error400.php b/fixtures/cake_remote_deps/templates/Error/error400.php deleted file mode 100644 index 68c0e6341..000000000 --- a/fixtures/cake_remote_deps/templates/Error/error400.php +++ /dev/null @@ -1,41 +0,0 @@ -layout = 'error'; - -if (Configure::read('debug')) : - $this->layout = 'dev_error'; - - $this->assign('title', $message); - $this->assign('templateName', 'error400.php'); - - $this->start('file'); -?> -queryString)) : ?> -

- SQL Query: - queryString) ?> -

- -params)) : ?> - SQL Query Params: - params) ?> - -element('auto_table_warning') ?> -end(); -endif; -?> -

-

- : - '{$url}'") ?> -

diff --git a/fixtures/cake_remote_deps/templates/Error/error500.php b/fixtures/cake_remote_deps/templates/Error/error500.php deleted file mode 100644 index 0295c760d..000000000 --- a/fixtures/cake_remote_deps/templates/Error/error500.php +++ /dev/null @@ -1,45 +0,0 @@ -layout = 'error'; - -if (Configure::read('debug')) : - $this->layout = 'dev_error'; - - $this->assign('title', $message); - $this->assign('templateName', 'error500.php'); - - $this->start('file'); -?> -queryString)) : ?> -

- SQL Query: - queryString) ?> -

- -params)) : ?> - SQL Query Params: - params) ?> - - - Error in: - getFile()), $error->getLine()) ?> - -element('auto_table_warning'); - - $this->end(); -endif; -?> -

-

- : - -

diff --git a/fixtures/cake_remote_deps/templates/Pages/home.php b/fixtures/cake_remote_deps/templates/Pages/home.php deleted file mode 100644 index 920fbfd75..000000000 --- a/fixtures/cake_remote_deps/templates/Pages/home.php +++ /dev/null @@ -1,233 +0,0 @@ -disableAutoLayout(); - -$checkConnection = function (string $name) { - $error = null; - $connected = false; - try { - $connection = ConnectionManager::get($name); - $connected = $connection->connect(); - } catch (Exception $connectionError) { - $error = $connectionError->getMessage(); - if (method_exists($connectionError, 'getAttributes')) { - $attributes = $connectionError->getAttributes(); - if (isset($attributes['message'])) { - $error .= '
' . $attributes['message']; - } - } - } - - return compact('connected', 'error'); -}; - -if (!Configure::read('debug')) : - throw new NotFoundException( - 'Please replace templates/Pages/home.php with your own version or re-enable debug mode.' - ); -endif; - -?> - - - - Html->charset() ?> - - - CakePHP: the rapid development PHP framework: - <?= $this->fetch('title') ?> - - Html->meta('icon') ?> - - - - Html->css(['normalize.min', 'milligram.min', 'cake', 'home']) ?> - - fetch('meta') ?> - fetch('css') ?> - fetch('script') ?> - - -
-
- - CakePHP - -

- Welcome to CakePHP Strawberry (ðŸ“) -

-
-
-
-
-
-
-
-
- Please be aware that this page will not be shown if you turn off debug mode unless you replace templates/Pages/home.php with your own version. -
-
- -
- -
-
-
-
-

Environment

-
    - =')) : ?> -
  • Your version of PHP is 7.4.0 or higher (detected ).
  • - -
  • Your version of PHP is too low. You need PHP 7.4.0 or higher to use CakePHP (detected ).
  • - - - -
  • Your version of PHP has the mbstring extension loaded.
  • - -
  • Your version of PHP does NOT have the mbstring extension loaded.
  • - - - -
  • Your version of PHP has the openssl extension loaded.
  • - -
  • Your version of PHP has the mcrypt extension loaded.
  • - -
  • Your version of PHP does NOT have the openssl or mcrypt extension loaded.
  • - - - -
  • Your version of PHP has the intl extension loaded.
  • - -
  • Your version of PHP does NOT have the intl extension loaded.
  • - -
-
-
-

Filesystem

-
    - -
  • Your tmp directory is writable.
  • - -
  • Your tmp directory is NOT writable.
  • - - - -
  • Your logs directory is writable.
  • - -
  • Your logs directory is NOT writable.
  • - - - - -
  • The is being used for core caching. To change the config edit config/app.php
  • - -
  • Your cache is NOT working. Please check the settings in config/app.php
  • - -
-
-
-
-
-
-

Database

- -
    - -
  • CakePHP is able to connect to the database.
  • - -
  • CakePHP is NOT able to connect to the database.
  • - -
-
-
-

DebugKit

-
    - -
  • DebugKit is loaded.
  • - - -
  • DebugKit can connect to the database.
  • - -
  • DebugKit is not able to connect to the database.
  • - - -
  • DebugKit is not loaded.
  • - -
-
-
-
-
- -
-
-
- -
-
- -
-
- -
-
-
-
- - diff --git a/fixtures/cake_remote_deps/templates/Users/add_user.php b/fixtures/cake_remote_deps/templates/Users/add_user.php deleted file mode 100644 index b933182ca..000000000 --- a/fixtures/cake_remote_deps/templates/Users/add_user.php +++ /dev/null @@ -1,40 +0,0 @@ -

Add User

-Form->create($user, [ - "id" => "frm-add-branch" -]) ?> -
-
- -
- - -
-
-
- -
- - -
-
-
-
-
- -
- - -
-
-
- - -
-
- -
- -
-
-
- Form->end() ?> diff --git a/fixtures/cake_remote_deps/templates/Users/list_users.php b/fixtures/cake_remote_deps/templates/Users/list_users.php deleted file mode 100644 index 7624c67ee..000000000 --- a/fixtures/cake_remote_deps/templates/Users/list_users.php +++ /dev/null @@ -1,34 +0,0 @@ -

List Users

- - - - - - - - - - - - - - - 0) { - foreach ($users as $index => $data) { - ?> - - - - - - - - - -
Add User
IDNameEmailPhone NoAction
id ?>name ?>email ?>phone_no ?> -
-
diff --git a/fixtures/cake_remote_deps/templates/cell/.gitkeep b/fixtures/cake_remote_deps/templates/cell/.gitkeep deleted file mode 100644 index 8b1378917..000000000 --- a/fixtures/cake_remote_deps/templates/cell/.gitkeep +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/cake_remote_deps/templates/element/flash/default.php b/fixtures/cake_remote_deps/templates/element/flash/default.php deleted file mode 100644 index 061c70092..000000000 --- a/fixtures/cake_remote_deps/templates/element/flash/default.php +++ /dev/null @@ -1,15 +0,0 @@ - -
diff --git a/fixtures/cake_remote_deps/templates/element/flash/error.php b/fixtures/cake_remote_deps/templates/element/flash/error.php deleted file mode 100644 index 2ebf2357c..000000000 --- a/fixtures/cake_remote_deps/templates/element/flash/error.php +++ /dev/null @@ -1,11 +0,0 @@ - -
diff --git a/fixtures/cake_remote_deps/templates/element/flash/info.php b/fixtures/cake_remote_deps/templates/element/flash/info.php deleted file mode 100644 index e25b730c4..000000000 --- a/fixtures/cake_remote_deps/templates/element/flash/info.php +++ /dev/null @@ -1,11 +0,0 @@ - -
diff --git a/fixtures/cake_remote_deps/templates/element/flash/success.php b/fixtures/cake_remote_deps/templates/element/flash/success.php deleted file mode 100644 index 73eaac48d..000000000 --- a/fixtures/cake_remote_deps/templates/element/flash/success.php +++ /dev/null @@ -1,11 +0,0 @@ - -
diff --git a/fixtures/cake_remote_deps/templates/element/flash/warning.php b/fixtures/cake_remote_deps/templates/element/flash/warning.php deleted file mode 100644 index 605537c7e..000000000 --- a/fixtures/cake_remote_deps/templates/element/flash/warning.php +++ /dev/null @@ -1,11 +0,0 @@ - -
diff --git a/fixtures/cake_remote_deps/templates/email/html/default.php b/fixtures/cake_remote_deps/templates/email/html/default.php deleted file mode 100644 index bf4c13188..000000000 --- a/fixtures/cake_remote_deps/templates/email/html/default.php +++ /dev/null @@ -1,22 +0,0 @@ - ' . $line . "

\n"; -endforeach; diff --git a/fixtures/cake_remote_deps/templates/email/text/default.php b/fixtures/cake_remote_deps/templates/email/text/default.php deleted file mode 100644 index bb8461e66..000000000 --- a/fixtures/cake_remote_deps/templates/email/text/default.php +++ /dev/null @@ -1,18 +0,0 @@ -fetch('content'); diff --git a/fixtures/cake_remote_deps/templates/layout/default.php b/fixtures/cake_remote_deps/templates/layout/default.php deleted file mode 100644 index 41471b1f5..000000000 --- a/fixtures/cake_remote_deps/templates/layout/default.php +++ /dev/null @@ -1,57 +0,0 @@ - - - - - Html->charset() ?> - - - <?= $cakeDescription ?>: - <?= $this->fetch('title') ?> - - Html->meta('icon') ?> - - - - Html->css(['normalize.min', 'milligram.min', 'cake']) ?> - - fetch('meta') ?> - fetch('css') ?> - fetch('script') ?> - - - -
-
- Flash->render() ?> - fetch('content') ?> -
-
-
-
- - diff --git a/fixtures/cake_remote_deps/templates/layout/email/html/default.php b/fixtures/cake_remote_deps/templates/layout/email/html/default.php deleted file mode 100644 index 96b0e7318..000000000 --- a/fixtures/cake_remote_deps/templates/layout/email/html/default.php +++ /dev/null @@ -1,25 +0,0 @@ - - - - - <?= $this->fetch('title') ?> - - - fetch('content') ?> - - diff --git a/fixtures/cake_remote_deps/templates/layout/email/text/default.php b/fixtures/cake_remote_deps/templates/layout/email/text/default.php deleted file mode 100644 index cd51169db..000000000 --- a/fixtures/cake_remote_deps/templates/layout/email/text/default.php +++ /dev/null @@ -1,17 +0,0 @@ -fetch('content'); diff --git a/fixtures/cake_remote_deps/templates/layout/error.php b/fixtures/cake_remote_deps/templates/layout/error.php deleted file mode 100644 index 28c09bac4..000000000 --- a/fixtures/cake_remote_deps/templates/layout/error.php +++ /dev/null @@ -1,41 +0,0 @@ - - - - - Html->charset() ?> - - <?= $this->fetch('title') ?> - - Html->meta('icon') ?> - - - - Html->css(['normalize.min', 'milligram.min', 'cake']) ?> - - fetch('meta') ?> - fetch('css') ?> - fetch('script') ?> - - -
- Flash->render() ?> - fetch('content') ?> - Html->link(__('Back'), 'javascript:history.back()') ?> -
- - diff --git a/fixtures/cake_remote_deps/tests/Fixture/.gitkeep b/fixtures/cake_remote_deps/tests/Fixture/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/fixtures/cake_remote_deps/tests/TestCase/ApplicationTest.php b/fixtures/cake_remote_deps/tests/TestCase/ApplicationTest.php deleted file mode 100644 index 7c42d856d..000000000 --- a/fixtures/cake_remote_deps/tests/TestCase/ApplicationTest.php +++ /dev/null @@ -1,106 +0,0 @@ -bootstrap(); - $plugins = $app->getPlugins(); - - $this->assertTrue($plugins->has('Bake'), 'plugins has Bake?'); - $this->assertFalse($plugins->has('DebugKit'), 'plugins has DebugKit?'); - $this->assertTrue($plugins->has('Migrations'), 'plugins has Migrations?'); - } - - /** - * Test bootstrap add DebugKit plugin in debug mode. - * - * @return void - */ - public function testBootstrapInDebug() - { - Configure::write('debug', true); - $app = new Application(dirname(dirname(__DIR__)) . '/config'); - $app->bootstrap(); - $plugins = $app->getPlugins(); - - $this->assertTrue($plugins->has('DebugKit'), 'plugins has DebugKit?'); - } - - /** - * testBootstrapPluginWitoutHalt - * - * @return void - */ - public function testBootstrapPluginWithoutHalt() - { - $this->expectException(InvalidArgumentException::class); - - $app = $this->getMockBuilder(Application::class) - ->setConstructorArgs([dirname(dirname(__DIR__)) . '/config']) - ->onlyMethods(['addPlugin']) - ->getMock(); - - $app->method('addPlugin') - ->will($this->throwException(new InvalidArgumentException('test exception.'))); - - $app->bootstrap(); - } - - /** - * testMiddleware - * - * @return void - */ - public function testMiddleware() - { - $app = new Application(dirname(dirname(__DIR__)) . '/config'); - $middleware = new MiddlewareQueue(); - - $middleware = $app->middleware($middleware); - - $this->assertInstanceOf(ErrorHandlerMiddleware::class, $middleware->current()); - $middleware->seek(1); - $this->assertInstanceOf(AssetMiddleware::class, $middleware->current()); - $middleware->seek(2); - $this->assertInstanceOf(RoutingMiddleware::class, $middleware->current()); - } -} diff --git a/fixtures/cake_remote_deps/tests/TestCase/Controller/Component/.gitkeep b/fixtures/cake_remote_deps/tests/TestCase/Controller/Component/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/fixtures/cake_remote_deps/tests/TestCase/Controller/PagesControllerTest.php b/fixtures/cake_remote_deps/tests/TestCase/Controller/PagesControllerTest.php deleted file mode 100644 index 407d6d8f2..000000000 --- a/fixtures/cake_remote_deps/tests/TestCase/Controller/PagesControllerTest.php +++ /dev/null @@ -1,115 +0,0 @@ -get('/pages/home'); - $this->assertResponseOk(); - $this->assertResponseContains('CakePHP'); - $this->assertResponseContains(''); - } - - /** - * Test that missing template renders 404 page in production - * - * @return void - */ - public function testMissingTemplate() - { - Configure::write('debug', false); - $this->get('/pages/not_existing'); - - $this->assertResponseError(); - $this->assertResponseContains('Error'); - } - - /** - * Test that missing template in debug mode renders missing_template error page - * - * @return void - */ - public function testMissingTemplateInDebug() - { - Configure::write('debug', true); - $this->get('/pages/not_existing'); - - $this->assertResponseFailure(); - $this->assertResponseContains('Missing Template'); - $this->assertResponseContains('Stacktrace'); - $this->assertResponseContains('not_existing.php'); - } - - /** - * Test directory traversal protection - * - * @return void - */ - public function testDirectoryTraversalProtection() - { - $this->get('/pages/../Layout/ajax'); - $this->assertResponseCode(403); - $this->assertResponseContains('Forbidden'); - } - - /** - * Test that CSRF protection is applied to page rendering. - * - * @return void - */ - public function testCsrfAppliedError() - { - $this->post('/pages/home', ['hello' => 'world']); - - $this->assertResponseCode(403); - $this->assertResponseContains('CSRF'); - } - - /** - * Test that CSRF protection is applied to page rendering. - * - * @return void - */ - public function testCsrfAppliedOk() - { - $this->enableCsrfToken(); - $this->post('/pages/home', ['hello' => 'world']); - - $this->assertThat(403, $this->logicalNot(new StatusCode($this->_response))); - $this->assertResponseNotContains('CSRF'); - } -} diff --git a/fixtures/cake_remote_deps/tests/TestCase/Model/Behavior/.gitkeep b/fixtures/cake_remote_deps/tests/TestCase/Model/Behavior/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/fixtures/cake_remote_deps/tests/TestCase/View/Helper/.gitkeep b/fixtures/cake_remote_deps/tests/TestCase/View/Helper/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/fixtures/cake_remote_deps/tests/bootstrap.php b/fixtures/cake_remote_deps/tests/bootstrap.php deleted file mode 100644 index 79e191875..000000000 --- a/fixtures/cake_remote_deps/tests/bootstrap.php +++ /dev/null @@ -1,65 +0,0 @@ - 'Cake\Database\Connection', - 'driver' => 'Cake\Database\Driver\Sqlite', - 'database' => TMP . 'debug_kit.sqlite', - 'encoding' => 'utf8', - 'cacheMetadata' => true, - 'quoteIdentifiers' => false, -]); - -ConnectionManager::alias('test_debug_kit', 'debug_kit'); - -// Fixate sessionid early on, as php7.2+ -// does not allow the sessionid to be set after stdout -// has been written to. -session_id('cli'); - -// Use migrations to build test database schema. -// -// Will rebuild the database if the migration state differs -// from the migration history in files. -// -// If you are not using CakePHP's migrations you can -// hook into your migration tool of choice here or -// load schema from a SQL dump file with -// use Cake\TestSuite\Fixture\SchemaLoader; -// (new SchemaLoader())->loadSqlFiles('./tests/schema.sql', 'test'); -(new Migrator())->run(); diff --git a/fixtures/cake_remote_deps/tests/schema.sql b/fixtures/cake_remote_deps/tests/schema.sql deleted file mode 100644 index c7e4d3f7e..000000000 --- a/fixtures/cake_remote_deps/tests/schema.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Test database schema. --- --- If you are not using CakePHP migrations you can put --- your application's schema in this file and use it in tests. diff --git a/fixtures/cake_remote_deps/webroot/.htaccess b/fixtures/cake_remote_deps/webroot/.htaccess deleted file mode 100644 index f5f2d631c..000000000 --- a/fixtures/cake_remote_deps/webroot/.htaccess +++ /dev/null @@ -1,5 +0,0 @@ - - RewriteEngine On - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^ index.php [L] - diff --git a/fixtures/cake_remote_deps/webroot/css/cake.css b/fixtures/cake_remote_deps/webroot/css/cake.css deleted file mode 100644 index 10b928937..000000000 --- a/fixtures/cake_remote_deps/webroot/css/cake.css +++ /dev/null @@ -1,221 +0,0 @@ -/* Miligram overrides */ -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: 400; -} - -.top-nav-links, -.side-nav, -h1, h2, h3, h4, h5, h6 { - font-family: "Raleway", sans-serif; -} - -h1, h2, h3, h4, h5, h6 { - font-weight: 400; - color: #363637; -} - -a { - color:#2f85ae; - -webkit-transition:all 0.2s linear; - transition:all 0.2s linear; -} - -a:hover, -a:focus, -a:active { - color:#2a6496; - -webkit-transition:all 0.2s easeout; - transition:all 0.2s ease-out; -} - -.side-nav a, -.top-nav-links a, -th a, -.actions a { - color: #606c76; -} - -.side-nav a:hover, -.side-nav a:focus, -.actions a:hover, -.actions a:focus { - color:#2f85ae; -} - -/* Utility */ -.table-responsive { - display: block; - width: 100%; - overflow-x: auto; - -webkit-overflow-scrolling: touch; -} - -/* Main */ -body { - background: #f5f7fa; -} -.content { - padding: 2rem; - background: #ffffff; - border-radius: 0.4rem; - /* Thanks Stripe */ - box-shadow: 0 7px 14px 0 rgba(60, 66, 87, 0.1), - 0 3px 6px 0 rgba(0, 0, 0, 0.07); -} -.actions a { - font-weight: bold; - padding: 0 0.4rem; -} -th { - white-space: nowrap; -} - -/* Nav bar */ -.top-nav { - display: flex; - align-items: center; - justify-content: space-between; - max-width: 112rem; - padding: 2rem; - margin: 0 auto 2rem; -} -.top-nav-title a { - font-size: 2.4rem; - color: #d33c43; -} -.top-nav-title span { - color: #404041; -} -.top-nav-links a { - margin: 0 0.5rem; -} -.top-nav-title a, -.top-nav-links a { - font-weight: bold; -} - -.side-nav-item { - display: block; - padding: 0.5rem 0; -} - -/* View action */ -.view.content .text { - margin-top: 1.2rem; -} -.related { - margin-top: 2rem; -} - -/* Flash messages */ -.message { - padding: 1rem; - - background: #eff8ff; - color: #2779bd; - - border-color: #6cb2eb; - border-width: 1px; - border-style: solid; - border-radius: 4px; - margin-bottom: 2rem; -} -.message.hidden { - display: none; -} -.message.success { - background: #e3fcec; - color: #1f9d55; - border-color: #51d88a; -} -.message.warning { - background: #fffabc; - color: #8d7b00; - border-color: #d3b800; -} -.message.error { - background: #fcebea; - color: #cc1f1a; - border-color: #ef5753; -} - -/* Forms */ -.input.radio, -.input.checkbox { - margin-bottom: 2.0rem; -} -.input.radio input, -.input.checkbox input { - margin: 0; -} -.input.radio label, -.input.checkbox label { - margin: 0; - display: flex; - align-items: center; -} -.input.radio label > input, -.input.checkbox label > input { - margin-right: 1.0rem; -} -.input.radio label:first-of-type { - margin-bottom: 2.0rem; -} - -/* Paginator */ -.paginator { - text-align: right; -} -.pagination { - display: flex; - justify-content: center; - list-style: none; - padding: 0; - margin: 0 0 1rem; -} -.pagination li { - margin: 0 0.5rem; -} -.prev.disabled a, -.next.disabled a { - cursor: not-allowed; - color: #606c76; -} -.asc:after { - content: " \2193"; -} -.desc:after { - content: " \2191"; -} - -/* Error */ -.error-container { - align-items: center; - display: flex; - flex-direction: column; - height: 100vh; - justify-content: center; -} - -@media screen and (max-width: 640px) { - .top-nav { - margin: 0 auto; - } - .side-nav { - margin-bottom: 1rem; - } - .heading { - margin-bottom: 1rem; - } - .side-nav-item { - display: inline; - margin: 0 1.5rem 0 0; - } - .asc:after { - content: " \2192"; - } - .desc:after { - content: " \2190"; - } -} diff --git a/fixtures/cake_remote_deps/webroot/css/home.css b/fixtures/cake_remote_deps/webroot/css/home.css deleted file mode 100644 index 4648ed314..000000000 --- a/fixtures/cake_remote_deps/webroot/css/home.css +++ /dev/null @@ -1,75 +0,0 @@ -/* Home page styles */ -@font-face { - font-family: 'cakefont'; - src: url('../font/cakedingbats-webfont.eot'); - src: url('../font/cakedingbats-webfont.eot?#iefix') format('embedded-opentype'), - url('../font/cakedingbats-webfont.woff2') format('woff2'), - url('../font/cakedingbats-webfont.woff') format('woff'), - url('../font/cakedingbats-webfont.ttf') format('truetype'), - url('../font/cakedingbats-webfont.svg#cake_dingbatsregular') format('svg'); - font-weight: normal; - font-style: normal; -} -body { - padding: 60px 0; -} -header { - margin-bottom: 60px; -} -img { - margin-bottom: 30px; -} -h1 { - font-weight: bold; -} -ul { - list-style-type: none; - margin: 0 0 30px 0; - padding-left: 25px; -} -a { - color: #0071BC; - text-decoration: underline; -} -hr { - border-bottom: 1px solid #e7e7e7; - border-top: 0; - margin-bottom: 35px; -} - -.text-center { - text-align: center; -} -.links a { - margin-right: 10px; -} -.release-name { - color: #D33C43; - font-weight: 400; - font-style: italic; -} -.bullet:before { - font-family: 'cakefont', sans-serif; - font-size: 18px; - display: inline-block; - margin-left: -1.3em; - width: 1.2em; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - vertical-align: -1px; -} -.success:before { - color: #88c671; - content: "\0056"; -} -.problem:before { - color: #d33d44; - content: "\0057"; -} -.cake-error { - padding: 10px; - margin: 10px 0; -} -#url-rewriting-warning { - display: none; -} diff --git a/fixtures/cake_remote_deps/webroot/css/milligram.min.css b/fixtures/cake_remote_deps/webroot/css/milligram.min.css deleted file mode 100644 index 9d93dc57e..000000000 --- a/fixtures/cake_remote_deps/webroot/css/milligram.min.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Milligram v1.3.0 - * https://milligram.io - * - * Copyright (c) 2019 CJ Patoilo - * Licensed under the MIT license - */ - -*,*:after,*:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:#606c76;font-family:'Roboto', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;font-size:1.6em;font-weight:300;letter-spacing:.01em;line-height:1.6}blockquote{border-left:0.3rem solid #d1d1d1;margin-left:0;margin-right:0;padding:1rem 1.5rem}blockquote *:last-child{margin-bottom:0}.button,button,input[type='button'],input[type='reset'],input[type='submit']{background-color:#d33c43;border:0.1rem solid #d33c43;border-radius:.4rem;color:#fff;cursor:pointer;display:inline-block;font-size:1.1rem;font-weight:700;height:3.8rem;letter-spacing:.1rem;line-height:3.8rem;padding:0 3.0rem;text-align:center;text-decoration:none;text-transform:uppercase;white-space:nowrap}.button:focus,.button:hover,button:focus,button:hover,input[type='button']:focus,input[type='button']:hover,input[type='reset']:focus,input[type='reset']:hover,input[type='submit']:focus,input[type='submit']:hover{background-color:#606c76;border-color:#606c76;color:#fff;outline:0}.button[disabled],button[disabled],input[type='button'][disabled],input[type='reset'][disabled],input[type='submit'][disabled]{cursor:default;opacity:.5}.button[disabled]:focus,.button[disabled]:hover,button[disabled]:focus,button[disabled]:hover,input[type='button'][disabled]:focus,input[type='button'][disabled]:hover,input[type='reset'][disabled]:focus,input[type='reset'][disabled]:hover,input[type='submit'][disabled]:focus,input[type='submit'][disabled]:hover{background-color:#d33c43;border-color:#d33c43}.button.button-outline,button.button-outline,input[type='button'].button-outline,input[type='reset'].button-outline,input[type='submit'].button-outline{background-color:transparent;color:#d33c43}.button.button-outline:focus,.button.button-outline:hover,button.button-outline:focus,button.button-outline:hover,input[type='button'].button-outline:focus,input[type='button'].button-outline:hover,input[type='reset'].button-outline:focus,input[type='reset'].button-outline:hover,input[type='submit'].button-outline:focus,input[type='submit'].button-outline:hover{background-color:transparent;border-color:#606c76;color:#606c76}.button.button-outline[disabled]:focus,.button.button-outline[disabled]:hover,button.button-outline[disabled]:focus,button.button-outline[disabled]:hover,input[type='button'].button-outline[disabled]:focus,input[type='button'].button-outline[disabled]:hover,input[type='reset'].button-outline[disabled]:focus,input[type='reset'].button-outline[disabled]:hover,input[type='submit'].button-outline[disabled]:focus,input[type='submit'].button-outline[disabled]:hover{border-color:inherit;color:#d33c43}.button.button-clear,button.button-clear,input[type='button'].button-clear,input[type='reset'].button-clear,input[type='submit'].button-clear{background-color:transparent;border-color:transparent;color:#d33c43}.button.button-clear:focus,.button.button-clear:hover,button.button-clear:focus,button.button-clear:hover,input[type='button'].button-clear:focus,input[type='button'].button-clear:hover,input[type='reset'].button-clear:focus,input[type='reset'].button-clear:hover,input[type='submit'].button-clear:focus,input[type='submit'].button-clear:hover{background-color:transparent;border-color:transparent;color:#606c76}.button.button-clear[disabled]:focus,.button.button-clear[disabled]:hover,button.button-clear[disabled]:focus,button.button-clear[disabled]:hover,input[type='button'].button-clear[disabled]:focus,input[type='button'].button-clear[disabled]:hover,input[type='reset'].button-clear[disabled]:focus,input[type='reset'].button-clear[disabled]:hover,input[type='submit'].button-clear[disabled]:focus,input[type='submit'].button-clear[disabled]:hover{color:#d33c43}code{background:#f4f5f6;border-radius:.4rem;font-size:86%;margin:0 .2rem;padding:.2rem .5rem;white-space:nowrap}pre{background:#f4f5f6;border-left:0.3rem solid #d33c43;overflow-y:hidden}pre>code{border-radius:0;display:block;padding:1rem 1.5rem;white-space:pre}hr{border:0;border-top:0.1rem solid #f4f5f6;margin:3.0rem 0}input[type='email'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='url'],input[type='color'],input[type='date'],input[type='month'],input[type='week'],input[type='datetime'],input[type='datetime-local'],input:not([type]),textarea,select{background-color:transparent;border:0.1rem solid #d1d1d1;border-radius:.4rem;box-shadow:none;box-sizing:inherit;height:3.8rem;padding:.6rem 1.0rem;width:100%}input[type='email']:focus,input[type='number']:focus,input[type='password']:focus,input[type='search']:focus,input[type='tel']:focus,input[type='text']:focus,input[type='url']:focus,input[type='color']:focus,input[type='date']:focus,input[type='month']:focus,input[type='week']:focus,input[type='datetime']:focus,input[type='datetime-local']:focus,input:not([type]):focus,textarea:focus,select:focus{border-color:#606c76;outline:0}select{padding-right:3.0rem}textarea{min-height:6.5rem}label,legend{display:block;font-size:2.0rem;font-weight:700;margin-bottom:2.0rem}fieldset{border-width:0;padding:0}input[type='checkbox'],input[type='radio']{display:inline}.label-inline{display:inline-block;font-weight:normal;margin-left:.5rem}.container{margin:0 auto;max-width:112.0rem;padding:0 2.0rem;position:relative;width:100%}.row{display:flex;flex-direction:column;padding:0;width:100%}.row.row-no-padding{padding:0}.row.row-no-padding>.column{padding:0}.row.row-wrap{flex-wrap:wrap}.row.row-top{align-items:flex-start}.row.row-bottom{align-items:flex-end}.row.row-center{align-items:center}.row.row-stretch{align-items:stretch}.row.row-baseline{align-items:baseline}.row .column{display:block;flex:1 1 auto;margin-left:0;max-width:100%;width:100%}.row .column.column-offset-10{margin-left:10%}.row .column.column-offset-20{margin-left:20%}.row .column.column-offset-25{margin-left:25%}.row .column.column-offset-33,.row .column.column-offset-34{margin-left:33.3333%}.row .column.column-offset-50{margin-left:50%}.row .column.column-offset-66,.row .column.column-offset-67{margin-left:66.6666%}.row .column.column-offset-75{margin-left:75%}.row .column.column-offset-80{margin-left:80%}.row .column.column-offset-90{margin-left:90%}.row .column.column-10{flex:0 0 10%;max-width:10%}.row .column.column-20{flex:0 0 20%;max-width:20%}.row .column.column-25{flex:0 0 25%;max-width:25%}.row .column.column-33,.row .column.column-34{flex:0 0 33.3333%;max-width:33.3333%}.row .column.column-40{flex:0 0 40%;max-width:40%}.row .column.column-50{flex:0 0 50%;max-width:50%}.row .column.column-60{flex:0 0 60%;max-width:60%}.row .column.column-66,.row .column.column-67{flex:0 0 66.6666%;max-width:66.6666%}.row .column.column-75{flex:0 0 75%;max-width:75%}.row .column.column-80{flex:0 0 80%;max-width:80%}.row .column.column-90{flex:0 0 90%;max-width:90%}.row .column .column-top{align-self:flex-start}.row .column .column-bottom{align-self:flex-end}.row .column .column-center{-ms-grid-row-align:center;align-self:center}.row .column-responsive{display:block;flex:1 1 auto;margin-left:0;max-width:100%;width:100%}@media (min-width: 640px){.row{flex-direction:row;margin-left:-1.0rem;width:calc(100% + 2.0rem)}.row .column{margin-bottom:inherit;padding:0 1.0rem}.row .column-responsive{margin-bottom:inherit;padding:0 1.0rem}.row .column-responsive.column-10{flex:0 0 10%;max-width:10%}.row .column-responsive.column-20{flex:0 0 20%;max-width:20%}.row .column-responsive.column-25{flex:0 0 25%;max-width:25%}.row .column-responsive.column-33,.row .column-responsive.column-34{flex:0 0 33.3333%;max-width:33.3333%}.row .column-responsive.column-40{flex:0 0 40%;max-width:40%}.row .column-responsive.column-50{flex:0 0 50%;max-width:50%}.row .column-responsive.column-60{flex:0 0 60%;max-width:60%}.row .column-responsive.column-66,.row .column-responsive.column-67{flex:0 0 66.6666%;max-width:66.6666%}.row .column-responsive.column-75{flex:0 0 75%;max-width:75%}.row .column-responsive.column-80{flex:0 0 80%;max-width:80%}.row .column-responsive.column-90{flex:0 0 90%;max-width:90%}}a{color:#d33c43;text-decoration:none}a:focus,a:hover{color:#606c76}dl,ol,ul{list-style:none;margin-top:0;padding-left:0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{font-size:90%;margin:1.5rem 0 1.5rem 3.0rem}ol{list-style:decimal inside}ul{list-style:circle inside}.button,button,dd,dt,li{margin-bottom:1.0rem}fieldset,input,select,textarea{margin-bottom:1.5rem}blockquote,dl,figure,form,ol,p,pre,table,ul{margin-bottom:0}table{border-spacing:0;width:100%}td,th{border-bottom:0.1rem solid #e1e1e1;padding:1.2rem 1.5rem;text-align:left}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}@media screen and (max-width: 640px){table{border-spacing:0;display:flex;width:100%}table thead{border-right:solid 0.1rem #e1e1e1}table thead td,table thead th{padding-left:0}table thead td:first-child,table thead th:first-child{padding-left:0}table thead td:last-child,table thead th:last-child{padding-right:1.2rem}table tbody{display:flex;overflow-x:auto;white-space:nowrap}table tbody tr{border-right:solid 0.1rem #e1e1e1}table tbody tr:last-child{border-right:none}table td,table th{display:block}table td:first-child,table th:first-child{padding-left:1.2rem}table td:last-child,table th:last-child{padding-right:1.2rem}}b,strong{font-weight:bold}p{margin-top:0}h1,h2,h3,h4,h5,h6{font-weight:300;letter-spacing:-.1rem;margin-bottom:2.0rem;margin-top:0}h1{font-size:4.6rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}h3{font-size:2.8rem;line-height:1.3}h4{font-size:2.2rem;letter-spacing:-.08rem;line-height:1.35}h5{font-size:1.8rem;letter-spacing:-.05rem;line-height:1.5}h6{font-size:1.6rem;letter-spacing:0;line-height:1.4}img{max-width:100%}.clearfix:after{clear:both;content:' ';display:table}.float-left{float:left}.float-right{float:right} diff --git a/fixtures/cake_remote_deps/webroot/css/normalize.min.css b/fixtures/cake_remote_deps/webroot/css/normalize.min.css deleted file mode 100644 index bde07fcb5..000000000 --- a/fixtures/cake_remote_deps/webroot/css/normalize.min.css +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Minified by jsDelivr using clean-css v4.2.1. - * Original file: /npm/normalize.css@8.0.1/normalize.css - * - * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files - */ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} diff --git a/fixtures/cake_remote_deps/webroot/favicon.ico b/fixtures/cake_remote_deps/webroot/favicon.ico deleted file mode 100644 index 49a060fc4..000000000 Binary files a/fixtures/cake_remote_deps/webroot/favicon.ico and /dev/null differ diff --git a/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.eot b/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.eot deleted file mode 100644 index e8605d926..000000000 Binary files a/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.eot and /dev/null differ diff --git a/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.svg b/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.svg deleted file mode 100644 index d1e0c98f7..000000000 --- a/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.ttf b/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.ttf deleted file mode 100644 index 13d54454e..000000000 Binary files a/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.ttf and /dev/null differ diff --git a/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.woff b/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.woff deleted file mode 100644 index 073baab11..000000000 Binary files a/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.woff and /dev/null differ diff --git a/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.woff2 b/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.woff2 deleted file mode 100644 index 6e71eaf53..000000000 Binary files a/fixtures/cake_remote_deps/webroot/font/cakedingbats-webfont.woff2 and /dev/null differ diff --git a/fixtures/cake_remote_deps/webroot/img/cake-logo.png b/fixtures/cake_remote_deps/webroot/img/cake-logo.png deleted file mode 100644 index 41939ef5a..000000000 Binary files a/fixtures/cake_remote_deps/webroot/img/cake-logo.png and /dev/null differ diff --git a/fixtures/cake_remote_deps/webroot/img/cake.icon.png b/fixtures/cake_remote_deps/webroot/img/cake.icon.png deleted file mode 100644 index 394fa42d5..000000000 Binary files a/fixtures/cake_remote_deps/webroot/img/cake.icon.png and /dev/null differ diff --git a/fixtures/cake_remote_deps/webroot/img/cake.logo.svg b/fixtures/cake_remote_deps/webroot/img/cake.logo.svg deleted file mode 100644 index e73abb54b..000000000 --- a/fixtures/cake_remote_deps/webroot/img/cake.logo.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/fixtures/cake_remote_deps/webroot/img/cake.power.gif b/fixtures/cake_remote_deps/webroot/img/cake.power.gif deleted file mode 100644 index 8f8d570a2..000000000 Binary files a/fixtures/cake_remote_deps/webroot/img/cake.power.gif and /dev/null differ diff --git a/fixtures/cake_remote_deps/webroot/index.php b/fixtures/cake_remote_deps/webroot/index.php deleted file mode 100644 index 6bc06dc56..000000000 --- a/fixtures/cake_remote_deps/webroot/index.php +++ /dev/null @@ -1,40 +0,0 @@ -emit($server->run()); diff --git a/fixtures/cake_remote_deps/webroot/js/.gitkeep b/fixtures/cake_remote_deps/webroot/js/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/fixtures/composer_default/composer.json b/fixtures/composer_default/composer.json new file mode 100644 index 000000000..3194c6ddf --- /dev/null +++ b/fixtures/composer_default/composer.json @@ -0,0 +1,7 @@ +{ + "name": "cloudfoundry/composer_app", + "require": { + "vlucas/phpdotenv": "5.3.0", + "php": "8.*" + } +} diff --git a/fixtures/composer_default/composer.lock b/fixtures/composer_default/composer.lock new file mode 100644 index 000000000..cd9a8afa5 --- /dev/null +++ b/fixtures/composer_default/composer.lock @@ -0,0 +1,482 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "1a729e202237407f0b46a456b667efa8", + "packages": [ + { + "name": "graham-campbell/result-type", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "0690bde05318336c7221785f2a932467f98b64ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/0690bde05318336c7221785f2a932467f98b64ca", + "reference": "0690bde05318336c7221785f2a932467f98b64ca", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "phpoption/phpoption": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2021-11-21T21:41:47+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", + "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.8.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2021-12-04T23:24:31+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.25.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "30885182c981ab175d4d034db0f6f469898070ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-10-20T20:35:02+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.25.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-11-30T18:21:41+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.25.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-03-04T08:16:47+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.3.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", + "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.1", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.7.4", + "symfony/polyfill-ctype": "^1.17", + "symfony/polyfill-mbstring": "^1.17", + "symfony/polyfill-php80": "^1.17" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-filter": "*", + "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5.1" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "homepage": "https://gjcampbell.co.uk/" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://vancelucas.com/" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2021-01-20T15:23:13+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "8.*" + }, + "platform-dev": [], + "plugin-api-version": "2.2.0" +} diff --git a/fixtures/composer_default/htdocs/.env b/fixtures/composer_default/htdocs/.env new file mode 100644 index 000000000..59e295b36 --- /dev/null +++ b/fixtures/composer_default/htdocs/.env @@ -0,0 +1 @@ +PROJECT_NAME="Cloud Foundry" diff --git a/fixtures/composer_default/htdocs/index.php b/fixtures/composer_default/htdocs/index.php new file mode 100644 index 000000000..2455526d1 --- /dev/null +++ b/fixtures/composer_default/htdocs/index.php @@ -0,0 +1,19 @@ + + + + Powered By Cloud Foundry + + +load(); + $projectName = $_ENV['PROJECT_NAME']; + echo "

Powered By " . $projectName . " Buildpacks

" +?> + + diff --git a/fixtures/composer_env_sniffer/.bp-config/options.json b/fixtures/composer_env_sniffer/.bp-config/options.json deleted file mode 100644 index 4bd15eabe..000000000 --- a/fixtures/composer_env_sniffer/.bp-config/options.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "WEBDIR": "web", - "COMPOSER_VENDOR_DIR": "vendor" -} diff --git a/fixtures/composer_env_sniffer/composer.json b/fixtures/composer_env_sniffer/composer.json deleted file mode 100644 index 42b87ffcc..000000000 --- a/fixtures/composer_env_sniffer/composer.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scripts": { - "post-install-cmd": [ - "echo \"MANIFEST_VARIABLE: '$MANIFEST_VARIABLE'\"", - "php -r 'print \"PHP said MANIFEST_VARIABLE: \" . getenv(\"MANIFEST_VARIABLE\") . \"\n\";'" - ] - } -} diff --git a/fixtures/composer_env_sniffer/composer.lock b/fixtures/composer_env_sniffer/composer.lock deleted file mode 100644 index ba6fe47d6..000000000 --- a/fixtures/composer_env_sniffer/composer.lock +++ /dev/null @@ -1,18 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "d751713988987e9331980363e24189ce", - "packages": [], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.6.0" -} diff --git a/fixtures/composer_env_sniffer/manifest.yml b/fixtures/composer_env_sniffer/manifest.yml deleted file mode 100644 index 5c9332267..000000000 --- a/fixtures/composer_env_sniffer/manifest.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -applications: - - - name: what_does_it_do - env: - MANIFEST_VARIABLE: "VARIABLE_IS_SET" diff --git a/fixtures/composer_env_sniffer/vendor/autoload.php b/fixtures/composer_env_sniffer/vendor/autoload.php deleted file mode 100644 index 172f1b912..000000000 --- a/fixtures/composer_env_sniffer/vendor/autoload.php +++ /dev/null @@ -1,25 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - /** @var \Closure(string):void */ - private static $includeFile; - - /** @var string|null */ - private $vendorDir; - - // PSR-4 - /** - * @var array> - */ - private $prefixLengthsPsr4 = array(); - /** - * @var array> - */ - private $prefixDirsPsr4 = array(); - /** - * @var list - */ - private $fallbackDirsPsr4 = array(); - - // PSR-0 - /** - * List of PSR-0 prefixes - * - * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) - * - * @var array>> - */ - private $prefixesPsr0 = array(); - /** - * @var list - */ - private $fallbackDirsPsr0 = array(); - - /** @var bool */ - private $useIncludePath = false; - - /** - * @var array - */ - private $classMap = array(); - - /** @var bool */ - private $classMapAuthoritative = false; - - /** - * @var array - */ - private $missingClasses = array(); - - /** @var string|null */ - private $apcuPrefix; - - /** - * @var array - */ - private static $registeredLoaders = array(); - - /** - * @param string|null $vendorDir - */ - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - self::initializeIncludeClosure(); - } - - /** - * @return array> - */ - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); - } - - return array(); - } - - /** - * @return array> - */ - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - /** - * @return list - */ - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - /** - * @return list - */ - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - /** - * @return array Array of classname => path - */ - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - * - * @return void - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - * - * @return void - */ - public function add($prefix, $paths, $prepend = false) - { - $paths = (array) $paths; - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - $paths = (array) $paths; - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 base directories - * - * @return void - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - * - * @return void - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - * - * @return void - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - * - * @return void - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - * - * @return void - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } - } - - /** - * Unregisters this instance as an autoloader. - * - * @return void - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return true|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - $includeFile = self::$includeFile; - $includeFile($file); - - return true; - } - - return null; - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - /** - * Returns the currently registered loaders keyed by their corresponding vendor directories. - * - * @return array - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - - /** - * @param string $class - * @param string $ext - * @return string|false - */ - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } - - /** - * @return void - */ - private static function initializeIncludeClosure() - { - if (self::$includeFile !== null) { - return; - } - - /** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - */ - self::$includeFile = \Closure::bind(static function($file) { - include $file; - }, null, null); - } -} diff --git a/fixtures/composer_env_sniffer/vendor/composer/InstalledVersions.php b/fixtures/composer_env_sniffer/vendor/composer/InstalledVersions.php deleted file mode 100644 index 51e734a77..000000000 --- a/fixtures/composer_env_sniffer/vendor/composer/InstalledVersions.php +++ /dev/null @@ -1,359 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer; - -use Composer\Autoload\ClassLoader; -use Composer\Semver\VersionParser; - -/** - * This class is copied in every Composer installed project and available to all - * - * See also https://getcomposer.org/doc/07-runtime.md#installed-versions - * - * To require its presence, you can require `composer-runtime-api ^2.0` - * - * @final - */ -class InstalledVersions -{ - /** - * @var mixed[]|null - * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null - */ - private static $installed; - - /** - * @var bool|null - */ - private static $canGetVendors; - - /** - * @var array[] - * @psalm-var array}> - */ - private static $installedByVendor = array(); - - /** - * Returns a list of all package names which are present, either by being installed, replaced or provided - * - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackages() - { - $packages = array(); - foreach (self::getInstalled() as $installed) { - $packages[] = array_keys($installed['versions']); - } - - if (1 === \count($packages)) { - return $packages[0]; - } - - return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); - } - - /** - * Returns a list of all package names with a specific type e.g. 'library' - * - * @param string $type - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackagesByType($type) - { - $packagesByType = array(); - - foreach (self::getInstalled() as $installed) { - foreach ($installed['versions'] as $name => $package) { - if (isset($package['type']) && $package['type'] === $type) { - $packagesByType[] = $name; - } - } - } - - return $packagesByType; - } - - /** - * Checks whether the given package is installed - * - * This also returns true if the package name is provided or replaced by another package - * - * @param string $packageName - * @param bool $includeDevRequirements - * @return bool - */ - public static function isInstalled($packageName, $includeDevRequirements = true) - { - foreach (self::getInstalled() as $installed) { - if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; - } - } - - return false; - } - - /** - * Checks whether the given package satisfies a version constraint - * - * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: - * - * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') - * - * @param VersionParser $parser Install composer/semver to have access to this class and functionality - * @param string $packageName - * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package - * @return bool - */ - public static function satisfies(VersionParser $parser, $packageName, $constraint) - { - $constraint = $parser->parseConstraints((string) $constraint); - $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - - return $provided->matches($constraint); - } - - /** - * Returns a version constraint representing all the range(s) which are installed for a given package - * - * It is easier to use this via isInstalled() with the $constraint argument if you need to check - * whether a given version of a package is installed, and not just whether it exists - * - * @param string $packageName - * @return string Version constraint usable with composer/semver - */ - public static function getVersionRanges($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - $ranges = array(); - if (isset($installed['versions'][$packageName]['pretty_version'])) { - $ranges[] = $installed['versions'][$packageName]['pretty_version']; - } - if (array_key_exists('aliases', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); - } - if (array_key_exists('replaced', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); - } - if (array_key_exists('provided', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); - } - - return implode(' || ', $ranges); - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['version'])) { - return null; - } - - return $installed['versions'][$packageName]['version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getPrettyVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['pretty_version'])) { - return null; - } - - return $installed['versions'][$packageName]['pretty_version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference - */ - public static function getReference($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['reference'])) { - return null; - } - - return $installed['versions'][$packageName]['reference']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. - */ - public static function getInstallPath($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @return array - * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} - */ - public static function getRootPackage() - { - $installed = self::getInstalled(); - - return $installed[0]['root']; - } - - /** - * Returns the raw installed.php data for custom implementations - * - * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. - * @return array[] - * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} - */ - public static function getRawData() - { - @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = include __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - - return self::$installed; - } - - /** - * Returns the raw data of all installed.php which are currently loaded for custom implementations - * - * @return array[] - * @psalm-return list}> - */ - public static function getAllRawData() - { - return self::getInstalled(); - } - - /** - * Lets you reload the static array from another file - * - * This is only useful for complex integrations in which a project needs to use - * this class but then also needs to execute another project's autoloader in process, - * and wants to ensure both projects have access to their version of installed.php. - * - * A typical case would be PHPUnit, where it would need to make sure it reads all - * the data it needs from this class, then call reload() with - * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure - * the project in which it runs can then also use this class safely, without - * interference between PHPUnit's dependencies and the project's dependencies. - * - * @param array[] $data A vendor/composer/installed.php data set - * @return void - * - * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data - */ - public static function reload($data) - { - self::$installed = $data; - self::$installedByVendor = array(); - } - - /** - * @return array[] - * @psalm-return list}> - */ - private static function getInstalled() - { - if (null === self::$canGetVendors) { - self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); - } - - $installed = array(); - - if (self::$canGetVendors) { - foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { - if (isset(self::$installedByVendor[$vendorDir])) { - $installed[] = self::$installedByVendor[$vendorDir]; - } elseif (is_file($vendorDir.'/composer/installed.php')) { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; - } - } - } - } - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require __DIR__ . '/installed.php'; - self::$installed = $required; - } else { - self::$installed = array(); - } - } - - if (self::$installed !== array()) { - $installed[] = self::$installed; - } - - return $installed; - } -} diff --git a/fixtures/composer_env_sniffer/vendor/composer/autoload_classmap.php b/fixtures/composer_env_sniffer/vendor/composer/autoload_classmap.php deleted file mode 100644 index 0fb0a2c19..000000000 --- a/fixtures/composer_env_sniffer/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,10 +0,0 @@ - $vendorDir . '/composer/InstalledVersions.php', -); diff --git a/fixtures/composer_env_sniffer/vendor/composer/autoload_namespaces.php b/fixtures/composer_env_sniffer/vendor/composer/autoload_namespaces.php deleted file mode 100644 index 15a2ff3ad..000000000 --- a/fixtures/composer_env_sniffer/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ -register(true); - - return $loader; - } -} diff --git a/fixtures/composer_env_sniffer/vendor/composer/autoload_static.php b/fixtures/composer_env_sniffer/vendor/composer/autoload_static.php deleted file mode 100644 index 194fb0550..000000000 --- a/fixtures/composer_env_sniffer/vendor/composer/autoload_static.php +++ /dev/null @@ -1,20 +0,0 @@ - __DIR__ . '/..' . '/composer/InstalledVersions.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->classMap = ComposerStaticInitd751713988987e9331980363e24189ce::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/fixtures/composer_env_sniffer/vendor/composer/installed.json b/fixtures/composer_env_sniffer/vendor/composer/installed.json deleted file mode 100644 index 87fda747e..000000000 --- a/fixtures/composer_env_sniffer/vendor/composer/installed.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "packages": [], - "dev": true, - "dev-package-names": [] -} diff --git a/fixtures/composer_env_sniffer/vendor/composer/installed.php b/fixtures/composer_env_sniffer/vendor/composer/installed.php deleted file mode 100644 index 014e3b327..000000000 --- a/fixtures/composer_env_sniffer/vendor/composer/installed.php +++ /dev/null @@ -1,23 +0,0 @@ - array( - 'name' => '__root__', - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'reference' => NULL, - 'type' => 'library', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'dev' => true, - ), - 'versions' => array( - '__root__' => array( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'reference' => NULL, - 'type' => 'library', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'dev_requirement' => false, - ), - ), -); diff --git a/fixtures/composer_env_sniffer/web/index.php b/fixtures/composer_env_sniffer/web/index.php deleted file mode 100644 index b52576f2e..000000000 --- a/fixtures/composer_env_sniffer/web/index.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/fixtures/composer_invalid_json/.bp-config/options.json b/fixtures/composer_invalid_json/.bp-config/options.json deleted file mode 100644 index 298f37aa5..000000000 --- a/fixtures/composer_invalid_json/.bp-config/options.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "WEBDIR": "web", - "COMPOSER_VERSION": "latest" -} diff --git a/fixtures/composer_invalid_json/composer.json b/fixtures/composer_invalid_json/composer.json deleted file mode 100644 index 47235f26d..000000000 --- a/fixtures/composer_invalid_json/composer.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "require": { - "monolog/monolog": ">=1.0.0" - } - - invalid json -} diff --git a/fixtures/composer_invalid_json/composer.lock b/fixtures/composer_invalid_json/composer.lock deleted file mode 100644 index f794dd011..000000000 --- a/fixtures/composer_invalid_json/composer.lock +++ /dev/null @@ -1,170 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "097dbe833746d0f98524f7f7ac854c29", - "packages": [ - { - "name": "monolog/monolog", - "version": "3.4.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e2392369686d420ca32df3803de28b5d6f76867d", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/log": "^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2.0", - "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.1", - "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.4.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2023-06-21T08:46:11+00:00" - }, - { - "name": "psr/log", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" - }, - "time": "2021-07-14T16:46:02+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.6.0" -} diff --git a/fixtures/composer_latest_version/.bp-config/options.json b/fixtures/composer_latest_version/.bp-config/options.json deleted file mode 100644 index 298f37aa5..000000000 --- a/fixtures/composer_latest_version/.bp-config/options.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "WEBDIR": "web", - "COMPOSER_VERSION": "latest" -} diff --git a/fixtures/composer_latest_version/composer.json b/fixtures/composer_latest_version/composer.json deleted file mode 100644 index 9eb6dcdb2..000000000 --- a/fixtures/composer_latest_version/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require": { - "monolog/monolog": ">=1.0.0" - } -} diff --git a/fixtures/composer_latest_version/composer.lock b/fixtures/composer_latest_version/composer.lock deleted file mode 100644 index f794dd011..000000000 --- a/fixtures/composer_latest_version/composer.lock +++ /dev/null @@ -1,170 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "097dbe833746d0f98524f7f7ac854c29", - "packages": [ - { - "name": "monolog/monolog", - "version": "3.4.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e2392369686d420ca32df3803de28b5d6f76867d", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/log": "^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2.0", - "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.1", - "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.4.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2023-06-21T08:46:11+00:00" - }, - { - "name": "psr/log", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" - }, - "time": "2021-07-14T16:46:02+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.6.0" -} diff --git a/fixtures/composer_lock_invalid_json/.bp-config/options.json b/fixtures/composer_lock_invalid_json/.bp-config/options.json deleted file mode 100644 index 298f37aa5..000000000 --- a/fixtures/composer_lock_invalid_json/.bp-config/options.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "WEBDIR": "web", - "COMPOSER_VERSION": "latest" -} diff --git a/fixtures/composer_lock_invalid_json/composer.lock b/fixtures/composer_lock_invalid_json/composer.lock deleted file mode 100644 index 180047042..000000000 --- a/fixtures/composer_lock_invalid_json/composer.lock +++ /dev/null @@ -1,131 +0,0 @@ -{ - - Making the JSON incredibly invalid - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "731c9107753ab8d361c6ad117d85d6b1", - "packages": [ - { - "name": "monolog/monolog", - "version": "1.13.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "c31a2c4e8db5da8b46c74cf275d7f109c0f249ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c31a2c4e8db5da8b46c74cf275d7f109c0f249ac", - "reference": "c31a2c4e8db5da8b46c74cf275d7f109c0f249ac", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "~2.4, >2.4.8", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "phpunit/phpunit": "~4.0", - "raven/raven": "~0.5", - "ruflin/elastica": "0.90.*", - "swiftmailer/swiftmailer": "~5.3", - "videlalvaro/php-amqplib": "~2.4" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "raven/raven": "Allow sending log messages to a Sentry server", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.13.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2015-03-09 09:58:04" - }, - { - "name": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21 11:40:51" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/fixtures/composer_lock_invalid_json/index.php b/fixtures/composer_lock_invalid_json/index.php deleted file mode 100644 index 147cebcdd..000000000 --- a/fixtures/composer_lock_invalid_json/index.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/composer_no_index_dot_php/composer.lock b/fixtures/composer_no_index_dot_php/composer.lock deleted file mode 100644 index f9c604c80..000000000 --- a/fixtures/composer_no_index_dot_php/composer.lock +++ /dev/null @@ -1,172 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "baa5689519b0a73dc4f0f62d870f11db", - "packages": [ - { - "name": "monolog/monolog", - "version": "3.4.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e2392369686d420ca32df3803de28b5d6f76867d", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/log": "^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2.0", - "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.1", - "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.4.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2023-06-21T08:46:11+00:00" - }, - { - "name": "psr/log", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" - }, - "time": "2021-07-14T16:46:02+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "ext-fileinfo": "*" - }, - "platform-dev": [], - "plugin-api-version": "2.6.0" -} diff --git a/fixtures/composer_no_index_dot_php/package.sh b/fixtures/composer_no_index_dot_php/package.sh deleted file mode 100755 index 7f4c05de7..000000000 --- a/fixtures/composer_no_index_dot_php/package.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -rm -rf $HOME/.composer/cache/* -rm -Rf ./vendor/ - -composer config -g github-oauth.github.com "$COMPOSER_GITHUB_OAUTH_TOKEN" - -composer install --no-interaction diff --git a/fixtures/composer_no_index_dot_php/vendor/autoload.php b/fixtures/composer_no_index_dot_php/vendor/autoload.php deleted file mode 100644 index 8c663301c..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/autoload.php +++ /dev/null @@ -1,25 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - /** @var \Closure(string):void */ - private static $includeFile; - - /** @var string|null */ - private $vendorDir; - - // PSR-4 - /** - * @var array> - */ - private $prefixLengthsPsr4 = array(); - /** - * @var array> - */ - private $prefixDirsPsr4 = array(); - /** - * @var list - */ - private $fallbackDirsPsr4 = array(); - - // PSR-0 - /** - * List of PSR-0 prefixes - * - * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) - * - * @var array>> - */ - private $prefixesPsr0 = array(); - /** - * @var list - */ - private $fallbackDirsPsr0 = array(); - - /** @var bool */ - private $useIncludePath = false; - - /** - * @var array - */ - private $classMap = array(); - - /** @var bool */ - private $classMapAuthoritative = false; - - /** - * @var array - */ - private $missingClasses = array(); - - /** @var string|null */ - private $apcuPrefix; - - /** - * @var array - */ - private static $registeredLoaders = array(); - - /** - * @param string|null $vendorDir - */ - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - self::initializeIncludeClosure(); - } - - /** - * @return array> - */ - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); - } - - return array(); - } - - /** - * @return array> - */ - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - /** - * @return list - */ - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - /** - * @return list - */ - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - /** - * @return array Array of classname => path - */ - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - * - * @return void - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - * - * @return void - */ - public function add($prefix, $paths, $prepend = false) - { - $paths = (array) $paths; - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - $paths = (array) $paths; - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 base directories - * - * @return void - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - * - * @return void - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - * - * @return void - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - * - * @return void - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - * - * @return void - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } - } - - /** - * Unregisters this instance as an autoloader. - * - * @return void - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return true|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - $includeFile = self::$includeFile; - $includeFile($file); - - return true; - } - - return null; - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - /** - * Returns the currently registered loaders keyed by their corresponding vendor directories. - * - * @return array - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - - /** - * @param string $class - * @param string $ext - * @return string|false - */ - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } - - /** - * @return void - */ - private static function initializeIncludeClosure() - { - if (self::$includeFile !== null) { - return; - } - - /** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - */ - self::$includeFile = \Closure::bind(static function($file) { - include $file; - }, null, null); - } -} diff --git a/fixtures/composer_no_index_dot_php/vendor/composer/InstalledVersions.php b/fixtures/composer_no_index_dot_php/vendor/composer/InstalledVersions.php deleted file mode 100644 index 51e734a77..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/composer/InstalledVersions.php +++ /dev/null @@ -1,359 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer; - -use Composer\Autoload\ClassLoader; -use Composer\Semver\VersionParser; - -/** - * This class is copied in every Composer installed project and available to all - * - * See also https://getcomposer.org/doc/07-runtime.md#installed-versions - * - * To require its presence, you can require `composer-runtime-api ^2.0` - * - * @final - */ -class InstalledVersions -{ - /** - * @var mixed[]|null - * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null - */ - private static $installed; - - /** - * @var bool|null - */ - private static $canGetVendors; - - /** - * @var array[] - * @psalm-var array}> - */ - private static $installedByVendor = array(); - - /** - * Returns a list of all package names which are present, either by being installed, replaced or provided - * - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackages() - { - $packages = array(); - foreach (self::getInstalled() as $installed) { - $packages[] = array_keys($installed['versions']); - } - - if (1 === \count($packages)) { - return $packages[0]; - } - - return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); - } - - /** - * Returns a list of all package names with a specific type e.g. 'library' - * - * @param string $type - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackagesByType($type) - { - $packagesByType = array(); - - foreach (self::getInstalled() as $installed) { - foreach ($installed['versions'] as $name => $package) { - if (isset($package['type']) && $package['type'] === $type) { - $packagesByType[] = $name; - } - } - } - - return $packagesByType; - } - - /** - * Checks whether the given package is installed - * - * This also returns true if the package name is provided or replaced by another package - * - * @param string $packageName - * @param bool $includeDevRequirements - * @return bool - */ - public static function isInstalled($packageName, $includeDevRequirements = true) - { - foreach (self::getInstalled() as $installed) { - if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; - } - } - - return false; - } - - /** - * Checks whether the given package satisfies a version constraint - * - * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: - * - * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') - * - * @param VersionParser $parser Install composer/semver to have access to this class and functionality - * @param string $packageName - * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package - * @return bool - */ - public static function satisfies(VersionParser $parser, $packageName, $constraint) - { - $constraint = $parser->parseConstraints((string) $constraint); - $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - - return $provided->matches($constraint); - } - - /** - * Returns a version constraint representing all the range(s) which are installed for a given package - * - * It is easier to use this via isInstalled() with the $constraint argument if you need to check - * whether a given version of a package is installed, and not just whether it exists - * - * @param string $packageName - * @return string Version constraint usable with composer/semver - */ - public static function getVersionRanges($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - $ranges = array(); - if (isset($installed['versions'][$packageName]['pretty_version'])) { - $ranges[] = $installed['versions'][$packageName]['pretty_version']; - } - if (array_key_exists('aliases', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); - } - if (array_key_exists('replaced', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); - } - if (array_key_exists('provided', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); - } - - return implode(' || ', $ranges); - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['version'])) { - return null; - } - - return $installed['versions'][$packageName]['version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getPrettyVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['pretty_version'])) { - return null; - } - - return $installed['versions'][$packageName]['pretty_version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference - */ - public static function getReference($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['reference'])) { - return null; - } - - return $installed['versions'][$packageName]['reference']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. - */ - public static function getInstallPath($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @return array - * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} - */ - public static function getRootPackage() - { - $installed = self::getInstalled(); - - return $installed[0]['root']; - } - - /** - * Returns the raw installed.php data for custom implementations - * - * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. - * @return array[] - * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} - */ - public static function getRawData() - { - @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = include __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - - return self::$installed; - } - - /** - * Returns the raw data of all installed.php which are currently loaded for custom implementations - * - * @return array[] - * @psalm-return list}> - */ - public static function getAllRawData() - { - return self::getInstalled(); - } - - /** - * Lets you reload the static array from another file - * - * This is only useful for complex integrations in which a project needs to use - * this class but then also needs to execute another project's autoloader in process, - * and wants to ensure both projects have access to their version of installed.php. - * - * A typical case would be PHPUnit, where it would need to make sure it reads all - * the data it needs from this class, then call reload() with - * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure - * the project in which it runs can then also use this class safely, without - * interference between PHPUnit's dependencies and the project's dependencies. - * - * @param array[] $data A vendor/composer/installed.php data set - * @return void - * - * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data - */ - public static function reload($data) - { - self::$installed = $data; - self::$installedByVendor = array(); - } - - /** - * @return array[] - * @psalm-return list}> - */ - private static function getInstalled() - { - if (null === self::$canGetVendors) { - self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); - } - - $installed = array(); - - if (self::$canGetVendors) { - foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { - if (isset(self::$installedByVendor[$vendorDir])) { - $installed[] = self::$installedByVendor[$vendorDir]; - } elseif (is_file($vendorDir.'/composer/installed.php')) { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; - } - } - } - } - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require __DIR__ . '/installed.php'; - self::$installed = $required; - } else { - self::$installed = array(); - } - } - - if (self::$installed !== array()) { - $installed[] = self::$installed; - } - - return $installed; - } -} diff --git a/fixtures/composer_no_index_dot_php/vendor/composer/LICENSE b/fixtures/composer_no_index_dot_php/vendor/composer/LICENSE deleted file mode 100644 index f27399a04..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/fixtures/composer_no_index_dot_php/vendor/composer/autoload_classmap.php b/fixtures/composer_no_index_dot_php/vendor/composer/autoload_classmap.php deleted file mode 100644 index 0fb0a2c19..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,10 +0,0 @@ - $vendorDir . '/composer/InstalledVersions.php', -); diff --git a/fixtures/composer_no_index_dot_php/vendor/composer/autoload_namespaces.php b/fixtures/composer_no_index_dot_php/vendor/composer/autoload_namespaces.php deleted file mode 100644 index 15a2ff3ad..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ - array($vendorDir . '/psr/log/src'), - 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), -); diff --git a/fixtures/composer_no_index_dot_php/vendor/composer/autoload_real.php b/fixtures/composer_no_index_dot_php/vendor/composer/autoload_real.php deleted file mode 100644 index 00868463d..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/composer/autoload_real.php +++ /dev/null @@ -1,38 +0,0 @@ -register(true); - - return $loader; - } -} diff --git a/fixtures/composer_no_index_dot_php/vendor/composer/autoload_static.php b/fixtures/composer_no_index_dot_php/vendor/composer/autoload_static.php deleted file mode 100644 index 89b063633..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/composer/autoload_static.php +++ /dev/null @@ -1,44 +0,0 @@ - - array ( - 'Psr\\Log\\' => 8, - ), - 'M' => - array ( - 'Monolog\\' => 8, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Psr\\Log\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/log/src', - ), - 'Monolog\\' => - array ( - 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', - ), - ); - - public static $classMap = array ( - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitbaa5689519b0a73dc4f0f62d870f11db::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitbaa5689519b0a73dc4f0f62d870f11db::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitbaa5689519b0a73dc4f0f62d870f11db::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/fixtures/composer_no_index_dot_php/vendor/composer/installed.json b/fixtures/composer_no_index_dot_php/vendor/composer/installed.json deleted file mode 100644 index b6d1513ad..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/composer/installed.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "packages": [ - { - "name": "monolog/monolog", - "version": "3.4.0", - "version_normalized": "3.4.0.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e2392369686d420ca32df3803de28b5d6f76867d", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/log": "^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2.0", - "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.1", - "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" - }, - "time": "2023-06-21T08:46:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.4.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "install-path": "../monolog/monolog" - }, - { - "name": "psr/log", - "version": "3.0.0", - "version_normalized": "3.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "time": "2021-07-14T16:46:02+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" - }, - "install-path": "../psr/log" - } - ], - "dev": true, - "dev-package-names": [] -} diff --git a/fixtures/composer_no_index_dot_php/vendor/composer/installed.php b/fixtures/composer_no_index_dot_php/vendor/composer/installed.php deleted file mode 100644 index 71b716843..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/composer/installed.php +++ /dev/null @@ -1,47 +0,0 @@ - array( - 'name' => '__root__', - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'reference' => NULL, - 'type' => 'library', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'dev' => true, - ), - 'versions' => array( - '__root__' => array( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'reference' => NULL, - 'type' => 'library', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'monolog/monolog' => array( - 'pretty_version' => '3.4.0', - 'version' => '3.4.0.0', - 'reference' => 'e2392369686d420ca32df3803de28b5d6f76867d', - 'type' => 'library', - 'install_path' => __DIR__ . '/../monolog/monolog', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'psr/log' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/log', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'psr/log-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '3.0.0', - ), - ), - ), -); diff --git a/fixtures/composer_no_index_dot_php/vendor/composer/platform_check.php b/fixtures/composer_no_index_dot_php/vendor/composer/platform_check.php deleted file mode 100644 index 4c3a5d68f..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/composer/platform_check.php +++ /dev/null @@ -1,26 +0,0 @@ -= 80100)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.'; -} - -if ($issues) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); - } elseif (!headers_sent()) { - echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; - } - } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR - ); -} diff --git a/fixtures/composer_no_index_dot_php/vendor/monolog/monolog b/fixtures/composer_no_index_dot_php/vendor/monolog/monolog deleted file mode 160000 index e23923696..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/monolog/monolog +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e2392369686d420ca32df3803de28b5d6f76867d diff --git a/fixtures/composer_no_index_dot_php/vendor/psr/log b/fixtures/composer_no_index_dot_php/vendor/psr/log deleted file mode 160000 index fe5ea303b..000000000 --- a/fixtures/composer_no_index_dot_php/vendor/psr/log +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fe5ea303b0887d5caefd3d431c3e61ad47037001 diff --git a/fixtures/custom_extension/index.php b/fixtures/custom_extension/index.php deleted file mode 100644 index 147cebcdd..000000000 --- a/fixtures/custom_extension/index.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/composer_invalid_json/index.php b/fixtures/default/index.php similarity index 100% rename from fixtures/composer_invalid_json/index.php rename to fixtures/default/index.php diff --git a/fixtures/cake_remote_deps/plugins/.gitkeep b/fixtures/default/randomdir/.gitkeep similarity index 100% rename from fixtures/cake_remote_deps/plugins/.gitkeep rename to fixtures/default/randomdir/.gitkeep diff --git a/fixtures/php_app/sym_dir b/fixtures/default/sym_dir similarity index 100% rename from fixtures/php_app/sym_dir rename to fixtures/default/sym_dir diff --git a/fixtures/php_app/sym_indexphp b/fixtures/default/sym_indexphp similarity index 100% rename from fixtures/php_app/sym_indexphp rename to fixtures/default/sym_indexphp diff --git a/fixtures/fake_supply_php_app/index.php b/fixtures/dotnet_core_as_supply_app/index.php similarity index 100% rename from fixtures/fake_supply_php_app/index.php rename to fixtures/dotnet_core_as_supply_app/index.php diff --git a/fixtures/fake_supply_php_app/simple_brats.csproj b/fixtures/dotnet_core_as_supply_app/simple_brats.csproj similarity index 100% rename from fixtures/fake_supply_php_app/simple_brats.csproj rename to fixtures/dotnet_core_as_supply_app/simple_brats.csproj diff --git a/fixtures/fake_dynatrace_api/go.mod b/fixtures/fake_dynatrace_api/go.mod deleted file mode 100644 index 216995b3c..000000000 --- a/fixtures/fake_dynatrace_api/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module myapp - -go 1.13 diff --git a/fixtures/fake_dynatrace_api/main.go b/fixtures/fake_dynatrace_api/main.go deleted file mode 100644 index 4ba49d57c..000000000 --- a/fixtures/fake_dynatrace_api/main.go +++ /dev/null @@ -1,101 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "log" - "net/http" - "os" - "strings" - "text/template" -) - -func main() { - var application struct { - ApplicationURIs []string `json:"application_uris"` - } - - err := json.Unmarshal([]byte(os.Getenv("VCAP_APPLICATION")), &application) - if err != nil { - log.Fatalf("failed to parse VCAP_APPLICATION: %s", err) - } - - http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { - var withoutAgentPath bool - path := req.URL.Path - - uri := application.ApplicationURIs[0] - - if strings.HasPrefix(path, "/without-agent-path") { - uri = fmt.Sprintf("%s/without-agent-path", uri) - path = strings.TrimPrefix(path, "/without-agent-path") - withoutAgentPath = true - } - - switch path { - case "/v1/deployment/installer/agent/unix/paas-sh/latest": - context := struct{ URI string }{URI: uri} - t := template.Must(template.New("install.sh").ParseFiles("install.sh")) - err := t.Execute(w, context) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - w.Write([]byte(err.Error())) - return - } - - case "/dynatrace-env.sh", "/liboneagentproc.so", "/ruxitagentproc.conf": - requestUrl := req.URL.Path - if strings.Contains(requestUrl, "without-agent-path") { - requestUrl = strings.TrimPrefix(requestUrl, "/without-agent-path") - } - contents, err := ioutil.ReadFile(strings.TrimPrefix(requestUrl, "/")) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - w.Write([]byte(err.Error())) - return - } - w.Write(contents) - - case "/manifest.json": - var payload map[string]interface{} - file, err := os.Open("manifest.json") - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - w.Write([]byte(err.Error())) - return - } - - err = json.NewDecoder(file).Decode(&payload) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - w.Write([]byte(err.Error())) - return - } - - if withoutAgentPath { - payload["technologies"] = map[string]interface{}{ - "process": map[string]interface{}{ - "linux-x86-64": []struct{}{}, - }, - } - } - - json.NewEncoder(w).Encode(payload) - - case "/v1/deployment/installer/agent/processmoduleconfig": - fakeConfig, err := ioutil.ReadFile("fake_config.json") - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - w.Write([]byte(err.Error())) - return - } - w.Write(fakeConfig) - - default: - w.WriteHeader(http.StatusNotFound) - } - }) - - log.Fatal(http.ListenAndServe(fmt.Sprintf(":%s", os.Getenv("PORT")), nil)) -} diff --git a/fixtures/httpd_and_proxying/.bp-config/options.json b/fixtures/httpd_and_proxying/.bp-config/options.json deleted file mode 100644 index 0943d5f45..000000000 --- a/fixtures/httpd_and_proxying/.bp-config/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "WEB_SERVER": "httpd" -} diff --git a/fixtures/httpd_and_proxying/index.php b/fixtures/httpd_and_proxying/index.php deleted file mode 100644 index 400cc6a5c..000000000 --- a/fixtures/httpd_and_proxying/index.php +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/fixtures/invalid_php_ini_d/.bp-config/php/php.ini.d/php.ini b/fixtures/invalid_php_ini_d/.bp-config/php/php.ini.d/php.ini deleted file mode 100644 index ae06b2aa2..000000000 --- a/fixtures/invalid_php_ini_d/.bp-config/php/php.ini.d/php.ini +++ /dev/null @@ -1,9 +0,0 @@ -[PHP] - -;;;;;;;;;;;;;;;;;;;; -; php.ini Options ; -;;;;;;;;;;;;;;;;;;;; - -extension = 'meatball.so' - -; End: diff --git a/fixtures/invalid_php_ini_d/index.php b/fixtures/invalid_php_ini_d/index.php deleted file mode 100644 index 147cebcdd..000000000 --- a/fixtures/invalid_php_ini_d/index.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/invalid_php_version/.bp-config/options.json b/fixtures/invalid_php_version/.bp-config/options.json deleted file mode 100644 index f65fa6489..000000000 --- a/fixtures/invalid_php_version/.bp-config/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "PHP_VERSION": "7.34.5" -} diff --git a/fixtures/invalid_php_version/index.php b/fixtures/invalid_php_version/index.php deleted file mode 100644 index 147cebcdd..000000000 --- a/fixtures/invalid_php_version/index.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/invalid_php_version_composer/composer.json b/fixtures/invalid_php_version_composer/composer.json deleted file mode 100644 index 853675ce5..000000000 --- a/fixtures/invalid_php_version_composer/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require": { - "php": ">=9.7.0" - } -} diff --git a/fixtures/invalid_php_version_composer/index.php b/fixtures/invalid_php_version_composer/index.php deleted file mode 100644 index 147cebcdd..000000000 --- a/fixtures/invalid_php_version_composer/index.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/invalid_webserver/.bp-config/options.json b/fixtures/invalid_webserver/.bp-config/options.json deleted file mode 100644 index 2090ecd90..000000000 --- a/fixtures/invalid_webserver/.bp-config/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "WEB_SERVER": "apache" -} diff --git a/fixtures/invalid_webserver/index.php b/fixtures/invalid_webserver/index.php deleted file mode 100644 index 147cebcdd..000000000 --- a/fixtures/invalid_webserver/index.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/laminas-local-deps/Dockerfile b/fixtures/laminas-local-deps/Dockerfile deleted file mode 100644 index 0e08b8daf..000000000 --- a/fixtures/laminas-local-deps/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -FROM php:8.1-apache - -LABEL maintainer="getlaminas.org" \ - org.label-schema.docker.dockerfile="/Dockerfile" \ - org.label-schema.name="Laminas MVC Skeleton" \ - org.label-schema.url="https://docs.getlaminas.org/mvc/" \ - org.label-schema.vcs-url="https://github.com/laminas/laminas-mvc-skeleton" - -## Update package information -RUN apt-get update - -## Configure Apache -RUN a2enmod rewrite \ - && sed -i 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/000-default.conf \ - && mv /var/www/html /var/www/public - -## Install Composer -RUN curl -sS https://getcomposer.org/installer \ - | php -- --install-dir=/usr/local/bin --filename=composer - -### -## PHP Extensisons -### - -## Install zip libraries and extension -RUN apt-get install --yes git zlib1g-dev libzip-dev \ - && docker-php-ext-install zip - -## Install intl library and extension -RUN apt-get install --yes libicu-dev \ - && docker-php-ext-configure intl \ - && docker-php-ext-install intl - -### -## Optional PHP extensions -### - -## mbstring for i18n string support -# RUN docker-php-ext-install mbstring - -### -## Some laminas/laminas-db supported PDO extensions -### - -## MySQL PDO support -# RUN docker-php-ext-install pdo_mysql - -## PostgreSQL PDO support -# RUN apt-get install --yes libpq-dev \ -# && docker-php-ext-install pdo_pgsql - -### -## laminas/laminas-cache supported extensions -### - -## APCU -# RUN pecl install apcu \ -# && docker-php-ext-enable apcu - -## Memcached -# RUN apt-get install --yes libmemcached-dev \ -# && pecl install memcached \ -# && docker-php-ext-enable memcached - -## MongoDB -# RUN pecl install mongodb \ -# && docker-php-ext-enable mongodb - -## Redis support. igbinary and libzstd-dev are only needed based on -## redis pecl options -# RUN pecl install igbinary \ -# && docker-php-ext-enable igbinary \ -# && apt-get install --yes libzstd-dev \ -# && pecl install redis \ -# && docker-php-ext-enable redis - - -WORKDIR /var/www diff --git a/fixtures/laminas-local-deps/data/cache/.gitkeep b/fixtures/laminas-local-deps/data/cache/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/fixtures/laminas-remote-deps/.bp-config/options.json b/fixtures/laminas-remote-deps/.bp-config/options.json deleted file mode 100644 index a5fedd4e5..000000000 --- a/fixtures/laminas-remote-deps/.bp-config/options.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "WEBDIR": "public", - "COMPOSER_VENDOR_DIR": "vendor" -} \ No newline at end of file diff --git a/fixtures/laminas-remote-deps/.gitattributes b/fixtures/laminas-remote-deps/.gitattributes deleted file mode 100644 index f966b984a..000000000 --- a/fixtures/laminas-remote-deps/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -/.github/ export-ignore -/bin/remove-package-artifacts.php export-ignore -/CHANGELOG.md diff --git a/fixtures/laminas-remote-deps/.gitignore b/fixtures/laminas-remote-deps/.gitignore deleted file mode 100644 index d574350ed..000000000 --- a/fixtures/laminas-remote-deps/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.vagrant/ -vendor/ -config/development.config.php -data/cache/* -!data/cache/.gitkeep -phpunit.xml -.phpunit.result.cache diff --git a/fixtures/laminas-remote-deps/COPYRIGHT.md b/fixtures/laminas-remote-deps/COPYRIGHT.md deleted file mode 100644 index 0a8cccc06..000000000 --- a/fixtures/laminas-remote-deps/COPYRIGHT.md +++ /dev/null @@ -1 +0,0 @@ -Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/) diff --git a/fixtures/laminas-remote-deps/Dockerfile b/fixtures/laminas-remote-deps/Dockerfile deleted file mode 100644 index 0e08b8daf..000000000 --- a/fixtures/laminas-remote-deps/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -FROM php:8.1-apache - -LABEL maintainer="getlaminas.org" \ - org.label-schema.docker.dockerfile="/Dockerfile" \ - org.label-schema.name="Laminas MVC Skeleton" \ - org.label-schema.url="https://docs.getlaminas.org/mvc/" \ - org.label-schema.vcs-url="https://github.com/laminas/laminas-mvc-skeleton" - -## Update package information -RUN apt-get update - -## Configure Apache -RUN a2enmod rewrite \ - && sed -i 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/000-default.conf \ - && mv /var/www/html /var/www/public - -## Install Composer -RUN curl -sS https://getcomposer.org/installer \ - | php -- --install-dir=/usr/local/bin --filename=composer - -### -## PHP Extensisons -### - -## Install zip libraries and extension -RUN apt-get install --yes git zlib1g-dev libzip-dev \ - && docker-php-ext-install zip - -## Install intl library and extension -RUN apt-get install --yes libicu-dev \ - && docker-php-ext-configure intl \ - && docker-php-ext-install intl - -### -## Optional PHP extensions -### - -## mbstring for i18n string support -# RUN docker-php-ext-install mbstring - -### -## Some laminas/laminas-db supported PDO extensions -### - -## MySQL PDO support -# RUN docker-php-ext-install pdo_mysql - -## PostgreSQL PDO support -# RUN apt-get install --yes libpq-dev \ -# && docker-php-ext-install pdo_pgsql - -### -## laminas/laminas-cache supported extensions -### - -## APCU -# RUN pecl install apcu \ -# && docker-php-ext-enable apcu - -## Memcached -# RUN apt-get install --yes libmemcached-dev \ -# && pecl install memcached \ -# && docker-php-ext-enable memcached - -## MongoDB -# RUN pecl install mongodb \ -# && docker-php-ext-enable mongodb - -## Redis support. igbinary and libzstd-dev are only needed based on -## redis pecl options -# RUN pecl install igbinary \ -# && docker-php-ext-enable igbinary \ -# && apt-get install --yes libzstd-dev \ -# && pecl install redis \ -# && docker-php-ext-enable redis - - -WORKDIR /var/www diff --git a/fixtures/laminas-remote-deps/LICENSE.md b/fixtures/laminas-remote-deps/LICENSE.md deleted file mode 100644 index 10b40f142..000000000 --- a/fixtures/laminas-remote-deps/LICENSE.md +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of Laminas Foundation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/fixtures/laminas-remote-deps/README.md b/fixtures/laminas-remote-deps/README.md deleted file mode 100644 index 97ff2fcc0..000000000 --- a/fixtures/laminas-remote-deps/README.md +++ /dev/null @@ -1,276 +0,0 @@ -# laminas-mvc-skeleton - -> ## 🇷🇺 РуÑÑким гражданам -> -> Мы, учаÑтники Laminas, родилиÑÑŒ и живем в разных Ñтранах. У многих из Ð½Ð°Ñ ÐµÑть друзьÑ, родÑтвенники и коллеги как в РоÑÑии, так и в Украине. Ðекоторые из Ð½Ð°Ñ Ñ€Ð¾Ð´Ð¸Ð»Ð¸ÑÑŒ в РоÑÑии. Ðекоторые из Ð½Ð°Ñ Ð¶Ð¸Ð²ÑƒÑ‚ в РоÑÑии. У некоторых бабушки и дедушки ÑражалиÑÑŒ Ñ Ñ„Ð°ÑˆÐ¸Ñтами во Второй мировой войне. ЗдеÑÑŒ никто не поддерживает фашизм. -> -> У одного из Ð½Ð°Ñ ÐµÑть украинÑÐºÐ°Ñ Ñ€Ð¾Ð´Ñтвенница, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑпаÑлаÑÑŒ из дома вмеÑте Ñ Ñыном. Поезд задержалÑÑ Ð¸Ð·-за бомбежки на дороге впереди. У Ð½Ð°Ñ ÐµÑть друзьÑ, которые прÑчутÑÑ Ð² бомбоубежищах. Мы Ñ Ñ‚Ñ€ÐµÐ²Ð¾Ð³Ð¾Ð¹ ждем веÑточки от них поÑле воздушных налетов, которые беÑпорÑдочно наноÑÑÑ‚ удары и попадают по больницам, школам, детÑким Ñадам и домам. Мы не берем Ñто из каких-либо СМИ. Мы наблюдаем Ñто напрÑмую. -> -> Ð’Ñ‹ доверÑете нам доÑтаточно, чтоб иÑпользовать наши программы, и мы проÑим Ð²Ð°Ñ Ð´Ð¾Ð²ÐµÑ€Ð¸Ñ‚ÑŒÑÑ Ð½Ð°Ð¼ вновь. Мы нуждаемÑÑ Ð² помощи. Выходите и протеÑтуйте против Ñтой беÑполезной войны. ОÑтановите кровопролитие. Скажите "Ðет войне!" -> -> ## 🇺🇸 To Citizens of Russia -> -> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism. -> -> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences. -> -> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!" - -## Introduction - -This is a skeleton application using the Laminas MVC layer and module -systems. This application is meant to be used as a starting place for those -looking to get their feet wet with Laminas MVC. - -## Installation using Composer - -The easiest way to create a new Laminas MVC project is to use -[Composer](https://getcomposer.org/). If you don't have it already installed, -then please install as per the [documentation](https://getcomposer.org/doc/00-intro.md). - -To create your new Laminas MVC project: - -```bash -$ composer create-project -sdev laminas/laminas-mvc-skeleton path/to/install -``` - -Once installed, you can test it out immediately using PHP's built-in web server: - -```bash -$ cd path/to/install -$ php -S 0.0.0.0:8080 -t public -# OR use the composer alias: -$ composer run --timeout 0 serve -``` - -This will start the cli-server on port 8080, and bind it to all network -interfaces. You can then visit the site at http://localhost:8080/ -- which will bring up Laminas MVC Skeleton welcome page. - -**Note:** The built-in CLI server is *for development only*. - -## Development mode - -The skeleton ships with [laminas-development-mode](https://github.com/laminas/laminas-development-mode) -by default, and provides three aliases for consuming the script it ships with: - -```bash -$ composer development-enable # enable development mode -$ composer development-disable # disable development mode -$ composer development-status # whether or not development mode is enabled -``` - -You may provide development-only modules and bootstrap-level configuration in -`config/development.config.php.dist`, and development-only application -configuration in `config/autoload/development.local.php.dist`. Enabling -development mode will copy these files to versions removing the `.dist` suffix, -while disabling development mode will remove those copies. - -Development mode is automatically enabled as part of the skeleton installation process. -After making changes to one of the above-mentioned `.dist` configuration files you will -either need to disable then enable development mode for the changes to take effect, -or manually make matching updates to the `.dist`-less copies of those files. - -## Running Unit Tests - -To run the supplied skeleton unit tests, you need to do one of the following: - -- During initial project creation, select to install the MVC testing support. -- After initial project creation, install [laminas-test](https://docs.laminas.dev/laminas-test/): - - ```bash - $ composer require --dev laminas/laminas-test - ``` - -Once testing support is present, you can run the tests using: - -```bash -$ ./vendor/bin/phpunit -``` - -If you need to make local modifications for the PHPUnit test setup, copy -`phpunit.xml.dist` to `phpunit.xml` and edit the new file; the latter has -precedence over the former when running tests, and is ignored by version -control. (If you want to make the modifications permanent, edit the -`phpunit.xml.dist` file.) - -## Running Psalm Static Analysis - -To run the supplied skeleton static analysis, you need to do one of the following: -It is recommended to install the test components from laminas (laminas/laminas-test), -as this is used in the tests supplied. - - ```bash - $ composer require --dev vimeo/psalm psalm/plugin-phpunit laminas/laminas-test - ``` - -Once psalm support is present, you can run the static analysis using: - -```bash -$ composer static-analysis -``` - -## Using Vagrant - -This skeleton includes a `Vagrantfile` based on ubuntu 18.04 (bento box) -with configured Apache2 and PHP 7.3. Start it up using: - -```bash -$ vagrant up -``` - -Once built, you can also run composer within the box. For example, the following -will install dependencies: - -```bash -$ vagrant ssh -c 'composer install' -``` - -While this will update them: - -```bash -$ vagrant ssh -c 'composer update' -``` - -While running, Vagrant maps your host port 8080 to port 80 on the virtual -machine; you can visit the site at http://localhost:8080/ - -> ### Vagrant and VirtualBox -> -> The vagrant image is based on bento/ubuntu-18.04. If you are using VirtualBox as -> a provider, you will need: -> -> - Vagrant 2.2.6 or later -> - VirtualBox 6.0.14 or later - -For vagrant documentation, please refer to [vagrantup.com](https://www.vagrantup.com/) - -## Using docker-compose - -This skeleton provides a `docker-compose.yml` for use with -[docker-compose](https://docs.docker.com/compose/); it -uses the provided `Dockerfile` to build a docker image -for the `laminas` container created with `docker-compose`. - -Build and start the image and container using: - -```bash -$ docker-compose up -d --build -``` - -At this point, you can visit http://localhost:8080 to see the site running. - -You can also run commands such as `composer` in the container. The container -environment is named "laminas" so you will pass that value to -`docker-compose run`: - -```bash -$ docker-compose run laminas composer install -``` - -Some composer packages optionally use additional PHP extensions. -The Dockerfile contains several commented-out commands -which enable some of the more popular php extensions. -For example, to install `pdo-pgsql` support for `laminas/laminas-db` -uncomment the lines: - -```sh -# RUN apt-get install --yes libpq-dev \ -# && docker-php-ext-install pdo_pgsql -``` - -then re-run the `docker-compose up -d --build` line as above. - -> You may also want to combine the various `apt-get` and `docker-php-ext-*` -> statements later to reduce the number of layers created by your image. - -## Web server setup - -### Apache setup - -To setup apache, setup a virtual host to point to the public/ directory of the -project and you should be ready to go! It should look something like below: - -```apache - - ServerName laminasapp.localhost - DocumentRoot /path/to/laminasapp/public - - DirectoryIndex index.php - AllowOverride All - Order allow,deny - Allow from all - - Require all granted - - - -``` - -### Nginx setup - -To setup nginx, open your `/path/to/nginx/nginx.conf` and add an -[include directive](http://nginx.org/en/docs/ngx_core_module.html#include) below -into `http` block if it does not already exist: - -```nginx -http { - # ... - include sites-enabled/*.conf; -} -``` - - -Create a virtual host configuration file for your project under `/path/to/nginx/sites-enabled/laminasapp.localhost.conf` -it should look something like below: - -```nginx -server { - listen 80; - server_name laminasapp.localhost; - root /path/to/laminasapp/public; - - location / { - index index.php; - try_files $uri $uri/ @php; - } - - location @php { - # Pass the PHP requests to FastCGI server (php-fpm) on 127.0.0.1:9000 - fastcgi_pass 127.0.0.1:9000; - fastcgi_param SCRIPT_FILENAME /path/to/laminasapp/public/index.php; - include fastcgi_params; - } -} -``` - -Restart the nginx, now you should be ready to go! - -## QA Tools - -The skeleton does not come with any QA tooling by default, but does ship with -configuration for each of: - -- [phpcs](https://github.com/squizlabs/php_codesniffer) -- [laminas-test](https://docs.laminas.dev/laminas-test/) -- [phpunit](https://phpunit.de) - -Additionally, it comes with some basic tests for the shipped -`Application\Controller\IndexController`. - -If you want to add these QA tools, execute the following: - -```bash -$ composer require --dev squizlabs/php_codesniffer laminas/laminas-test -``` - -We provide aliases for each of these tools in the Composer configuration: - -```bash -# Run CS checks: -$ composer cs-check -# Fix CS errors: -$ composer cs-fix -# Run PHPUnit tests: -$ composer test -``` diff --git a/fixtures/laminas-remote-deps/Vagrantfile b/fixtures/laminas-remote-deps/Vagrantfile deleted file mode 100644 index dd618f9fd..000000000 --- a/fixtures/laminas-remote-deps/Vagrantfile +++ /dev/null @@ -1,57 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -VAGRANTFILE_API_VERSION = '2' - -@script = < -{% endblock %} - -{% macro render_simple_table(label1, label2, data) %} - - - - - - - - - {% for key, value in data %} - - - - - {% endfor %} - -
{{ label1 }}{{ label2 }}
{{ key }}{{ value }}
-{% endmacro %} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/Resources/views/Collector/explain.html.twig b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/Resources/views/Collector/explain.html.twig deleted file mode 100644 index 3b2dd7f51..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/Resources/views/Collector/explain.html.twig +++ /dev/null @@ -1,28 +0,0 @@ -{% if data[0]|length > 1 %} - {# The platform returns a table for the explanation (e.g. MySQL), display all columns #} - - - - {% for label in data[0]|keys %} - - {% endfor %} - - - - {% for row in data %} - - {% for key, item in row %} - - {% endfor %} - - {% endfor %} - -
{{ label }}
{{ item|replace({',': ', '}) }}
-{% else %} - {# The Platform returns a single column for a textual explanation (e.g. PostgreSQL), display all lines #} -
-        {%- for row in data -%}
-            {{ row|first }}{{ "\n" }}
-        {%- endfor -%}
-    
-{% endif %} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/Resources/views/Collector/icon.svg b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/Resources/views/Collector/icon.svg deleted file mode 100644 index 93998db0c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/Resources/views/Collector/icon.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/Twig/DoctrineExtension.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/Twig/DoctrineExtension.php deleted file mode 100644 index 7c5f75394..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/Twig/DoctrineExtension.php +++ /dev/null @@ -1,197 +0,0 @@ - ['html'], 'deprecated' => true]), - new TwigFilter('doctrine_prettify_sql', [$this, 'prettifySql'], ['is_safe' => ['html']]), - new TwigFilter('doctrine_format_sql', [$this, 'formatSql'], ['is_safe' => ['html']]), - new TwigFilter('doctrine_replace_query_parameters', [$this, 'replaceQueryParameters']), - ]; - } - - /** - * Escape parameters of a SQL query - * DON'T USE THIS FUNCTION OUTSIDE ITS INTENDED SCOPE - * - * @internal - * - * @param mixed $parameter - * - * @return string - */ - public static function escapeFunction($parameter) - { - $result = $parameter; - - switch (true) { - // Check if result is non-unicode string using PCRE_UTF8 modifier - case is_string($result) && ! preg_match('//u', $result): - $result = '0x' . strtoupper(bin2hex($result)); - break; - - case is_string($result): - $result = "'" . addslashes($result) . "'"; - break; - - case is_array($result): - foreach ($result as &$value) { - $value = static::escapeFunction($value); - } - - $result = implode(', ', $result) ?: 'NULL'; - break; - - case is_object($result) && method_exists($result, '__toString'): - $result = addslashes($result->__toString()); - break; - - case $result === null: - $result = 'NULL'; - break; - - case is_bool($result): - $result = $result ? '1' : '0'; - break; - } - - return $result; - } - - /** - * Return a query with the parameters replaced - * - * @param string $query - * @param mixed[]|Data $parameters - * - * @return string - */ - public function replaceQueryParameters($query, $parameters) - { - if ($parameters instanceof Data) { - $parameters = $parameters->getValue(true); - } - - $i = 0; - - if (! array_key_exists(0, $parameters) && array_key_exists(1, $parameters)) { - $i = 1; - } - - return preg_replace_callback( - '/\?|((?setUpSqlFormatter(true, true); - - if ($highlightOnly) { - return $this->sqlFormatter->highlight($sql); - } - - return sprintf( - '
%s
', - $this->sqlFormatter->format($sql), - ); - } - - public function prettifySql(string $sql): string - { - $this->setUpSqlFormatter(); - - return $this->sqlFormatter->highlight($sql); - } - - public function formatSql(string $sql, bool $highlight): string - { - $this->setUpSqlFormatter($highlight); - - return $this->sqlFormatter->format($sql); - } - - private function setUpSqlFormatter(bool $highlight = true, bool $legacy = false): void - { - $this->sqlFormatter = new SqlFormatter($highlight ? new HtmlHighlighter([ - HtmlHighlighter::HIGHLIGHT_PRE => 'class="highlight highlight-sql"', - HtmlHighlighter::HIGHLIGHT_QUOTE => 'class="string"', - HtmlHighlighter::HIGHLIGHT_BACKTICK_QUOTE => 'class="string"', - HtmlHighlighter::HIGHLIGHT_RESERVED => 'class="keyword"', - HtmlHighlighter::HIGHLIGHT_BOUNDARY => 'class="symbol"', - HtmlHighlighter::HIGHLIGHT_NUMBER => 'class="number"', - HtmlHighlighter::HIGHLIGHT_WORD => 'class="word"', - HtmlHighlighter::HIGHLIGHT_ERROR => 'class="error"', - HtmlHighlighter::HIGHLIGHT_COMMENT => 'class="comment"', - HtmlHighlighter::HIGHLIGHT_VARIABLE => 'class="variable"', - ], ! $legacy) : new NullHighlighter()); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/UPGRADE-3.0.md b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/UPGRADE-3.0.md deleted file mode 100644 index 03ee914eb..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/UPGRADE-3.0.md +++ /dev/null @@ -1,8 +0,0 @@ -UPGRADE FROM 2.x to 3.0 -======================= - -Types ------ - - * The `commented` configuration option for types is no longer supported and - deprecated. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/composer.json b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/composer.json deleted file mode 100644 index 38692af10..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-bundle/composer.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "name": "doctrine/doctrine-bundle", - "description": "Symfony DoctrineBundle", - "license": "MIT", - "type": "symfony-bundle", - "keywords": [ - "DBAL", - "ORM", - "Database", - "Persistence" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - }, - { - "name": "Doctrine Project", - "homepage": "https://www.doctrine-project.org/" - } - ], - "homepage": "https://www.doctrine-project.org", - "require": { - "php": "^7.4 || ^8.0", - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/dbal": "^3.7.0 || ^4.0", - "doctrine/persistence": "^2.2 || ^3", - "doctrine/sql-formatter": "^1.0.1", - "symfony/cache": "^5.4 || ^6.0 || ^7.0", - "symfony/config": "^5.4 || ^6.0 || ^7.0", - "symfony/console": "^5.4 || ^6.0 || ^7.0", - "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", - "symfony/deprecation-contracts": "^2.1 || ^3", - "symfony/doctrine-bridge": "^5.4.19 || ^6.0.7 || ^7.0", - "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0", - "symfony/polyfill-php80": "^1.15", - "symfony/service-contracts": "^1.1.1 || ^2.0 || ^3" - }, - "require-dev": { - "doctrine/annotations": "^1 || ^2", - "doctrine/coding-standard": "^12", - "doctrine/deprecations": "^1.0", - "doctrine/orm": "^2.17 || ^3.0", - "friendsofphp/proxy-manager-lts": "^1.0", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.4", - "psalm/plugin-symfony": "^5", - "psr/log": "^1.1.4 || ^2.0 || ^3.0", - "symfony/phpunit-bridge": "^6.1 || ^7.0", - "symfony/property-info": "^5.4 || ^6.0 || ^7.0", - "symfony/proxy-manager-bridge": "^5.4 || ^6.0 || ^7.0", - "symfony/security-bundle": "^5.4 || ^6.0 || ^7.0", - "symfony/string": "^5.4 || ^6.0 || ^7.0", - "symfony/twig-bridge": "^5.4 || ^6.0 || ^7.0", - "symfony/validator": "^5.4 || ^6.0 || ^7.0", - "symfony/var-exporter": "^5.4 || ^6.2 || ^7.0", - "symfony/web-profiler-bundle": "^5.4 || ^6.0 || ^7.0", - "symfony/yaml": "^5.4 || ^6.0 || ^7.0", - "twig/twig": "^1.34 || ^2.12 || ^3.0", - "vimeo/psalm": "^5.15" - }, - "conflict": { - "doctrine/annotations": ">=3.0", - "doctrine/orm": "<2.17 || >=4.0", - "twig/twig": "<1.34 || >=2.0 <2.4" - }, - "suggest": { - "ext-pdo": "*", - "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", - "symfony/web-profiler-bundle": "To use the data collector." - }, - "minimum-stability": "dev", - "autoload": { - "psr-4": { - "Doctrine\\Bundle\\DoctrineBundle\\": "" - } - }, - "autoload-dev": { - "psr-4": { - "": "Tests/DependencyInjection" - } - }, - "config": { - "allow-plugins": { - "composer/package-versions-deprecated": true, - "dealerdirect/phpcodesniffer-composer-installer": true, - "symfony/flex": true - }, - "sort-packages": true - }, - "scripts": { - "auto-scripts": { - "cache:clear": "symfony-cmd", - "assets:install %PUBLIC_DIR%": "symfony-cmd" - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/.symfony.bundle.yaml b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/.symfony.bundle.yaml deleted file mode 100644 index 483351a5b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/.symfony.bundle.yaml +++ /dev/null @@ -1,4 +0,0 @@ -branches: ["3.3.x", "3.4.x", "3.5.x", "3.6.x"] -maintained_branches: ["3.5.x", "3.6.x"] -doc_dir: "Resources/doc/" -dev_branch: "3.6.x" diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/CHANGELOG-3.1.md b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/CHANGELOG-3.1.md deleted file mode 100644 index 7f8d2fc4a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/CHANGELOG-3.1.md +++ /dev/null @@ -1,14 +0,0 @@ -CHANGELOG for 3.1.x -=================== - -This changelog references the relevant changes (bug and security fixes) done in -3.1 minor versions. - -3.1.0 (2018-12-21) ------------------- - - - [270: Show the name of the database being purged when loading fixtures](https://github.com/doctrine/DoctrineFixturesBundle/pull/270) thanks to @alcaeus - - [265: Drop support for PHP < 7.1 and older versions of data-fixtures](https://github.com/doctrine/DoctrineFixturesBundle/pull/265) thanks to @alcaeus - - [260: Add fixture groups via a static method interface or service tags](https://github.com/doctrine/DoctrineFixturesBundle/pull/260) thanks to @weaverryan - - [269: Apply Doctrine Coding Standard](https://github.com/doctrine/DoctrineFixturesBundle/pull/269) thanks to @carusogabriel - - [219: Dynamic namespace](https://github.com/doctrine/DoctrineFixturesBundle/issues/219) thanks to @MassiveHiggsField diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Command/LoadDataFixturesDoctrineCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Command/LoadDataFixturesDoctrineCommand.php deleted file mode 100644 index 2b2653999..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Command/LoadDataFixturesDoctrineCommand.php +++ /dev/null @@ -1,136 +0,0 @@ -setName('doctrine:fixtures:load') - ->setDescription('Load data fixtures to your database') - ->addOption('append', null, InputOption::VALUE_NONE, 'Append the data fixtures instead of deleting all data from the database first.') - ->addOption('group', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Only load fixtures that belong to this group') - ->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command.') - ->addOption('purger', null, InputOption::VALUE_REQUIRED, 'The purger to use for this command', 'default') - ->addOption('purge-exclusions', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'List of database tables to ignore while purging') - ->addOption('purge-with-truncate', null, InputOption::VALUE_NONE, 'Purge data by using a database-level TRUNCATE statement') - ->setHelp(<<<'EOT' - The %command.name% command loads data fixtures from your application: - - php %command.full_name% - - Fixtures are services that are tagged with doctrine.fixture.orm. - - If you want to append the fixtures instead of flushing the database first you can use the --append option: - - php %command.full_name% --append - - By default Doctrine Data Fixtures uses DELETE statements to drop the existing rows from the database. - If you want to use a TRUNCATE statement instead you can use the --purge-with-truncate flag: - - php %command.full_name% --purge-with-truncate - - To execute only fixtures that live in a certain group, use: - - php %command.full_name% --group=group1 - - EOT); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $ui = new SymfonyStyle($input, $output); - - $em = $this->getDoctrine()->getManager($input->getOption('em')); - assert($em instanceof EntityManagerInterface); - - if (! $input->getOption('append')) { - if (! $ui->confirm(sprintf('Careful, database "%s" will be purged. Do you want to continue?', $em->getConnection()->getDatabase()), ! $input->isInteractive())) { - return 0; - } - } - - $groups = $input->getOption('group'); - $fixtures = $this->fixturesLoader->getFixtures($groups); - if (! $fixtures) { - $message = 'Could not find any fixture services to load'; - - if (! empty($groups)) { - $message .= sprintf(' in the groups (%s)', implode(', ', $groups)); - } - - $ui->error($message . '.'); - - return 1; - } - - if (! isset($this->purgerFactories[$input->getOption('purger')])) { - $ui->warning(sprintf( - 'Could not find purger factory with alias "%1$s", using default purger. Did you forget to register the %2$s implementation with tag "%3$s" and alias "%1$s"?', - $input->getOption('purger'), - PurgerFactory::class, - PurgerFactoryCompilerPass::PURGER_FACTORY_TAG, - )); - $factory = new ORMPurgerFactory(); - } else { - $factory = $this->purgerFactories[$input->getOption('purger')]; - } - - $purger = $factory->createForEntityManager( - $input->getOption('em'), - $em, - $input->getOption('purge-exclusions'), - $input->getOption('purge-with-truncate'), - ); - $executor = new ORMExecutor($em, $purger); - $executor->setLogger(static function ($message) use ($ui): void { - $ui->text(sprintf(' > %s', $message)); - }); - $executor->execute($fixtures, $input->getOption('append')); - - return 0; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DependencyInjection/CompilerPass/FixturesCompilerPass.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DependencyInjection/CompilerPass/FixturesCompilerPass.php deleted file mode 100644 index 743052b61..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DependencyInjection/CompilerPass/FixturesCompilerPass.php +++ /dev/null @@ -1,39 +0,0 @@ -getDefinition('doctrine.fixtures.loader'); - $taggedServices = $container->findTaggedServiceIds(self::FIXTURE_TAG); - - $fixtures = []; - foreach ($taggedServices as $serviceId => $tags) { - $groups = []; - foreach ($tags as $tagData) { - if (! isset($tagData['group'])) { - continue; - } - - $groups[] = $tagData['group']; - } - - $fixtures[] = [ - 'fixture' => new Reference($serviceId), - 'groups' => $groups, - ]; - } - - $definition->addMethodCall('addFixtures', [$fixtures]); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DependencyInjection/CompilerPass/PurgerFactoryCompilerPass.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DependencyInjection/CompilerPass/PurgerFactoryCompilerPass.php deleted file mode 100644 index da84848e3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DependencyInjection/CompilerPass/PurgerFactoryCompilerPass.php +++ /dev/null @@ -1,36 +0,0 @@ -getDefinition('doctrine.fixtures_load_command'); - $taggedServices = $container->findTaggedServiceIds(self::PURGER_FACTORY_TAG); - - $purgerFactories = []; - foreach ($taggedServices as $serviceId => $tags) { - foreach ($tags as $tagData) { - if (! isset($tagData['alias'])) { - throw new LogicException(sprintf('Proxy factory "%s" must define an alias', $serviceId)); - } - - $purgerFactories[$tagData['alias']] = new Reference($serviceId); - } - } - - $definition->setArgument(2, $purgerFactories); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DependencyInjection/DoctrineFixturesExtension.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DependencyInjection/DoctrineFixturesExtension.php deleted file mode 100644 index 0c5ef0f51..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DependencyInjection/DoctrineFixturesExtension.php +++ /dev/null @@ -1,30 +0,0 @@ -load('services.xml'); - - $container->registerForAutoconfiguration(ORMFixtureInterface::class) - ->addTag(FixturesCompilerPass::FIXTURE_TAG); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DoctrineFixturesBundle.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DoctrineFixturesBundle.php deleted file mode 100644 index 435f6c398..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/DoctrineFixturesBundle.php +++ /dev/null @@ -1,19 +0,0 @@ -addCompilerPass(new FixturesCompilerPass()); - $container->addCompilerPass(new PurgerFactoryCompilerPass()); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Fixture.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Fixture.php deleted file mode 100644 index 3fb0cee3b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Fixture.php +++ /dev/null @@ -1,15 +0,0 @@ -> */ - private array $groupsFixtureMapping = []; - - /** - * @internal - * - * @psalm-param list}> $fixtures - */ - public function addFixtures(array $fixtures): void - { - // Because parent::addFixture may call $this->createFixture - // we cannot call $this->addFixture in this loop - foreach ($fixtures as $fixture) { - $class = get_class($fixture['fixture']); - $this->loadedFixtures[$class] = $fixture['fixture']; - $this->addGroupsFixtureMapping($class, $fixture['groups']); - } - - // Now that all fixtures are in the $this->loadedFixtures array, - // it is safe to call $this->addFixture in this loop - foreach ($this->loadedFixtures as $fixture) { - $this->addFixture($fixture); - } - } - - public function addFixture(FixtureInterface $fixture): void - { - $class = $fixture::class; - $this->loadedFixtures[$class] = $fixture; - - $reflection = new ReflectionClass($fixture); - $this->addGroupsFixtureMapping($class, [$reflection->getShortName()]); - - if ($fixture instanceof FixtureGroupInterface) { - $this->addGroupsFixtureMapping($class, $fixture::getGroups()); - } - - parent::addFixture($fixture); - } - - /** - * Overridden to not allow new fixture classes to be instantiated. - * {@inheritDoc} - */ - protected function createFixture($class): FixtureInterface - { - /* - * We don't actually need to create the fixture. We just - * return the one that already exists. - */ - - if (! isset($this->loadedFixtures[$class])) { - throw new LogicException(sprintf( - 'The "%s" fixture class is trying to be loaded, but is not available. Make sure this class is defined as a service and tagged with "%s".', - $class, - FixturesCompilerPass::FIXTURE_TAG, - )); - } - - return $this->loadedFixtures[$class]; - } - - /** - * Returns the array of data fixtures to execute. - * - * @param string[] $groups - * - * @return FixtureInterface[] - */ - public function getFixtures(array $groups = []): array - { - $fixtures = parent::getFixtures(); - - if (empty($groups)) { - return $fixtures; - } - - $filteredFixtures = []; - foreach ($fixtures as $fixture) { - foreach ($groups as $group) { - $fixtureClass = $fixture::class; - if (isset($this->groupsFixtureMapping[$group][$fixtureClass])) { - $filteredFixtures[$fixtureClass] = $fixture; - continue 2; - } - } - } - - foreach ($filteredFixtures as $fixture) { - $this->validateDependencies($filteredFixtures, $fixture); - } - - return array_values($filteredFixtures); - } - - /** - * Generates an array of the groups and their fixtures - * - * @param string[] $groups - */ - private function addGroupsFixtureMapping(string $className, array $groups): void - { - foreach ($groups as $group) { - $this->groupsFixtureMapping[$group][$className] = true; - } - } - - /** - * @param string[] $fixtures An array of fixtures with class names as keys - * - * @throws RuntimeException - */ - private function validateDependencies(array $fixtures, FixtureInterface $fixture): void - { - if (! $fixture instanceof DependentFixtureInterface) { - return; - } - - $dependenciesClasses = $fixture->getDependencies(); - - foreach ($dependenciesClasses as $class) { - if (! array_key_exists($class, $fixtures)) { - throw new RuntimeException(sprintf('Fixture "%s" was declared as a dependency for fixture "%s", but it was not included in any of the loaded fixture groups.', $class, $fixture::class)); - } - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/ORMFixtureInterface.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/ORMFixtureInterface.php deleted file mode 100644 index 59260d905..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/ORMFixtureInterface.php +++ /dev/null @@ -1,14 +0,0 @@ -setPurgeMode($purgeWithTruncate ? ORMPurger::PURGE_MODE_TRUNCATE : ORMPurger::PURGE_MODE_DELETE); - - return $purger; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Purger/PurgerFactory.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Purger/PurgerFactory.php deleted file mode 100644 index 41b0c869b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Purger/PurgerFactory.php +++ /dev/null @@ -1,19 +0,0 @@ - $excluded */ - public function createForEntityManager( - string|null $emName, - EntityManagerInterface $em, - array $excluded = [], - bool $purgeWithTruncate = false, - ): PurgerInterface; -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/README.markdown b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/README.markdown deleted file mode 100644 index 1fc58728a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/README.markdown +++ /dev/null @@ -1,7 +0,0 @@ -DoctrineFixturesBundle -====================== - -This bundle integrates the [Doctrine2 Data Fixtures library](https://github.com/doctrine/data-fixtures) -into Symfony so that you can load data fixtures programmatically into the Doctrine ORM or ODM. - -Read the full [documentation of this bundle](http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html). diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Resources/config/services.xml b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Resources/config/services.xml deleted file mode 100644 index 12d7ea523..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Resources/config/services.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Resources/doc/index.rst b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Resources/doc/index.rst deleted file mode 100644 index 0741d6c67..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/Resources/doc/index.rst +++ /dev/null @@ -1,447 +0,0 @@ -DoctrineFixturesBundle -====================== - -Fixtures are used to load a "fake" set of data into a database that can then -be used for testing or to help give you some interesting data while you're -developing your application. - -This bundle is compatible with any database supported by `Doctrine ORM`_ -(MySQL, PostgreSQL, SQLite, etc.). If you are using MongoDB, you must use -`DoctrineMongoDBBundle`_ instead. - -Installation ------------- - -In Symfony 4 or higher applications that use `Symfony Flex`_, open a command -console, enter your project directory and run the following command: - -.. code-block:: terminal - - $ composer require --dev orm-fixtures - -Starting from Symfony 4.0, Flex should be used by default and register the -bundle for you, and in that case you can skip to the next section and start -writing fixtures. - -In Symfony 3 applications (or when not using Symfony Flex), run this other -command instead: - -.. code-block:: terminal - - $ composer require --dev doctrine/doctrine-fixtures-bundle - -You will also need to enable the bundle. In Symfony 3 and earlier applications, -update the ``AppKernel`` class:: - - // app/AppKernel.php - - // ... - // registerBundles() - if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { - // ... - $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); - } - -Writing Fixtures ----------------- - -Data fixtures are PHP classes where you create objects and persist them to the -database. - -Imagine that you want to add some ``Product`` objects to your database. No problem! -Create a fixtures class and start adding products:: - - // src/DataFixtures/AppFixtures.php - namespace App\DataFixtures; - - use App\Entity\Product; - use Doctrine\Bundle\FixturesBundle\Fixture; - use Doctrine\Persistence\ObjectManager; - - class AppFixtures extends Fixture - { - public function load(ObjectManager $manager) - { - // create 20 products! Bam! - for ($i = 0; $i < 20; $i++) { - $product = new Product(); - $product->setName('product '.$i); - $product->setPrice(mt_rand(10, 100)); - $manager->persist($product); - } - - $manager->flush(); - } - } - -Loading Fixtures ----------------- - -Once your fixtures have been written, load them by executing this command: - -.. code-block:: terminal - - # when using the ORM - $ php bin/console doctrine:fixtures:load - -.. caution:: - - By default the ``load`` command **purges the database**, removing all data - from every table. To append your fixtures' data add the ``--append`` option. - -This command looks for all services tagged with ``doctrine.fixture.orm``. If you're -using the `default service configuration`_, any class that implements ``ORMFixtureInterface`` -(for example, those extending from ``Fixture``) will automatically be registered -with this tag. - -To see other options for the command, run: - -.. code-block:: terminal - - $ php bin/console doctrine:fixtures:load --help - -Accessing Services from the Fixtures ------------------------------------- - -In some cases you may need to access your application's services inside a fixtures -class. No problem! Your fixtures class is a service, so you can use normal dependency -injection:: - - // src/DataFixtures/AppFixtures.php - use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; - - class AppFixtures extends Fixture - { - private UserPasswordHasherInterface $hasher; - - public function __construct(UserPasswordHasherInterface $hasher) - { - $this->hasher = $hasher; - } - - // ... - public function load(ObjectManager $manager) - { - $user = new User(); - $user->setUsername('admin'); - - $password = $this->hasher->hashPassword($user, 'pass_1234'); - $user->setPassword($password); - - $manager->persist($user); - $manager->flush(); - } - } - -.. _multiple-files: - -Splitting Fixtures into Separate Files --------------------------------------- - -In most applications, creating all your fixtures in just one class is fine. -This class may end up being a bit long, but it's worth it because having one -file helps keeping things simple. - -If you do decide to split your fixtures into separate files, Symfony helps you -solve the two most common issues: sharing objects between fixtures and loading -the fixtures in order. - -Sharing Objects between Fixtures -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When using multiple fixtures files, you can reuse PHP objects across different -files thanks to the **object references**. Use the ``addReference()`` method to -give a name to any object and then, use the ``getReference()`` method to get the -exact same object via its name. - -.. note:: - - Adding object references only works for ORM entities or ODM documents. - -.. code-block:: php - - // src/DataFixtures/UserFixtures.php - // ... - class UserFixtures extends Fixture - { - public const ADMIN_USER_REFERENCE = 'admin-user'; - - public function load(ObjectManager $manager) - { - $userAdmin = new User('admin', 'pass_1234'); - $manager->persist($userAdmin); - $manager->flush(); - - // other fixtures can get this object using the UserFixtures::ADMIN_USER_REFERENCE constant - $this->addReference(self::ADMIN_USER_REFERENCE, $userAdmin); - } - } - -.. code-block:: php - - // src/DataFixtures/GroupFixtures.php - // ... - class GroupFixtures extends Fixture - { - public function load(ObjectManager $manager) - { - $userGroup = new Group('administrators'); - // this reference returns the User object created in UserFixtures - $userGroup->addUser($this->getReference(UserFixtures::ADMIN_USER_REFERENCE)); - - $manager->persist($userGroup); - $manager->flush(); - } - } - -The only caveat of using references is that fixtures need to be loaded in a -certain order (in this example, if the ``Group`` fixtures are load before the -``User`` fixtures, you'll see an error). By default Doctrine loads the fixture -files in alphabetical order, but you can control their order as explained in the -next section. - -Loading the Fixture Files in Order -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Instead of defining the exact order in which all fixture files must be loaded, -Doctrine uses a smarter approach to ensure that some fixtures are loaded before -others. Implement the ``DependentFixtureInterface`` and add a new -``getDependencies()`` method to your fixtures class. This will return -an array of the fixture classes that must be loaded before this one:: - - // src/DataFixtures/UserFixtures.php - namespace App\DataFixtures; - - // ... - class UserFixtures extends Fixture - { - public function load(ObjectManager $manager) - { - // ... - } - } - - // src/DataFixtures/GroupFixtures.php - namespace App\DataFixtures; - // ... - use App\DataFixtures\UserFixtures; - use Doctrine\Common\DataFixtures\DependentFixtureInterface; - - class GroupFixtures extends Fixture implements DependentFixtureInterface - { - public function load(ObjectManager $manager) - { - // ... - } - - public function getDependencies() - { - return [ - UserFixtures::class, - ]; - } - } - -Fixture Groups: Only Executing Some Fixtures --------------------------------------------- - -By default, *all* of your fixture classes are executed. If you only want -to execute *some* of your fixture classes, you can organize them into -groups. - -The simplest way to organize a fixture class into a group is to -make your fixture implement ``FixtureGroupInterface``: - -.. code-block:: diff - - // src/DataFixtures/UserFixtures.php - - + use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface; - - - class UserFixtures extends Fixture - + class UserFixtures extends Fixture implements FixtureGroupInterface - { - // ... - - + public static function getGroups(): array - + { - + return ['group1', 'group2']; - + } - } - -To execute all of your fixtures for a given group, pass the ``--group`` -option: - -.. code-block:: terminal - - $ php bin/console doctrine:fixtures:load --group=group1 - - # or to execute multiple groups - $ php bin/console doctrine:fixtures:load --group=group1 --group=group2 - -Alternatively, instead of implementing the ``FixtureGroupInterface``, -you can also tag your service with ``doctrine.fixture.orm`` and add -an extra ``group`` option set to a group your fixture should belong to. - -Regardless of groups defined in the fixture or the service definition, the -fixture loader always adds the short name of the class as a separate group so -you can load a single fixture at a time. In the example above, you can load the -fixture using the ``UserFixtures`` group: - -.. code-block:: terminal - - $ php bin/console doctrine:fixtures:load --group=UserFixtures - -.. _`ORM`: https://symfony.com/doc/current/doctrine.html -.. _`installation chapter`: https://getcomposer.org/doc/00-intro.md -.. _`Symfony Flex`: https://symfony.com/doc/current/setup/flex.html -.. _`default service configuration`: https://symfony.com/doc/current/service_container.html#service-container-services-load-example - - -Specifying purging behavior ---------------------------- - -By default all previously existing data is purged using ``DELETE FROM table`` statements. If you prefer to use -``TRUNCATE table`` statements for purging, use ``--purge-with-truncate``. - -If you want to exclude a set of tables from being purged, e.g. because your schema comes with pre-populated, -semi-static data, pass the option ``--purge-exclusions``. Specify ``--purge-exclusions`` multiple times to exclude -multiple tables: - -.. code-block:: terminal - - $ php bin/console doctrine:fixtures:load --purge-exclusions=post_category --purge-exclusions=comment_type - -You can also customize purging behavior significantly more and implement a custom purger plus a custom purger factory:: - - // src/Purger/CustomPurger.php - namespace App\Purger; - - use Doctrine\Common\DataFixtures\Purger\PurgerInterface; - - // ... - class CustomPurger implements PurgerInterface - { - public function purge() : void - { - // ... - } - } - - // src/Purger/CustomPurgerFactory.php - namespace App\Purger; - // ... - use Doctrine\Bundle\FixturesBundle\Purger\PurgerFactory; - - class CustomPurgerFactory implements PurgerFactory - { - public function createForEntityManager(?string $emName, EntityManagerInterface $em, array $excluded = [], bool $purgeWithTruncate = false) : PurgerInterface - { - return new CustomPurger($em); - } - } - -The next step is to register our custom purger factory and specify its alias. - -.. configuration-block:: - - .. code-block:: yaml - - # config/services.yaml - services: - App\Purger\CustomPurgerFactory: - tags: - - { name: 'doctrine.fixtures.purger_factory', alias: 'my_purger' } - - .. code-block:: xml - - - - - - - - - - - - - .. code-block:: php - - // config/services.php - namespace Symfony\Component\DependencyInjection\Loader\Configurator; - - use App\Purger\CustomerPurgerFactory; - - return function(ContainerConfigurator $configurator) : void { - $services = $configurator->services(); - - $services->set(CustomerPurgerFactory::class) - ->tag('doctrine.fixtures.purger_factory', ['alias' => 'my_purger']) - ; - }; - -With the ``--purger`` option we can now specify to use ``my_purger`` instead of the ``default`` purger. - -.. code-block:: terminal - - $ php bin/console doctrine:fixtures:load --purger=my_purger - -.. _`Doctrine ORM`: https://symfony.com/doc/current/doctrine.html -.. _`DoctrineMongoDBBundle`: https://github.com/doctrine/DoctrineMongoDBBundle - - -How to load Fixtures from a different Directory ------------------------------------------------ -By default, fixtures are loaded from the ``src/DataFixtures`` directory. -In this example, we are going to load our DataFixtures from a new ``fixtures`` directory. - -First, add a new ``PSR-4`` autoload-entry in the ``composer.json`` with the new ``fixtures`` directory: - -.. code-block:: json - - "autoload-dev": { - "psr-4": { - "...": "...", - "DataFixtures\\": "fixtures/" - } - }, - -.. note:: - - You need to dump the autoloader with ``composer dump-autoloader`` - -Then, enable Dependency Injection for the ``fixtures`` directory: - -.. configuration-block:: - - .. code-block:: yaml - - # config/services.yaml - services: - DataFixtures\: - resource: '../fixtures' - - .. code-block:: php - - // config/services.php - namespace Symfony\Component\DependencyInjection\Loader\Configurator; - - return function(ContainerConfigurator $container) : void { - $services = $container->services() - ->defaults() - ->autowire() - ->autoconfigure(); - - $services->load('DataFixtures\\', '../fixtures'); - }; - -.. caution:: - - This will not override the default ``src/DataFixtures`` directory when creating fixtures with the - `Symfony MakerBundle`_ (``make:fixtures``). - -.. _`Symfony MakerBundle`: https://symfony.com/bundles/SymfonyMakerBundle/current/index.html diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/UPGRADE.md b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/UPGRADE.md deleted file mode 100644 index f602be1b1..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/UPGRADE.md +++ /dev/null @@ -1,56 +0,0 @@ -UPGRADE to 3.0 -============== - -* The automatic loading of fixtures in a directory (e.g. - AppBundle\DataFixtures\ORM) was removed. Instead, register - your fixture classes as services and tag them with `doctrine.fixture.orm`, - like this: -```yaml -# src/AppBundle/Resources/config/dataFixture.yml -services: - _defaults: - tags: ['doctrine.fixture.orm'] - autowire: true # if you need dependency injection, see next bullet point - - AppBundle\DataFixtures\ORM\: - resource: '../../DataFixtures/ORM/*' -``` - - This will happen automatically if you're using the Symfony 3.3 - or higher **default service configuration** and your fixture classes - extend the normal ``Doctrine\Bundle\FixturesBundle\Fixture`` class, - or implement the new ``Doctrine\Bundle\FixturesBundle\ORMFixtureInterface``. - -* The base ``Fixture`` class no longer implements ``ContainerAwareInterface`` - and so no longer have a ``$this->container`` property. You *can* manually - implement this interface. Or, a better idea is to update your fixtures - to use dependency injection: - -```diff -class MyFixture extends Fixture -{ -+ private $someService; - -+ public function __construct(SomeService $someService) -+ { -+ $this->someService = $someService; -+ } - - public function load(ObjectManager $manager) - { -- $this->container->get('some_service')->someMethod(); -+ $this->someService->someMethod(); - } -} -``` - -* The base ``Fixture`` class no longer implements ``DependentFixtureInterface``. - If you want to have a ``getDependencies()`` method, be sure to implement - this interface explicitly: - -```diff -+ use Doctrine\Common\DataFixtures\DependentFixtureInterface; - -- class MyFixture extends Fixture -+ class MyFixture extends Fixture implements DependentFixtureInterface -``` diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/composer.json b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/composer.json deleted file mode 100644 index 259a8169e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-fixtures-bundle/composer.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "doctrine/doctrine-fixtures-bundle", - "type": "symfony-bundle", - "description": "Symfony DoctrineFixturesBundle", - "keywords": ["Persistence", "Fixture"], - "homepage": "https://www.doctrine-project.org", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Doctrine Project", - "homepage": "https://www.doctrine-project.org" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": "^8.1", - "doctrine/data-fixtures": "^1.3", - "doctrine/doctrine-bundle": "^2.2", - "doctrine/orm": "^2.14.0 || ^3.0", - "doctrine/persistence": "^2.4|^3.0", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/doctrine-bridge": "^5.4|^6.0|^7.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0" - }, - "require-dev": { - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.10.39", - "phpunit/phpunit": "^9.6.13", - "symfony/phpunit-bridge": "^6.3.6", - "vimeo/psalm": "^5.15" - }, - "conflict": { - "doctrine/dbal": "< 3" - }, - "autoload": { - "psr-4": { "Doctrine\\Bundle\\FixturesBundle\\": "" } - }, - "config": { - "sort-packages": true, - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/.symfony.bundle.yaml b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/.symfony.bundle.yaml deleted file mode 100644 index 6e4ed0103..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/.symfony.bundle.yaml +++ /dev/null @@ -1,4 +0,0 @@ -branches: ["2.2.x", "3.0.x", "3.1.x", "3.2.x", "3.3.x", "3.4.x"] -maintained_branches: ["2.2.x", "3.3.x", "3.4.x"] -doc_dir: "Resources/doc/" -dev_branch: "3.4.x" diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Changelog.md b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Changelog.md deleted file mode 100644 index 7138a3147..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Changelog.md +++ /dev/null @@ -1,13 +0,0 @@ -## 1.1.0 (2015-09-29) - -Features: - -* Allowed DoctrineMigrationsBundle to work with Symfony apps using DBAL only - -## 1.0.1 (2015-05-06) - -* Allowed Symfony 3.0 components - -## 1.0.0 (2014-08-17) - -Initial stable release diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Collector/MigrationsCollector.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Collector/MigrationsCollector.php deleted file mode 100644 index 31d4fd402..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Collector/MigrationsCollector.php +++ /dev/null @@ -1,95 +0,0 @@ -dependencyFactory = $dependencyFactory; - $this->flattener = $migrationsFlattener; - } - - /** - * @return void - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if (!empty($this->data)) { - return; - } - - $metadataStorage = $this->dependencyFactory->getMetadataStorage(); - $planCalculator = $this->dependencyFactory->getMigrationPlanCalculator(); - - try { - $executedMigrations = $metadataStorage->getExecutedMigrations(); - } catch (Exception $dbalException) { - $this->dependencyFactory->getLogger()->error( - 'error while trying to collect executed migrations', - ['exception' => $dbalException] - ); - - return; - } - - $availableMigrations = $planCalculator->getMigrations(); - - $this->data['available_migrations_count'] = count($availableMigrations); - $unavailableMigrations = $executedMigrations->unavailableSubset($availableMigrations); - $this->data['unavailable_migrations_count'] = count($unavailableMigrations); - - $newMigrations = $availableMigrations->newSubset($executedMigrations); - $this->data['new_migrations'] = $this->flattener->flattenAvailableMigrations($newMigrations); - $this->data['executed_migrations'] = $this->flattener->flattenExecutedMigrations($executedMigrations, $availableMigrations); - - $this->data['storage'] = get_class($metadataStorage); - $configuration = $this->dependencyFactory->getConfiguration(); - $storage = $configuration->getMetadataStorageConfiguration(); - if ($storage instanceof TableMetadataStorageConfiguration) { - $this->data['table'] = $storage->getTableName(); - $this->data['column'] = $storage->getVersionColumnName(); - } - - $connection = $this->dependencyFactory->getConnection(); - $this->data['driver'] = get_class($connection->getDriver()); - $this->data['name'] = $connection->getDatabase(); - - $this->data['namespaces'] = $configuration->getMigrationDirectories(); - } - - /** - * @return string - */ - public function getName() - { - return 'doctrine_migrations'; - } - - public function getData() - { - return $this->data; - } - - /** - * @return void - */ - public function reset() - { - $this->data = []; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Collector/MigrationsFlattener.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Collector/MigrationsFlattener.php deleted file mode 100644 index 23379f415..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Collector/MigrationsFlattener.php +++ /dev/null @@ -1,48 +0,0 @@ - (string)$migration->getVersion(), - 'is_new' => true, - 'is_unavailable' => false, - 'description' => $migration->getMigration()->getDescription(), - 'executed_at' => null, - 'execution_time' => null, - 'file' => (new \ReflectionClass($migration->getMigration()))->getFileName(), - ]; - }, $migrationsList->getItems()); - } - - public function flattenExecutedMigrations(ExecutedMigrationsList $migrationsList, AvailableMigrationsList $availableMigrations): array - { - return array_map(static function (ExecutedMigration $migration) use ($availableMigrations) { - - $availableMigration = $availableMigrations->hasMigration($migration->getVersion()) - ? $availableMigrations->getMigration($migration->getVersion())->getMigration() - : null; - - return [ - 'version' => (string)$migration->getVersion(), - 'is_new' => false, - 'is_unavailable' => !$availableMigration, - 'description' => $availableMigration ? $availableMigration->getDescription() : null, - 'executed_at' => $migration->getExecutedAt(), - 'execution_time' => $migration->getExecutionTime(), - 'file' => $availableMigration ? (new \ReflectionClass($availableMigration))->getFileName() : null, - ]; - }, $migrationsList->getItems()); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/CompilerPass/ConfigureDependencyFactoryPass.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/CompilerPass/ConfigureDependencyFactoryPass.php deleted file mode 100644 index 5dcdc6b05..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/CompilerPass/ConfigureDependencyFactoryPass.php +++ /dev/null @@ -1,115 +0,0 @@ -has('doctrine')) { - throw new RuntimeException('DoctrineMigrationsBundle requires DoctrineBundle to be enabled.'); - } - - $diDefinition = $container->getDefinition('doctrine.migrations.dependency_factory'); - - $preferredConnection = $container->getParameter('doctrine.migrations.preferred_connection'); - assert(is_string($preferredConnection) || $preferredConnection === null); - // explicitly use configured connection - if ($preferredConnection !== null) { - $this->validatePreferredConnection($container, $preferredConnection); - - $loaderDefinition = $container->getDefinition('doctrine.migrations.connection_registry_loader'); - $loaderDefinition->setArgument(1, $preferredConnection); - - $diDefinition->setFactory([DependencyFactory::class, 'fromConnection']); - $diDefinition->setArgument(1, new Reference('doctrine.migrations.connection_registry_loader')); - - return; - } - - $preferredEm = $container->getParameter('doctrine.migrations.preferred_em'); - assert(is_string($preferredEm) || $preferredEm === null); - // explicitly use configured entity manager - if ($preferredEm !== null) { - $this->validatePreferredEm($container, $preferredEm); - - $loaderDefinition = $container->getDefinition('doctrine.migrations.entity_manager_registry_loader'); - $loaderDefinition->setArgument(1, $preferredEm); - - $diDefinition->setFactory([DependencyFactory::class, 'fromEntityManager']); - $diDefinition->setArgument(1, new Reference('doctrine.migrations.entity_manager_registry_loader')); - - return; - } - - // try to use any/default entity manager - if ( - $container->hasParameter('doctrine.entity_managers') - && is_array($container->getParameter('doctrine.entity_managers')) - && count($container->getParameter('doctrine.entity_managers')) > 0 - ) { - $diDefinition->setFactory([DependencyFactory::class, 'fromEntityManager']); - $diDefinition->setArgument(1, new Reference('doctrine.migrations.entity_manager_registry_loader')); - - return; - } - - // fallback on any/default connection - $diDefinition->setFactory([DependencyFactory::class, 'fromConnection']); - $diDefinition->setArgument(1, new Reference('doctrine.migrations.connection_registry_loader')); - } - - private function validatePreferredConnection(ContainerBuilder $container, string $preferredConnection): void - { - /** @var array $allowedConnections */ - $allowedConnections = $container->getParameter('doctrine.connections'); - if (! isset($allowedConnections[$preferredConnection])) { - throw new InvalidArgumentException(sprintf( - 'The "%s" connection is not defined. Did you mean one of the following: %s', - $preferredConnection, - implode(', ', array_keys($allowedConnections)) - )); - } - } - - private function validatePreferredEm(ContainerBuilder $container, string $preferredEm): void - { - if ( - ! $container->hasParameter('doctrine.entity_managers') - || ! is_array($container->getParameter('doctrine.entity_managers')) - || count($container->getParameter('doctrine.entity_managers')) === 0 - ) { - throw new InvalidArgumentException(sprintf( - 'The "%s" entity manager is not defined. It seems that you do not have configured any entity manager in the DoctrineBundle.', - $preferredEm - )); - } - - /** @var array $allowedEms */ - $allowedEms = $container->getParameter('doctrine.entity_managers'); - if (! isset($allowedEms[$preferredEm])) { - throw new InvalidArgumentException(sprintf( - 'The "%s" entity manager is not defined. Did you mean one of the following: %s', - $preferredEm, - implode(', ', array_keys($allowedEms)) - )); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/Configuration.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/Configuration.php deleted file mode 100644 index 2c69caaa3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,180 +0,0 @@ -getRootNode(); - - $organizeMigrationModes = $this->getOrganizeMigrationsModes(); - - $rootNode - ->fixXmlConfig('migration', 'migrations') - ->fixXmlConfig('migrations_path', 'migrations_paths') - ->children() - ->arrayNode('migrations_paths') - ->info('A list of namespace/path pairs where to look for migrations.') - ->defaultValue([]) - ->useAttributeAsKey('namespace') - ->prototype('scalar')->end() - ->end() - - ->arrayNode('services') - ->info('A set of services to pass to the underlying doctrine/migrations library, allowing to change its behaviour.') - ->useAttributeAsKey('service') - ->defaultValue([]) - ->validate() - ->ifTrue(static function (array $v): bool { - return count(array_filter(array_keys($v), static function (string $doctrineService): bool { - return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0; - })) !== 0; - }) - ->thenInvalid('Valid services for the DoctrineMigrationsBundle must be in the "Doctrine\Migrations" namespace.') - ->end() - ->prototype('scalar')->end() - ->end() - - ->arrayNode('factories') - ->info('A set of callables to pass to the underlying doctrine/migrations library as services, allowing to change its behaviour.') - ->useAttributeAsKey('factory') - ->defaultValue([]) - ->validate() - ->ifTrue(static function (array $v): bool { - return count(array_filter(array_keys($v), static function (string $doctrineService): bool { - return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0; - })) !== 0; - }) - ->thenInvalid('Valid callables for the DoctrineMigrationsBundle must be in the "Doctrine\Migrations" namespace.') - ->end() - ->prototype('scalar')->end() - ->end() - - ->arrayNode('storage') - ->addDefaultsIfNotSet() - ->info('Storage to use for migration status metadata.') - ->children() - ->arrayNode('table_storage') - ->addDefaultsIfNotSet() - ->info('The default metadata storage, implemented as a table in the database.') - ->children() - ->scalarNode('table_name')->defaultValue(null)->cannotBeEmpty()->end() - ->scalarNode('version_column_name')->defaultValue(null)->end() - ->scalarNode('version_column_length')->defaultValue(null)->end() - ->scalarNode('executed_at_column_name')->defaultValue(null)->end() - ->scalarNode('execution_time_column_name')->defaultValue(null)->end() - ->end() - ->end() - ->end() - ->end() - - ->arrayNode('migrations') - ->info('A list of migrations to load in addition to the one discovered via "migrations_paths".') - ->prototype('scalar')->end() - ->defaultValue([]) - ->end() - ->scalarNode('connection') - ->info('Connection name to use for the migrations database.') - ->defaultValue(null) - ->end() - ->scalarNode('em') - ->info('Entity manager name to use for the migrations database (available when doctrine/orm is installed).') - ->defaultValue(null) - ->end() - ->scalarNode('all_or_nothing') - ->info('Run all migrations in a transaction.') - ->defaultValue(false) - ->end() - ->scalarNode('check_database_platform') - ->info('Adds an extra check in the generated migrations to allow execution only on the same platform as they were initially generated on.') - ->defaultValue(true) - ->end() - ->scalarNode('custom_template') - ->info('Custom template path for generated migration classes.') - ->defaultValue(null) - ->end() - ->scalarNode('organize_migrations') - ->defaultValue(false) - ->info('Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false') - ->validate() - ->ifTrue(static function ($v) use ($organizeMigrationModes): bool { - if ($v === false) { - return false; - } - - return ! is_string($v) || ! in_array(strtoupper($v), $organizeMigrationModes, true); - }) - ->thenInvalid('Invalid organize migrations mode value %s') - ->end() - ->validate() - ->ifString() - ->then(static function ($v) { - return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_' . strtoupper($v)); - }) - ->end() - ->end() - ->booleanNode('enable_profiler') - ->info('Whether or not to enable the profiler collector to calculate and visualize migration status. This adds some queries overhead.') - ->defaultFalse() - ->end() - ->booleanNode('transactional') - ->info('Whether or not to wrap migrations in a single transaction.') - ->defaultTrue() - ->end() - ->end(); - - return $treeBuilder; - } - - /** - * Find organize migrations modes for their names - * - * @return string[] - */ - private function getOrganizeMigrationsModes(): array - { - $constPrefix = 'VERSIONS_ORGANIZATION_'; - $prefixLen = strlen($constPrefix); - $refClass = new ReflectionClass('Doctrine\Migrations\Configuration\Configuration'); - $constsArray = array_keys($refClass->getConstants()); - $namesArray = []; - - foreach ($constsArray as $constant) { - if (strpos($constant, $constPrefix) !== 0) { - continue; - } - - $namesArray[] = substr($constant, $prefixLen); - } - - return $namesArray; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/DoctrineMigrationsExtension.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/DoctrineMigrationsExtension.php deleted file mode 100644 index e855d1028..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/DoctrineMigrationsExtension.php +++ /dev/null @@ -1,205 +0,0 @@ -|string>|string>> $configs - */ - public function load(array $configs, ContainerBuilder $container): void - { - $configuration = new Configuration(); - - $config = $this->processConfiguration($configuration, $configs); - - $locator = new FileLocator(__DIR__ . '/../Resources/config/'); - $loader = new XmlFileLoader($container, $locator); - - $loader->load('services.xml'); - - $configurationDefinition = $container->getDefinition('doctrine.migrations.configuration'); - - foreach ($config['migrations_paths'] as $ns => $path) { - $path = $this->checkIfBundleRelativePath($path, $container); - $configurationDefinition->addMethodCall('addMigrationsDirectory', [$ns, $path]); - } - - foreach ($config['migrations'] as $migrationClass) { - $configurationDefinition->addMethodCall('addMigrationClass', [$migrationClass]); - } - - if ($config['organize_migrations'] !== false) { - $configurationDefinition->addMethodCall('setMigrationOrganization', [$config['organize_migrations']]); - } - - if ($config['custom_template'] !== null) { - $configurationDefinition->addMethodCall('setCustomTemplate', [$config['custom_template']]); - } - - $configurationDefinition->addMethodCall('setAllOrNothing', [$config['all_or_nothing']]); - $configurationDefinition->addMethodCall('setCheckDatabasePlatform', [$config['check_database_platform']]); - - if ($config['enable_profiler']) { - $this->registerCollector($container); - } - - $configurationDefinition->addMethodCall('setTransactional', [$config['transactional']]); - - $diDefinition = $container->getDefinition('doctrine.migrations.dependency_factory'); - - if (! isset($config['services'][MigrationFactory::class])) { - $config['services'][MigrationFactory::class] = 'doctrine.migrations.migrations_factory'; - } - - foreach ($config['services'] as $doctrineId => $symfonyId) { - $diDefinition->addMethodCall('setDefinition', [$doctrineId, new ServiceClosureArgument(new Reference($symfonyId))]); - } - - foreach ($config['factories'] as $doctrineId => $symfonyId) { - $diDefinition->addMethodCall('setDefinition', [$doctrineId, new Reference($symfonyId)]); - } - - if (! isset($config['services'][MetadataStorage::class])) { - $storageConfiguration = $config['storage']['table_storage']; - - $storageDefinition = new Definition(TableMetadataStorageConfiguration::class); - $container->setDefinition('doctrine.migrations.storage.table_storage', $storageDefinition); - $container->setAlias('doctrine.migrations.metadata_storage', 'doctrine.migrations.storage.table_storage'); - - if ($storageConfiguration['table_name'] !== null) { - $storageDefinition->addMethodCall('setTableName', [$storageConfiguration['table_name']]); - } - - if ($storageConfiguration['version_column_name'] !== null) { - $storageDefinition->addMethodCall('setVersionColumnName', [$storageConfiguration['version_column_name']]); - } - - if ($storageConfiguration['version_column_length'] !== null) { - $storageDefinition->addMethodCall('setVersionColumnLength', [$storageConfiguration['version_column_length']]); - } - - if ($storageConfiguration['executed_at_column_name'] !== null) { - $storageDefinition->addMethodCall('setExecutedAtColumnName', [$storageConfiguration['executed_at_column_name']]); - } - - if ($storageConfiguration['execution_time_column_name'] !== null) { - $storageDefinition->addMethodCall('setExecutionTimeColumnName', [$storageConfiguration['execution_time_column_name']]); - } - - $configurationDefinition->addMethodCall('setMetadataStorageConfiguration', [new Reference('doctrine.migrations.storage.table_storage')]); - } - - if ($config['em'] !== null && $config['connection'] !== null) { - throw new InvalidArgumentException( - 'You cannot specify both "connection" and "em" in the DoctrineMigrationsBundle configurations.' - ); - } - - $container->setParameter('doctrine.migrations.preferred_em', $config['em']); - $container->setParameter('doctrine.migrations.preferred_connection', $config['connection']); - - if (interface_exists(ContainerAwareInterface::class)) { - return; - } - - $container->removeDefinition('doctrine.migrations.container_aware_migrations_factory'); - } - - private function checkIfBundleRelativePath(string $path, ContainerBuilder $container): string - { - if (isset($path[0]) && $path[0] === '@') { - $pathParts = explode('/', $path); - $bundleName = substr($pathParts[0], 1); - - $bundlePath = $this->getBundlePath($bundleName, $container); - - return $bundlePath . substr($path, strlen('@' . $bundleName)); - } - - return $path; - } - - private function getBundlePath(string $bundleName, ContainerBuilder $container): string - { - $bundleMetadata = $container->getParameter('kernel.bundles_metadata'); - assert(is_array($bundleMetadata)); - - if (! isset($bundleMetadata[$bundleName])) { - throw new RuntimeException(sprintf( - 'The bundle "%s" has not been registered, available bundles: %s', - $bundleName, - implode(', ', array_keys($bundleMetadata)) - )); - } - - return $bundleMetadata[$bundleName]['path']; - } - - private function registerCollector(ContainerBuilder $container): void - { - $flattenerDefinition = new Definition(MigrationsFlattener::class); - $container->setDefinition('doctrine_migrations.migrations_flattener', $flattenerDefinition); - - $collectorDefinition = new Definition(MigrationsCollector::class, [ - new Reference('doctrine.migrations.dependency_factory'), - new Reference('doctrine_migrations.migrations_flattener'), - ]); - $collectorDefinition - ->addTag('data_collector', [ - 'template' => '@DoctrineMigrations/Collector/migrations.html.twig', - 'id' => 'doctrine_migrations', - 'priority' => '249', - ]); - $container->setDefinition('doctrine_migrations.migrations_collector', $collectorDefinition); - } - - /** - * Returns the base path for the XSD files. - * - * @return string The XSD base path - */ - public function getXsdValidationBasePath(): string - { - return __DIR__ . '/../Resources/config/schema'; - } - - public function getNamespace(): string - { - return 'http://symfony.com/schema/dic/doctrine/migrations/3.0'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DoctrineMigrationsBundle.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DoctrineMigrationsBundle.php deleted file mode 100644 index c91edf529..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/DoctrineMigrationsBundle.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @author Jonathan H. Wage - */ -class DoctrineMigrationsBundle extends Bundle -{ - /** @return void */ - public function build(ContainerBuilder $container) - { - $container->addCompilerPass(new ConfigureDependencyFactoryPass()); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/LICENSE b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/LICENSE deleted file mode 100644 index aa7a99ab6..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2013 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/MigrationsFactory/ContainerAwareMigrationFactory.php b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/MigrationsFactory/ContainerAwareMigrationFactory.php deleted file mode 100644 index 30870bab0..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/MigrationsFactory/ContainerAwareMigrationFactory.php +++ /dev/null @@ -1,45 +0,0 @@ -= 7 - */ -class ContainerAwareMigrationFactory implements MigrationFactory -{ - /** - * @var ContainerInterface - */ - private $container; - - /** - * @var MigrationFactory - */ - private $migrationFactory; - - public function __construct(MigrationFactory $migrationFactory, ContainerInterface $container) - { - $this->container = $container; - $this->migrationFactory = $migrationFactory; - } - - public function createVersion(string $migrationClassName): AbstractMigration - { - $migration = $this->migrationFactory->createVersion($migrationClassName); - - if ($migration instanceof ContainerAwareInterface) { - trigger_deprecation('doctrine/doctrine-migrations-bundle', '3.3', 'Migration "%s" implements "%s" to gain access to the application\'s service container. This method is deprecated and won\'t work with Symfony 7.', $migrationClassName, ContainerAwareInterface::class); - - $migration->setContainer($this->container); - } - - return $migration; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/README.markdown b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/README.markdown deleted file mode 100644 index bd0817ad9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/README.markdown +++ /dev/null @@ -1,9 +0,0 @@ -DoctrineMigrationsBundle -======================== - -This bundle integrates the [Doctrine Migrations library](http://www.doctrine-project.org/projects/migrations.html) -into Symfony applications. Database migrations help you version the changes in -your database schema and apply them in a predictable way on every server running -the application. - -[Read the documentation of this bundle](https://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html). diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/config/schema/doctrine_migrations-3.0.xsd b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/config/schema/doctrine_migrations-3.0.xsd deleted file mode 100644 index 0c5990c30..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/config/schema/doctrine_migrations-3.0.xsd +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/config/services.xml b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/config/services.xml deleted file mode 100644 index cb978718d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/config/services.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - doctrine:migrations:diff - - - - - - - - doctrine:migrations:sync-metadata-storage - - - - - - - - doctrine:migrations:versions - - - - - - - - doctrine:migrations:current - - - - - - - - doctrine:migrations:dump-schema - - - - - - - doctrine:migrations:execute - - - - - - - doctrine:migrations:generate - - - - - - - doctrine:migrations:latest - - - - - - - doctrine:migrations:migrate - - - - - - - doctrine:migrations:rollup - - - - - - - doctrine:migrations:status - - - - - - - doctrine:migrations:up-to-date - - - - - - - doctrine:migrations:version - - - - - - - diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/doc/index.rst b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/doc/index.rst deleted file mode 100644 index 4c91c4334..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/doc/index.rst +++ /dev/null @@ -1,468 +0,0 @@ -DoctrineMigrationsBundle -======================== - -Database migrations are a way to safely update your database schema both locally -and on production. Instead of running the ``doctrine:schema:update`` command or -applying the database changes manually with SQL statements, migrations allow to -replicate the changes in your database schema in a safe manner. - -Migrations are available in Symfony applications via the `DoctrineMigrationsBundle`_, -which uses the external `Doctrine Database Migrations`_ library. Read the -`documentation`_ of that library if you need a general introduction about migrations. - -Installation ------------- - -Run this command in your terminal: - -.. code-block:: terminal - - $ composer require doctrine/doctrine-migrations-bundle "^3.0" - -If you don't use `Symfony Flex`_, you must enable the bundle manually in the application: - -.. code-block:: php - - // config/bundles.php - // in older Symfony apps, enable the bundle in app/AppKernel.php - return [ - // ... - Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], - ]; - -Configuration -------------- - -If you use Symfony Flex, the ``doctrine_migrations.yaml`` config file is created -automatically. Otherwise, create the following file and configure it for your -application: - -.. code-block:: yaml - - # config/packages/doctrine_migrations.yaml - - doctrine_migrations: - # List of namespace/path pairs to search for migrations, at least one required - migrations_paths: - 'App\Migrations': '%kernel.project_dir%/src/App' - 'AnotherApp\Migrations': '/path/to/other/migrations' - 'SomeBundle\Migrations': '@SomeBundle/Migrations' - - # List of additional migration classes to be loaded, optional - migrations: - - 'App\Migrations\Version123' - - 'App\Migrations\Version123' - - # Connection to use for the migrations - connection: default - - # Entity manager to use for migrations. This overrides the "connection" setting. - em: default - - storage: - # Default (SQL table) metadata storage configuration - table_storage: - table_name: 'doctrine_migration_versions' - version_column_name: 'version' - version_column_length: 192 - executed_at_column_name: 'executed_at' - - # Possible values: "BY_YEAR", "BY_YEAR_AND_MONTH", false - organize_migrations: false - - # Path to your custom migrations template - custom_template: ~ - - # Run all migrations in a transaction. - all_or_nothing: false - - # Adds an extra check in the generated migrations to ensure that is executed on the same database type. - check_database_platform: true - - # Whether or not to wrap migrations in a single transaction. - transactional: true - - # Whether or not to enable the profiler collector to calculate and visualize migration status. This adds some queries overhead. - # enable_profiler: false - - services: - # Custom migration sorting service id - 'Doctrine\Migrations\Version\Comparator': ~ - - # Custom migration classes factory - 'Doctrine\Migrations\Version\MigrationFactory': ~ - - factories: - # Custom migration sorting service id via callables (MyCallableFactory must be a callable) - 'Doctrine\Migrations\Version\Comparator': 'MyCallableFactory' - -- The ``services`` node allows you to provide custom services to the underlying ``DependencyFactory`` part of ``doctrine/migrations``. -- The node ``factories`` is similar to ``services``, with the difference that it accepts only callables. - -The provided callable must return the service to be passed to the ``DependencyFactory``. -The callable will receive as first argument the ``DependencyFactory`` itself, -allowing you to fetch other dependencies from the factory while instantiating your custom dependencies. - -Usage ------ - -All of the migrations functionality is contained in a few console commands: - -.. code-block:: terminal - - doctrine - doctrine:migrations:current [current] Outputs the current version. - doctrine:migrations:diff [diff] Generate a migration by comparing your current database to your mapping information. - doctrine:migrations:dump-schema [dump-schema] Dump the schema for your database to a migration. - doctrine:migrations:execute [execute] Execute a single migration version up or down manually. - doctrine:migrations:generate [generate] Generate a blank migration class. - doctrine:migrations:latest [latest] Outputs the latest version number - doctrine:migrations:migrate [migrate] Execute a migration to a specified version or the latest available version. - doctrine:migrations:rollup [rollup] Roll migrations up by deleting all tracked versions and inserting the one version that exists. - doctrine:migrations:status [status] View the status of a set of migrations. - doctrine:migrations:up-to-date [up-to-date] Tells you if your schema is up-to-date. - doctrine:migrations:version [version] Manually add and delete migration versions from the version table. - doctrine:migrations:sync-metadata-storage [sync-metadata-storage] Ensures that the metadata storage is at the latest version. - doctrine:migrations:list [list-migrations] Display a list of all available migrations and their status. - -Start by getting the status of migrations in your application by running -the ``status`` command: - -.. code-block:: terminal - - $ php bin/console doctrine:migrations:status - -This command will show you generic information about the migration status, such as how many migrations have been -already executed, which still need to run, and the database in use. - -Now, you can start working with migrations by generating a new blank migration -class. Later, you'll learn how Doctrine can generate migrations automatically -for you. - -.. code-block:: terminal - - $ php bin/console doctrine:migrations:generate - -Have a look at the newly generated migration class and you will see something -like the following: - -.. code-block:: php - - declare(strict_types=1); - - namespace DoctrineMigrations; - - use Doctrine\DBAL\Schema\Schema; - use Doctrine\Migrations\AbstractMigration; - - /** - * Auto-generated Migration: Please modify to your needs! - */ - final class Version20180605025653 extends AbstractMigration - { - public function getDescription() : string - { - return ''; - } - - public function up(Schema $schema) : void - { - // this up() migration is auto-generated, please modify it to your needs - - } - - public function down(Schema $schema) : void - { - // this down() migration is auto-generated, please modify it to your needs - - } - } - -If you run the ``status`` command again it will now show that you have one new -migration to execute: - -.. code-block:: terminal - - $ php bin/console doctrine:migrations:status --show-versions - -Now you can add some migration code to the ``up()`` and ``down()`` methods and -finally migrate when you're ready: - -.. code-block:: terminal - - $ php bin/console doctrine:migrations:migrate 'DoctrineMigrations\Version20180605025653' - -For more information on how to write the migrations themselves (i.e. how to -fill in the ``up()`` and ``down()`` methods), see the official Doctrine Migrations -`documentation`_. - -Running Migrations during Deployment -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Of course, the end goal of writing migrations is to be able to use them to -reliably update your database structure when you deploy your application. -By running the migrations locally (or on a beta server), you can ensure that -the migrations work as you expect. - -When you do finally deploy your application, you just need to remember to run -the ``doctrine:migrations:migrate`` command. Internally, Doctrine creates -a ``migration_versions`` table inside your database and tracks which migrations -have been executed there. So, no matter how many migrations you've created -and executed locally, when you run the command during deployment, Doctrine -will know exactly which migrations it hasn't run yet by looking at the ``migration_versions`` -table of your production database. Regardless of what server you're on, you -can always safely run this command to execute only the migrations that haven't -been run yet on *that* particular database. - -Skipping Migrations -~~~~~~~~~~~~~~~~~~~ - -You can skip single migrations by explicitly adding them to the ``migration_versions`` table: - -.. code-block:: terminal - - $ php bin/console doctrine:migrations:version 'App\Migrations\Version123' --add - -.. tip:: - - Pay attention to the single quotes (``'``) used in the command above, without them - or with the double quotes (``"``) the command will not work properly. - - -Doctrine will then assume that this migration has already been run and will ignore it. - -Migration Dependencies ----------------------- - -Migrations can have dependencies on external services (such as geolocation, mailer, data processing services...) that -can be used to have more powerful migrations. Those dependencies are not automatically injected into your migrations -but need to be injected using custom migrations factories. - -Here is an example on how to inject the service container into your migrations: - -.. configuration-block:: - - .. code-block:: yaml - - # config/packages/doctrine_migrations.yaml - doctrine_migrations: - services: - 'Doctrine\Migrations\Version\MigrationFactory': 'App\Migrations\Factory\MigrationFactoryDecorator' - - # config/services.yaml - services: - Doctrine\Migrations\Version\DbalMigrationFactory: ~ - App\Migrations\Factory\MigrationFactoryDecorator: - decorates: Doctrine\Migrations\Version\DbalMigrationFactory - arguments: ['@App\Migrations\Factory\MigrationFactoryDecorator.inner', '@service_container'] - - -.. code-block:: php - - declare(strict_types=1); - - namespace App\Migrations\Factory; - - use Doctrine\Migrations\AbstractMigration; - use Doctrine\Migrations\Version\MigrationFactory; - use Symfony\Component\DependencyInjection\ContainerAwareInterface; - use Symfony\Component\DependencyInjection\ContainerInterface; - - class MigrationFactoryDecorator implements MigrationFactory - { - private $migrationFactory; - private $container; - - public function __construct(MigrationFactory $migrationFactory, ContainerInterface $container) - { - $this->migrationFactory = $migrationFactory; - $this->container = $container; - } - - public function createVersion(string $migrationClassName): AbstractMigration - { - $instance = $this->migrationFactory->createVersion($migrationClassName); - - if ($instance instanceof ContainerAwareInterface) { - $instance->setContainer($this->container); - } - - return $instance; - } - } - - -.. tip:: - - If your migration class implements the interface ``Symfony\Component\DependencyInjection\ContainerAwareInterface`` - this bundle will automatically inject the default symfony container into your migration class - (this because the ``MigrationFactoryDecorator`` shown in this example is the default migration factory used by this bundle). - - -Generating Migrations Automatically ------------------------------------ - -In reality, you should rarely need to write migrations manually, as the migrations -library can generate migration classes automatically by comparing your Doctrine -mapping information (i.e. what your database *should* look like) with your -actual current database structure. - -For example, suppose you create a new ``User`` entity and add mapping information -for Doctrine's ORM: - -.. configuration-block:: - - .. code-block:: php-annotations - - // src/Entity/User.php - namespace App\Entity; - - use Doctrine\ORM\Mapping as ORM; - - /** - * @ORM\Entity - * @ORM\Table(name="hello_user") - */ - class User - { - /** - * @ORM\Id - * @ORM\Column(type="integer") - * @ORM\GeneratedValue(strategy="AUTO") - */ - private $id; - - /** - * @ORM\Column(type="string", length=255) - */ - private $name; - - .. code-block:: yaml - - # config/doctrine/User.orm.yaml - App\Entity\User: - type: entity - table: user - id: - id: - type: integer - generator: - strategy: AUTO - fields: - name: - type: string - length: 255 - - .. code-block:: xml - - - - - - - - - - - - - -With this information, Doctrine is now ready to help you persist your new -``User`` object to and from the ``user`` table. Of course, this table -doesn't exist yet! Generate a new migration for this table automatically by -running the following command: - -.. code-block:: terminal - - $ php bin/console doctrine:migrations:diff - -You should see a message that a new migration class was generated based on -the schema differences. If you open this file, you'll find that it has the -SQL code needed to create the ``user`` table. Next, run the migration -to add the table to your database: - -.. code-block:: terminal - - $ php bin/console doctrine:migrations:migrate - -The moral of the story is this: after each change you make to your Doctrine -mapping information, run the ``doctrine:migrations:diff`` command to automatically -generate your migration classes. - -If you do this from the very beginning of your project (i.e. so that even -the first tables were loaded via a migration class), you'll always be able -to create a fresh database and run your migrations in order to get your database -schema fully up to date. In fact, this is an easy and dependable workflow -for your project. - -If you don't want to use this workflow and instead create your schema via -``doctrine:schema:create``, you can tell Doctrine to skip all existing migrations: - -.. code-block:: terminal - - $ php bin/console doctrine:migrations:version --add --all - -Otherwise Doctrine will try to run all migrations, which probably will not work. - -Manual Tables -------------- - -It is a common use case, that in addition to your generated database structure -based on your doctrine entities you might need custom tables. By default such -tables will be removed by the ``doctrine:migrations:diff`` command. - -If you follow a specific scheme you can configure doctrine/dbal to ignore those -tables. Let's say all custom tables will be prefixed by ``t_``. In this case you -just have to add the following configuration option to your doctrine configuration: - -.. configuration-block:: - - .. code-block:: yaml - - doctrine: - dbal: - schema_filter: ~^(?!t_)~ - - .. code-block:: xml - - - - - .. code-block:: php - - $container->loadFromExtension('doctrine', array( - 'dbal' => array( - 'schema_filter' => '~^(?!t_)~', - // ... - ), - // ... - )); - -This ignores the tables, and any named objects such as sequences, on the DBAL level and they will be ignored by the diff command. - -Note that if you have multiple connections configured then the ``schema_filter`` configuration -will need to be placed per-connection. - -Troubleshooting out of sync metadata storage issue --------------------------------------------------- -``doctrine/migrations`` relies on a properly configured Database server version in the connection string to manage the table storing the -migrations, also known as the metadata storage. - -If you encounter the error ``The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue.`` -when running the command ``doctrine:migrations:migrate`` or the suggested command itself ``doctrine:migrations:sync-metadata-storage`` please -check the database connection string, and make sure that the proper server version is defined. If you are running a MariaDB database, -you should prefix the server version with ``mariadb-`` (ex: ``mariadb-10.2.12``). See the `configuring_database`_ section. - -Example connection string for MariaDB: - -.. code-block:: terminal - DATABASE_URL=mysql://root:@127.0.0.1:3306/testtest?serverVersion=mariadb-10.4.11 - -.. _documentation: https://www.doctrine-project.org/projects/doctrine-migrations/en/current/index.html -.. _configuring_database: https://symfony.com/doc/current/doctrine.html#configuring-the-database -.. _DoctrineMigrationsBundle: https://github.com/doctrine/DoctrineMigrationsBundle -.. _`Doctrine Database Migrations`: https://github.com/doctrine/migrations -.. _`Symfony Flex`: https://symfony.com/doc/current/setup/flex.html diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/views/Collector/icon.svg b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/views/Collector/icon.svg deleted file mode 100644 index c291807c6..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/views/Collector/icon.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/views/Collector/migrations.html.twig b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/views/Collector/migrations.html.twig deleted file mode 100644 index a61934e40..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/Resources/views/Collector/migrations.html.twig +++ /dev/null @@ -1,252 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% if collector.data.unavailable_migrations_count is defined %} - {% set unavailable_migrations = collector.data.unavailable_migrations_count %} - {% set new_migrations = collector.data.new_migrations|length %} - {% if unavailable_migrations > 0 or new_migrations > 0 %} - {% set executed_migrations = collector.data.executed_migrations|length %} - {% set available_migrations = collector.data.available_migrations_count %} - {% set status_color = unavailable_migrations > 0 ? 'yellow' : '' %} - {% set status_color = new_migrations > 0 ? 'red' : status_color %} - - {% set icon %} - {% if profiler_markup_version < 3 %} - {{ include('@DoctrineMigrations/Collector/icon.svg') }} - {% else %} - {{ include('@DoctrineMigrations/Collector/icon-v3.svg') }} - {% endif %} - - {{ new_migrations + unavailable_migrations }} - {% endset %} - - {% set text %} -
-
- Current Migration - {{ executed_migrations > 0 ? collector.data.executed_migrations|last.version|split('\\')|last : 'n/a' }} -
-
- -
-
- - Database Migrations - -
-
- Executed - {{ executed_migrations }} -
-
- Unavailable - {{ unavailable_migrations }} -
-
- Available - {{ available_migrations }} -
-
- New - {{ new_migrations }} -
-
- {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} - {% endif %} - {% endif %} -{% endblock %} - -{% block menu %} - {% if collector.data.unavailable_migrations_count is defined %} - {% set unavailable_migrations = collector.data.unavailable_migrations_count %} - {% set new_migrations = collector.data.new_migrations|length %} - {% set label = unavailable_migrations > 0 ? 'label-status-warning' : '' %} - {% set label = new_migrations > 0 ? 'label-status-error' : label %} - - - {% if profiler_markup_version < 3 %} - {{ include('@DoctrineMigrations/Collector/icon.svg') }} - {% else %} - {{ include('@DoctrineMigrations/Collector/icon-v3.svg') }} - {% endif %} - - - Migrations - {% if unavailable_migrations > 0 or new_migrations > 0 %} - - {{ new_migrations + unavailable_migrations }} - - {% endif %} - - {% endif %} -{% endblock %} - -{% block panel %} - {% set num_executed_migrations = collector.data.executed_migrations|length %} - {% set num_unavailable_migrations = collector.data.unavailable_migrations_count %} - {% set num_available_migrations = collector.data.available_migrations_count %} - {% set num_new_migrations = collector.data.new_migrations|length %} - -

Doctrine Migrations

-
-
- {{ num_executed_migrations }} - Executed -
- - {% if profiler_markup_version >= 3 %} -
- {% endif %} - -
- {{ num_unavailable_migrations }} - Unavailable -
-
- {{ num_available_migrations }} - Available -
-
- {{ num_new_migrations }} - New -
- - {% if profiler_markup_version >= 3 %} -
{# closes the
#} - {% endif %} -
- -
-
-

- Migrations - - {{ num_new_migrations > 0 ? num_new_migrations : num_unavailable_migrations > 0 ? num_unavailable_migrations : num_executed_migrations }} - -

- -
- {{ _self.render_migration_details(collector, profiler_markup_version) }} -
-
- -
-

Configuration

- -
- {{ _self.render_configuration_details(collector, profiler_markup_version) }} -
-
-
-{% endblock %} - -{% macro render_migration_details(collector) %} - - - - - - - - - - - {% for migration in collector.data.new_migrations %} - {{ _self.render_migration(migration) }} - {% endfor %} - - {% for migration in collector.data.executed_migrations|reverse %} - {{ _self.render_migration(migration) }} - {% endfor %} -
VersionDescriptionStatusExecuted atExecution time
-{% endmacro %} - -{% macro render_configuration_details(collector) %} - - - - - - - - - - - {% if collector.data.table is defined %} - - - - - {% endif %} - {% if collector.data.column is defined %} - - - - - {% endif %} -
Storage
Type{{ collector.data.storage }}
Table Name{{ collector.data.table }}
Column Name{{ collector.data.column }}
- - - - - - - - - - - - - - - -
Database
Driver{{ collector.data.driver }}
Name{{ collector.data.name }}
- - - - - - - - {% for namespace, directory in collector.data.namespaces %} - - - - - {% endfor %} -
Migration Namespaces
{{ namespace }}{{ directory }}
-{% endmacro %} - -{% macro render_migration(migration, profiler_markup_version) %} - - - {% if migration.file %} - {{ migration.version }} - {% else %} - {{ migration.version }} - {% endif %} - - {{ migration.description }} - - {% if migration.is_new %} - NOT EXECUTED - {% elseif migration.is_unavailable %} - UNAVAILABLE - {% else %} - EXECUTED - {% endif %} - - {{ migration.executed_at ? migration.executed_at|date('M j, Y H:i') : 'n/a' }} - - {% if migration.execution_time is null %} - n/a - {% elseif migration.execution_time < 1 %} - {{ (migration.execution_time * 1000)|number_format(0) }} ms - {% else %} - {{ migration.execution_time|number_format(2) }} seconds - {% endif %} - - -{% endmacro %} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/UPGRADE.md b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/UPGRADE.md deleted file mode 100644 index 84ffed017..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/UPGRADE.md +++ /dev/null @@ -1,86 +0,0 @@ -# Upgrade - -## From 2.x to 3.0.0 - -- The configuration for the migration namespace and directory changed as follows: - -Before - -```yaml -doctrine_migrations: - dir_name: '%kernel.project_dir%/src/Migrations' - namespace: DoctrineMigrations -``` - -After - -```yaml -doctrine_migrations: - migrations_paths: - 'DoctrineMigrations': '%kernel.project_dir%/src/Migrations' -``` - -- The configuration for the metadata table definition changed as follows: - -Before - -```yaml -doctrine_migrations: - table_name: 'migration_versions' - column_name: 'version' - column_length: 14 - executed_at_column_name: 'executed_at' -``` - -After - -```yaml -doctrine_migrations: - storage: - table_storage: - table_name: 'migration_versions' - version_column_name: 'version' - version_column_length: 191 - executed_at_column_name: 'executed_at' -``` -If your project did not originally specify its own table definition configuration, you will need to configure the table name after the upgrade: - -```yaml -doctrine_migrations: - storage: - table_storage: - table_name: 'migration_versions' -``` -and then run the `doctrine:migrations:sync-metadata-storage` command. -- The migration name has been dropped: - -Before - -```yaml -doctrine_migrations: - name: 'Application Migrations' -``` - -After - -The parameter `name` has been dropped. - - -- The default for `table_name` changed from `migration_versions` to `doctrine_migration_versions`. If you did not -specify the `table_name` option, you now need to declare it explicitly to not lose migration data. - -```yaml -doctrine_migrations: - storage: - table_storage: - table_name: 'migration_versions' -``` - -### Underlying doctrine/migrations library - -Upgrading this bundle to `3.0` will also update the `doctrine/migrations` library to the version `3.0`. -Backward incompatible changes in `doctrine/migrations` 3.0 -are documented in the dedicated [UPGRADE](https://github.com/doctrine/migrations/blob/3.0.x/UPGRADE.md) document. - -- The container is not automatically injected anymore when a migration implements `ContainerAwareInterface`. Custom -migration factories should be used to inject additional dependencies into migrations. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/composer.json b/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/composer.json deleted file mode 100644 index 337f652cc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/doctrine-migrations-bundle/composer.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "doctrine/doctrine-migrations-bundle", - "type": "symfony-bundle", - "description": "Symfony DoctrineMigrationsBundle", - "keywords": ["DBAL", "Migrations", "Schema"], - "homepage": "https://www.doctrine-project.org", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Doctrine Project", - "homepage": "https://www.doctrine-project.org" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": "^7.2|^8.0", - "symfony/deprecation-contracts": "^2.1 || ^3", - "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0", - "doctrine/doctrine-bundle": "^2.4", - "doctrine/migrations": "^3.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5|^9.5", - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-deprecation-rules": "^1", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.1", - "phpstan/phpstan-symfony": "^1.3", - "doctrine/orm": "^2.6 || ^3", - "doctrine/persistence": "^2.0 || ^3 ", - "psalm/plugin-phpunit": "^0.18.4", - "psalm/plugin-symfony": "^3 || ^5", - "symfony/phpunit-bridge": "^6.3 || ^7", - "symfony/var-exporter": "^5.4 || ^6 || ^7", - "vimeo/psalm": "^4.30 || ^5.15" - }, - "autoload": { - "psr-4": { "Doctrine\\Bundle\\MigrationsBundle\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "autoload-dev": { - "psr-4": { "Doctrine\\Bundle\\MigrationsBundle\\Tests\\": "Tests" } - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/event-manager/LICENSE b/fixtures/symfony_5_local_deps/vendor/doctrine/event-manager/LICENSE deleted file mode 100644 index 8c38cc1bc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/event-manager/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2015 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/event-manager/README.md b/fixtures/symfony_5_local_deps/vendor/doctrine/event-manager/README.md deleted file mode 100644 index 5b36f546f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/event-manager/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Doctrine Event Manager - -[![Build Status](https://github.com/doctrine/event-manager/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/event-manager/actions) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/event-manager/badges/quality-score.png?b=1.2.x)](https://scrutinizer-ci.com/g/doctrine/event-manager/?branch=1.2.x) -[![Code Coverage](https://scrutinizer-ci.com/g/doctrine/event-manager/badges/coverage.png?b=1.2.x)](https://scrutinizer-ci.com/g/doctrine/event-manager/?branch=1.2.x) - -The Doctrine Event Manager is a library that provides a simple event system. - -## More resources: - -* [Website](https://www.doctrine-project.org/) -* [Documentation](https://www.doctrine-project.org/projects/doctrine-event-manager/en/latest/) -* [Downloads](https://github.com/doctrine/event-manager/releases) diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/event-manager/composer.json b/fixtures/symfony_5_local_deps/vendor/doctrine/event-manager/composer.json deleted file mode 100644 index 756e93dbd..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/event-manager/composer.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "doctrine/event-manager", - "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", - "license": "MIT", - "type": "library", - "keywords": [ - "events", - "event", - "event dispatcher", - "event manager", - "event system" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "homepage": "https://www.doctrine-project.org/projects/event-manager.html", - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.8", - "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^4.28" - }, - "conflict": { - "doctrine/common": "<2.9" - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Tests\\Common\\": "tests" - } - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - }, - "sort-packages": true - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/LICENSE b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/LICENSE deleted file mode 100644 index 8c38cc1bc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2015 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/README.md b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/README.md deleted file mode 100644 index 6e3a97f7e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Doctrine Inflector - -Doctrine Inflector is a small library that can perform string manipulations -with regard to uppercase/lowercase and singular/plural forms of words. - -[![Build Status](https://github.com/doctrine/inflector/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/inflector/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A4.0.x) -[![Code Coverage](https://codecov.io/gh/doctrine/inflector/branch/2.0.x/graph/badge.svg)](https://codecov.io/gh/doctrine/inflector/branch/2.0.x) diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/composer.json b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/composer.json deleted file mode 100644 index 91d77071e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "doctrine/inflector", - "type": "library", - "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", - "keywords": ["php", "strings", "words", "manipulation", "inflector", "inflection", "uppercase", "lowercase", "singular", "plural"], - "homepage": "https://www.doctrine-project.org/projects/inflector.html", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^11.0", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.3", - "phpunit/phpunit": "^8.5 || ^9.5", - "vimeo/psalm": "^4.25 || ^5.4" - }, - "autoload": { - "psr-4": { - "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Tests\\Inflector\\": "tests/Doctrine/Tests/Inflector" - } - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/docs/en/index.rst b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/docs/en/index.rst deleted file mode 100644 index 29866f4d4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/docs/en/index.rst +++ /dev/null @@ -1,226 +0,0 @@ -Introduction -============ - -The Doctrine Inflector has methods for inflecting text. The features include pluralization, -singularization, converting between camelCase and under_score and capitalizing -words. - -Installation -============ - -You can install the Inflector with composer: - -.. code-block:: console - - $ composer require doctrine/inflector - -Usage -===== - -Using the inflector is easy, you can create a new ``Doctrine\Inflector\Inflector`` instance by using -the ``Doctrine\Inflector\InflectorFactory`` class: - -.. code-block:: php - - use Doctrine\Inflector\InflectorFactory; - - $inflector = InflectorFactory::create()->build(); - -By default it will create an English inflector. If you want to use another language, just pass the language -you want to create an inflector for to the ``createForLanguage()`` method: - -.. code-block:: php - - use Doctrine\Inflector\InflectorFactory; - use Doctrine\Inflector\Language; - - $inflector = InflectorFactory::createForLanguage(Language::SPANISH)->build(); - -The supported languages are as follows: - -- ``Language::ENGLISH`` -- ``Language::FRENCH`` -- ``Language::NORWEGIAN_BOKMAL`` -- ``Language::PORTUGUESE`` -- ``Language::SPANISH`` -- ``Language::TURKISH`` - -If you want to manually construct the inflector instead of using a factory, you can do so like this: - -.. code-block:: php - - use Doctrine\Inflector\CachedWordInflector; - use Doctrine\Inflector\RulesetInflector; - use Doctrine\Inflector\Rules\English; - - $inflector = new Inflector( - new CachedWordInflector(new RulesetInflector( - English\Rules::getSingularRuleset() - )), - new CachedWordInflector(new RulesetInflector( - English\Rules::getPluralRuleset() - )) - ); - -Adding Languages ----------------- - -If you are interested in adding support for your language, take a look at the other languages defined in the -``Doctrine\Inflector\Rules`` namespace and the tests located in ``Doctrine\Tests\Inflector\Rules``. You can copy -one of the languages and update the rules for your language. - -Once you have done this, send a pull request to the ``doctrine/inflector`` repository with the additions. - -Custom Setup -============ - -If you want to setup custom singular and plural rules, you can configure these in the factory: - -.. code-block:: php - - use Doctrine\Inflector\InflectorFactory; - use Doctrine\Inflector\Rules\Pattern; - use Doctrine\Inflector\Rules\Patterns; - use Doctrine\Inflector\Rules\Ruleset; - use Doctrine\Inflector\Rules\Substitution; - use Doctrine\Inflector\Rules\Substitutions; - use Doctrine\Inflector\Rules\Transformation; - use Doctrine\Inflector\Rules\Transformations; - use Doctrine\Inflector\Rules\Word; - - $inflector = InflectorFactory::create() - ->withSingularRules( - new Ruleset( - new Transformations( - new Transformation(new Pattern('/^(bil)er$/i'), '\1'), - new Transformation(new Pattern('/^(inflec|contribu)tors$/i'), '\1ta') - ), - new Patterns(new Pattern('singulars')), - new Substitutions(new Substitution(new Word('spins'), new Word('spinor'))) - ) - ) - ->withPluralRules( - new Ruleset( - new Transformations( - new Transformation(new Pattern('^(bil)er$'), '\1'), - new Transformation(new Pattern('^(inflec|contribu)tors$'), '\1ta') - ), - new Patterns(new Pattern('noflect'), new Pattern('abtuse')), - new Substitutions( - new Substitution(new Word('amaze'), new Word('amazable')), - new Substitution(new Word('phone'), new Word('phonezes')) - ) - ) - ) - ->build(); - -No operation inflector ----------------------- - -The ``Doctrine\Inflector\NoopWordInflector`` may be used to configure an inflector that doesn't perform any operation for -pluralization and/or singularization. If will simply return the input as output. - -This is an implementation of the `Null Object design pattern `_. - -.. code-block:: php - - use Doctrine\Inflector\Inflector; - use Doctrine\Inflector\NoopWordInflector; - - $inflector = new Inflector(new NoopWordInflector(), new NoopWordInflector()); - -Tableize -======== - -Converts ``ModelName`` to ``model_name``: - -.. code-block:: php - - echo $inflector->tableize('ModelName'); // model_name - -Classify -======== - -Converts ``model_name`` to ``ModelName``: - -.. code-block:: php - - echo $inflector->classify('model_name'); // ModelName - -Camelize -======== - -This method uses `Classify`_ and then converts the first character to lowercase: - -.. code-block:: php - - echo $inflector->camelize('model_name'); // modelName - -Capitalize -========== - -Takes a string and capitalizes all of the words, like PHP's built-in -``ucwords`` function. This extends that behavior, however, by allowing the -word delimiters to be configured, rather than only separating on -whitespace. - -Here is an example: - -.. code-block:: php - - $string = 'top-o-the-morning to all_of_you!'; - - echo $inflector->capitalize($string); // Top-O-The-Morning To All_of_you! - - echo $inflector->capitalize($string, '-_ '); // Top-O-The-Morning To All_Of_You! - -Pluralize -========= - -Returns a word in plural form. - -.. code-block:: php - - echo $inflector->pluralize('browser'); // browsers - -Singularize -=========== - -Returns a word in singular form. - -.. code-block:: php - - echo $inflector->singularize('browsers'); // browser - -Urlize -====== - -Generate a URL friendly string from a string of text: - -.. code-block:: php - - echo $inflector->urlize('My first blog post'); // my-first-blog-post - -Unaccent -======== - -You can unaccent a string of text using the ``unaccent()`` method: - -.. code-block:: php - - echo $inflector->unaccent('año'); // ano - -Legacy API -========== - -The API present in Inflector 1.x is still available, but will be deprecated in a future release and dropped for 3.0. -Support for languages other than English is available in the 2.0 API only. - -Acknowledgements -================ - -The language rules in this library have been adapted from several different sources, including but not limited to: - -- `Ruby On Rails Inflector `_ -- `ICanBoogie Inflector `_ -- `CakePHP Inflector `_ diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/CachedWordInflector.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/CachedWordInflector.php deleted file mode 100644 index 2d529087d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/CachedWordInflector.php +++ /dev/null @@ -1,24 +0,0 @@ -wordInflector = $wordInflector; - } - - public function inflect(string $word): string - { - return $this->cache[$word] ?? $this->cache[$word] = $this->wordInflector->inflect($word); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/GenericLanguageInflectorFactory.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/GenericLanguageInflectorFactory.php deleted file mode 100644 index 166061d28..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/GenericLanguageInflectorFactory.php +++ /dev/null @@ -1,66 +0,0 @@ -singularRulesets[] = $this->getSingularRuleset(); - $this->pluralRulesets[] = $this->getPluralRuleset(); - } - - final public function build(): Inflector - { - return new Inflector( - new CachedWordInflector(new RulesetInflector( - ...$this->singularRulesets - )), - new CachedWordInflector(new RulesetInflector( - ...$this->pluralRulesets - )) - ); - } - - final public function withSingularRules(?Ruleset $singularRules, bool $reset = false): LanguageInflectorFactory - { - if ($reset) { - $this->singularRulesets = []; - } - - if ($singularRules instanceof Ruleset) { - array_unshift($this->singularRulesets, $singularRules); - } - - return $this; - } - - final public function withPluralRules(?Ruleset $pluralRules, bool $reset = false): LanguageInflectorFactory - { - if ($reset) { - $this->pluralRulesets = []; - } - - if ($pluralRules instanceof Ruleset) { - array_unshift($this->pluralRulesets, $pluralRules); - } - - return $this; - } - - abstract protected function getSingularRuleset(): Ruleset; - - abstract protected function getPluralRuleset(): Ruleset; -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php deleted file mode 100644 index 610a4cf4d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php +++ /dev/null @@ -1,507 +0,0 @@ - 'A', - 'Ã' => 'A', - 'Â' => 'A', - 'Ã' => 'A', - 'Ä' => 'Ae', - 'Æ' => 'Ae', - 'Ã…' => 'Aa', - 'æ' => 'a', - 'Ç' => 'C', - 'È' => 'E', - 'É' => 'E', - 'Ê' => 'E', - 'Ë' => 'E', - 'ÃŒ' => 'I', - 'Ã' => 'I', - 'ÃŽ' => 'I', - 'Ã' => 'I', - 'Ñ' => 'N', - 'Ã’' => 'O', - 'Ó' => 'O', - 'Ô' => 'O', - 'Õ' => 'O', - 'Ö' => 'Oe', - 'Ù' => 'U', - 'Ú' => 'U', - 'Û' => 'U', - 'Ü' => 'Ue', - 'Ã' => 'Y', - 'ß' => 'ss', - 'à' => 'a', - 'á' => 'a', - 'â' => 'a', - 'ã' => 'a', - 'ä' => 'ae', - 'Ã¥' => 'aa', - 'ç' => 'c', - 'è' => 'e', - 'é' => 'e', - 'ê' => 'e', - 'ë' => 'e', - 'ì' => 'i', - 'í' => 'i', - 'î' => 'i', - 'ï' => 'i', - 'ñ' => 'n', - 'ò' => 'o', - 'ó' => 'o', - 'ô' => 'o', - 'õ' => 'o', - 'ö' => 'oe', - 'ù' => 'u', - 'ú' => 'u', - 'û' => 'u', - 'ü' => 'ue', - 'ý' => 'y', - 'ÿ' => 'y', - 'Ä€' => 'A', - 'Ä' => 'a', - 'Ä‚' => 'A', - 'ă' => 'a', - 'Ä„' => 'A', - 'Ä…' => 'a', - 'Ć' => 'C', - 'ć' => 'c', - 'Ĉ' => 'C', - 'ĉ' => 'c', - 'ÄŠ' => 'C', - 'Ä‹' => 'c', - 'ÄŒ' => 'C', - 'Ä' => 'c', - 'ÄŽ' => 'D', - 'Ä' => 'd', - 'Ä' => 'D', - 'Ä‘' => 'd', - 'Ä’' => 'E', - 'Ä“' => 'e', - 'Ä”' => 'E', - 'Ä•' => 'e', - 'Ä–' => 'E', - 'Ä—' => 'e', - 'Ę' => 'E', - 'Ä™' => 'e', - 'Äš' => 'E', - 'Ä›' => 'e', - 'Äœ' => 'G', - 'Ä' => 'g', - 'Äž' => 'G', - 'ÄŸ' => 'g', - 'Ä ' => 'G', - 'Ä¡' => 'g', - 'Ä¢' => 'G', - 'Ä£' => 'g', - 'Ĥ' => 'H', - 'Ä¥' => 'h', - 'Ħ' => 'H', - 'ħ' => 'h', - 'Ĩ' => 'I', - 'Ä©' => 'i', - 'Ī' => 'I', - 'Ä«' => 'i', - 'Ĭ' => 'I', - 'Ä­' => 'i', - 'Ä®' => 'I', - 'į' => 'i', - 'İ' => 'I', - 'ı' => 'i', - 'IJ' => 'IJ', - 'ij' => 'ij', - 'Ä´' => 'J', - 'ĵ' => 'j', - 'Ķ' => 'K', - 'Ä·' => 'k', - 'ĸ' => 'k', - 'Ĺ' => 'L', - 'ĺ' => 'l', - 'Ä»' => 'L', - 'ļ' => 'l', - 'Ľ' => 'L', - 'ľ' => 'l', - 'Ä¿' => 'L', - 'Å€' => 'l', - 'Å' => 'L', - 'Å‚' => 'l', - 'Ń' => 'N', - 'Å„' => 'n', - 'Å…' => 'N', - 'ņ' => 'n', - 'Ň' => 'N', - 'ň' => 'n', - 'ʼn' => 'N', - 'ÅŠ' => 'n', - 'Å‹' => 'N', - 'ÅŒ' => 'O', - 'Å' => 'o', - 'ÅŽ' => 'O', - 'Å' => 'o', - 'Å' => 'O', - 'Å‘' => 'o', - 'Å’' => 'OE', - 'Å“' => 'oe', - 'Ø' => 'O', - 'ø' => 'o', - 'Å”' => 'R', - 'Å•' => 'r', - 'Å–' => 'R', - 'Å—' => 'r', - 'Ř' => 'R', - 'Å™' => 'r', - 'Åš' => 'S', - 'Å›' => 's', - 'Åœ' => 'S', - 'Å' => 's', - 'Åž' => 'S', - 'ÅŸ' => 's', - 'Å ' => 'S', - 'Å¡' => 's', - 'Å¢' => 'T', - 'Å£' => 't', - 'Ť' => 'T', - 'Å¥' => 't', - 'Ŧ' => 'T', - 'ŧ' => 't', - 'Ũ' => 'U', - 'Å©' => 'u', - 'Ū' => 'U', - 'Å«' => 'u', - 'Ŭ' => 'U', - 'Å­' => 'u', - 'Å®' => 'U', - 'ů' => 'u', - 'Ű' => 'U', - 'ű' => 'u', - 'Ų' => 'U', - 'ų' => 'u', - 'Å´' => 'W', - 'ŵ' => 'w', - 'Ŷ' => 'Y', - 'Å·' => 'y', - 'Ÿ' => 'Y', - 'Ź' => 'Z', - 'ź' => 'z', - 'Å»' => 'Z', - 'ż' => 'z', - 'Ž' => 'Z', - 'ž' => 'z', - 'Å¿' => 's', - '€' => 'E', - '£' => '', - ]; - - /** @var WordInflector */ - private $singularizer; - - /** @var WordInflector */ - private $pluralizer; - - public function __construct(WordInflector $singularizer, WordInflector $pluralizer) - { - $this->singularizer = $singularizer; - $this->pluralizer = $pluralizer; - } - - /** - * Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'. - */ - public function tableize(string $word): string - { - $tableized = preg_replace('~(?<=\\w)([A-Z])~u', '_$1', $word); - - if ($tableized === null) { - throw new RuntimeException(sprintf( - 'preg_replace returned null for value "%s"', - $word - )); - } - - return mb_strtolower($tableized); - } - - /** - * Converts a word into the format for a Doctrine class name. Converts 'table_name' to 'TableName'. - */ - public function classify(string $word): string - { - return str_replace([' ', '_', '-'], '', ucwords($word, ' _-')); - } - - /** - * Camelizes a word. This uses the classify() method and turns the first character to lowercase. - */ - public function camelize(string $word): string - { - return lcfirst($this->classify($word)); - } - - /** - * Uppercases words with configurable delimiters between words. - * - * Takes a string and capitalizes all of the words, like PHP's built-in - * ucwords function. This extends that behavior, however, by allowing the - * word delimiters to be configured, rather than only separating on - * whitespace. - * - * Here is an example: - * - * capitalize($string); - * // Top-O-The-Morning To All_of_you! - * - * echo $inflector->capitalize($string, '-_ '); - * // Top-O-The-Morning To All_Of_You! - * ?> - * - * - * @param string $string The string to operate on. - * @param string $delimiters A list of word separators. - * - * @return string The string with all delimiter-separated words capitalized. - */ - public function capitalize(string $string, string $delimiters = " \n\t\r\0\x0B-"): string - { - return ucwords($string, $delimiters); - } - - /** - * Checks if the given string seems like it has utf8 characters in it. - * - * @param string $string The string to check for utf8 characters in. - */ - public function seemsUtf8(string $string): bool - { - for ($i = 0; $i < strlen($string); $i++) { - if (ord($string[$i]) < 0x80) { - continue; // 0bbbbbbb - } - - if ((ord($string[$i]) & 0xE0) === 0xC0) { - $n = 1; // 110bbbbb - } elseif ((ord($string[$i]) & 0xF0) === 0xE0) { - $n = 2; // 1110bbbb - } elseif ((ord($string[$i]) & 0xF8) === 0xF0) { - $n = 3; // 11110bbb - } elseif ((ord($string[$i]) & 0xFC) === 0xF8) { - $n = 4; // 111110bb - } elseif ((ord($string[$i]) & 0xFE) === 0xFC) { - $n = 5; // 1111110b - } else { - return false; // Does not match any model - } - - for ($j = 0; $j < $n; $j++) { // n bytes matching 10bbbbbb follow ? - if (++$i === strlen($string) || ((ord($string[$i]) & 0xC0) !== 0x80)) { - return false; - } - } - } - - return true; - } - - /** - * Remove any illegal characters, accents, etc. - * - * @param string $string String to unaccent - * - * @return string Unaccented string - */ - public function unaccent(string $string): string - { - if (preg_match('/[\x80-\xff]/', $string) === false) { - return $string; - } - - if ($this->seemsUtf8($string)) { - $string = strtr($string, self::ACCENTED_CHARACTERS); - } else { - $characters = []; - - // Assume ISO-8859-1 if not UTF-8 - $characters['in'] = - chr(128) - . chr(131) - . chr(138) - . chr(142) - . chr(154) - . chr(158) - . chr(159) - . chr(162) - . chr(165) - . chr(181) - . chr(192) - . chr(193) - . chr(194) - . chr(195) - . chr(196) - . chr(197) - . chr(199) - . chr(200) - . chr(201) - . chr(202) - . chr(203) - . chr(204) - . chr(205) - . chr(206) - . chr(207) - . chr(209) - . chr(210) - . chr(211) - . chr(212) - . chr(213) - . chr(214) - . chr(216) - . chr(217) - . chr(218) - . chr(219) - . chr(220) - . chr(221) - . chr(224) - . chr(225) - . chr(226) - . chr(227) - . chr(228) - . chr(229) - . chr(231) - . chr(232) - . chr(233) - . chr(234) - . chr(235) - . chr(236) - . chr(237) - . chr(238) - . chr(239) - . chr(241) - . chr(242) - . chr(243) - . chr(244) - . chr(245) - . chr(246) - . chr(248) - . chr(249) - . chr(250) - . chr(251) - . chr(252) - . chr(253) - . chr(255); - - $characters['out'] = 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'; - - $string = strtr($string, $characters['in'], $characters['out']); - - $doubleChars = []; - - $doubleChars['in'] = [ - chr(140), - chr(156), - chr(198), - chr(208), - chr(222), - chr(223), - chr(230), - chr(240), - chr(254), - ]; - - $doubleChars['out'] = ['OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th']; - - $string = str_replace($doubleChars['in'], $doubleChars['out'], $string); - } - - return $string; - } - - /** - * Convert any passed string to a url friendly string. - * Converts 'My first blog post' to 'my-first-blog-post' - * - * @param string $string String to urlize. - * - * @return string Urlized string. - */ - public function urlize(string $string): string - { - // Remove all non url friendly characters with the unaccent function - $unaccented = $this->unaccent($string); - - if (function_exists('mb_strtolower')) { - $lowered = mb_strtolower($unaccented); - } else { - $lowered = strtolower($unaccented); - } - - $replacements = [ - '/\W/' => ' ', - '/([A-Z]+)([A-Z][a-z])/' => '\1_\2', - '/([a-z\d])([A-Z])/' => '\1_\2', - '/[^A-Z^a-z^0-9^\/]+/' => '-', - ]; - - $urlized = $lowered; - - foreach ($replacements as $pattern => $replacement) { - $replaced = preg_replace($pattern, $replacement, $urlized); - - if ($replaced === null) { - throw new RuntimeException(sprintf( - 'preg_replace returned null for value "%s"', - $urlized - )); - } - - $urlized = $replaced; - } - - return trim($urlized, '-'); - } - - /** - * Returns a word in singular form. - * - * @param string $word The word in plural form. - * - * @return string The word in singular form. - */ - public function singularize(string $word): string - { - return $this->singularizer->inflect($word); - } - - /** - * Returns a word in plural form. - * - * @param string $word The word in singular form. - * - * @return string The word in plural form. - */ - public function pluralize(string $word): string - { - return $this->pluralizer->inflect($word); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/InflectorFactory.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/InflectorFactory.php deleted file mode 100644 index a0740a741..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/InflectorFactory.php +++ /dev/null @@ -1,52 +0,0 @@ -getFlippedSubstitutions() - ); - } - - public static function getPluralRuleset(): Ruleset - { - return new Ruleset( - new Transformations(...Inflectible::getPlural()), - new Patterns(...Uninflected::getPlural()), - new Substitutions(...Inflectible::getIrregular()) - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Uninflected.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Uninflected.php deleted file mode 100644 index 02257de14..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Uninflected.php +++ /dev/null @@ -1,189 +0,0 @@ -getFlippedSubstitutions() - ); - } - - public static function getPluralRuleset(): Ruleset - { - return new Ruleset( - new Transformations(...Inflectible::getPlural()), - new Patterns(...Uninflected::getPlural()), - new Substitutions(...Inflectible::getIrregular()) - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Uninflected.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Uninflected.php deleted file mode 100644 index 9747f919b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Uninflected.php +++ /dev/null @@ -1,28 +0,0 @@ -getFlippedSubstitutions() - ); - } - - public static function getPluralRuleset(): Ruleset - { - return new Ruleset( - new Transformations(...Inflectible::getPlural()), - new Patterns(...Uninflected::getPlural()), - new Substitutions(...Inflectible::getIrregular()) - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Uninflected.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Uninflected.php deleted file mode 100644 index 5d8d3b3aa..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Uninflected.php +++ /dev/null @@ -1,30 +0,0 @@ -pattern = $pattern; - - if (isset($this->pattern[0]) && $this->pattern[0] === '/') { - $this->regex = $this->pattern; - } else { - $this->regex = '/' . $this->pattern . '/i'; - } - } - - public function getPattern(): string - { - return $this->pattern; - } - - public function getRegex(): string - { - return $this->regex; - } - - public function matches(string $word): bool - { - return preg_match($this->getRegex(), $word) === 1; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Patterns.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Patterns.php deleted file mode 100644 index e8d45cb75..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Patterns.php +++ /dev/null @@ -1,34 +0,0 @@ -patterns = $patterns; - - $patterns = array_map(static function (Pattern $pattern): string { - return $pattern->getPattern(); - }, $this->patterns); - - $this->regex = '/^(?:' . implode('|', $patterns) . ')$/i'; - } - - public function matches(string $word): bool - { - return preg_match($this->regex, $word, $regs) === 1; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Inflectible.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Inflectible.php deleted file mode 100644 index 0d41fe7e1..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Inflectible.php +++ /dev/null @@ -1,98 +0,0 @@ -getFlippedSubstitutions() - ); - } - - public static function getPluralRuleset(): Ruleset - { - return new Ruleset( - new Transformations(...Inflectible::getPlural()), - new Patterns(...Uninflected::getPlural()), - new Substitutions(...Inflectible::getIrregular()) - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Uninflected.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Uninflected.php deleted file mode 100644 index b8e988f8c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Uninflected.php +++ /dev/null @@ -1,32 +0,0 @@ -regular = $regular; - $this->uninflected = $uninflected; - $this->irregular = $irregular; - } - - public function getRegular(): Transformations - { - return $this->regular; - } - - public function getUninflected(): Patterns - { - return $this->uninflected; - } - - public function getIrregular(): Substitutions - { - return $this->irregular; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Inflectible.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Inflectible.php deleted file mode 100644 index 91294609b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Inflectible.php +++ /dev/null @@ -1,47 +0,0 @@ -getFlippedSubstitutions() - ); - } - - public static function getPluralRuleset(): Ruleset - { - return new Ruleset( - new Transformations(...Inflectible::getPlural()), - new Patterns(...Uninflected::getPlural()), - new Substitutions(...Inflectible::getIrregular()) - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Uninflected.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Uninflected.php deleted file mode 100644 index c26ebe9ca..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Uninflected.php +++ /dev/null @@ -1,30 +0,0 @@ -from = $from; - $this->to = $to; - } - - public function getFrom(): Word - { - return $this->from; - } - - public function getTo(): Word - { - return $this->to; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitutions.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitutions.php deleted file mode 100644 index 17ee29619..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitutions.php +++ /dev/null @@ -1,57 +0,0 @@ -substitutions[$substitution->getFrom()->getWord()] = $substitution; - } - } - - public function getFlippedSubstitutions(): Substitutions - { - $substitutions = []; - - foreach ($this->substitutions as $substitution) { - $substitutions[] = new Substitution( - $substitution->getTo(), - $substitution->getFrom() - ); - } - - return new Substitutions(...$substitutions); - } - - public function inflect(string $word): string - { - $lowerWord = strtolower($word); - - if (isset($this->substitutions[$lowerWord])) { - $firstLetterUppercase = $lowerWord[0] !== $word[0]; - - $toWord = $this->substitutions[$lowerWord]->getTo()->getWord(); - - if ($firstLetterUppercase) { - return strtoupper($toWord[0]) . substr($toWord, 1); - } - - return $toWord; - } - - return $word; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php deleted file mode 100644 index 30dcd5945..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php +++ /dev/null @@ -1,39 +0,0 @@ -pattern = $pattern; - $this->replacement = $replacement; - } - - public function getPattern(): Pattern - { - return $this->pattern; - } - - public function getReplacement(): string - { - return $this->replacement; - } - - public function inflect(string $word): string - { - return (string) preg_replace($this->pattern->getRegex(), $this->replacement, $word); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformations.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformations.php deleted file mode 100644 index b6a48fa80..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformations.php +++ /dev/null @@ -1,29 +0,0 @@ -transformations = $transformations; - } - - public function inflect(string $word): string - { - foreach ($this->transformations as $transformation) { - if ($transformation->getPattern()->matches($word)) { - return $transformation->inflect($word); - } - } - - return $word; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Inflectible.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Inflectible.php deleted file mode 100644 index a2bda0d94..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Inflectible.php +++ /dev/null @@ -1,34 +0,0 @@ -getFlippedSubstitutions() - ); - } - - public static function getPluralRuleset(): Ruleset - { - return new Ruleset( - new Transformations(...Inflectible::getPlural()), - new Patterns(...Uninflected::getPlural()), - new Substitutions(...Inflectible::getIrregular()) - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Uninflected.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Uninflected.php deleted file mode 100644 index ec1c37dd1..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Uninflected.php +++ /dev/null @@ -1,30 +0,0 @@ -word = $word; - } - - public function getWord(): string - { - return $this->word; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/RulesetInflector.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/RulesetInflector.php deleted file mode 100644 index 12b2ed5be..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/RulesetInflector.php +++ /dev/null @@ -1,56 +0,0 @@ -rulesets = array_merge([$ruleset], $rulesets); - } - - public function inflect(string $word): string - { - if ($word === '') { - return ''; - } - - foreach ($this->rulesets as $ruleset) { - if ($ruleset->getUninflected()->matches($word)) { - return $word; - } - - $inflected = $ruleset->getIrregular()->inflect($word); - - if ($inflected !== $word) { - return $inflected; - } - - $inflected = $ruleset->getRegular()->inflect($word); - - if ($inflected !== $word) { - return $inflected; - } - } - - return $word; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/WordInflector.php b/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/WordInflector.php deleted file mode 100644 index b88b1d696..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/inflector/lib/Doctrine/Inflector/WordInflector.php +++ /dev/null @@ -1,10 +0,0 @@ -instantiate(\My\ClassName\Here::class); -``` - -## Contributing - -Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out! - -## Credits - -This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which -has been donated to the doctrine organization, and which is now deprecated in favour of this package. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/composer.json b/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/composer.json deleted file mode 100644 index 179145e87..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/composer.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "doctrine/instantiator", - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "type": "library", - "license": "MIT", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "instantiate", - "constructor" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "require": { - "php": "^8.1" - }, - "require-dev": { - "ext-phar": "*", - "ext-pdo": "*", - "doctrine/coding-standard": "^11", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "autoload-dev": { - "psr-0": { - "DoctrineTest\\InstantiatorPerformance\\": "tests", - "DoctrineTest\\InstantiatorTest\\": "tests", - "DoctrineTest\\InstantiatorTestAsset\\": "tests" - } - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/docs/en/index.rst b/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/docs/en/index.rst deleted file mode 100644 index 0c85da0bc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/docs/en/index.rst +++ /dev/null @@ -1,68 +0,0 @@ -Introduction -============ - -This library provides a way of avoiding usage of constructors when instantiating PHP classes. - -Installation -============ - -The suggested installation method is via `composer`_: - -.. code-block:: console - - $ composer require doctrine/instantiator - -Usage -===== - -The instantiator is able to create new instances of any class without -using the constructor or any API of the class itself: - -.. code-block:: php - - instantiate(User::class); - -Contributing -============ - -- Follow the `Doctrine Coding Standard`_ -- The project will follow strict `object calisthenics`_ -- Any contribution must provide tests for additional introduced - conditions -- Any un-confirmed issue needs a failing test case before being - accepted -- Pull requests must be sent from a new hotfix/feature branch, not from - ``master``. - -Testing -======= - -The PHPUnit version to be used is the one installed as a dev- dependency -via composer: - -.. code-block:: console - - $ ./vendor/bin/phpunit - -Accepted coverage for new contributions is 80%. Any contribution not -satisfying this requirement won’t be merged. - -Credits -======= - -This library was migrated from `ocramius/instantiator`_, which has been -donated to the doctrine organization, and which is now deprecated in -favour of this package. - -.. _composer: https://getcomposer.org/ -.. _CONTRIBUTING.md: CONTRIBUTING.md -.. _ocramius/instantiator: https://github.com/Ocramius/Instantiator -.. _Doctrine Coding Standard: https://github.com/doctrine/coding-standard -.. _object calisthenics: http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/docs/en/sidebar.rst b/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/docs/en/sidebar.rst deleted file mode 100644 index 0c3647914..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/docs/en/sidebar.rst +++ /dev/null @@ -1,4 +0,0 @@ -.. toctree:: - :depth: 3 - - index diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/psalm.xml b/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/psalm.xml deleted file mode 100644 index e9b622b3b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/psalm.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php b/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php deleted file mode 100644 index 1e591928d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php +++ /dev/null @@ -1,14 +0,0 @@ - $reflectionClass - * - * @template T of object - */ - public static function fromAbstractClass(ReflectionClass $reflectionClass): self - { - return new self(sprintf( - 'The provided class "%s" is abstract, and cannot be instantiated', - $reflectionClass->getName(), - )); - } - - public static function fromEnum(string $className): self - { - return new self(sprintf( - 'The provided class "%s" is an enum, and cannot be instantiated', - $className, - )); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php b/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php deleted file mode 100644 index 4f70ded20..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php +++ /dev/null @@ -1,61 +0,0 @@ - $reflectionClass - * - * @template T of object - */ - public static function fromSerializationTriggeredException( - ReflectionClass $reflectionClass, - Exception $exception, - ): self { - return new self( - sprintf( - 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization', - $reflectionClass->getName(), - ), - 0, - $exception, - ); - } - - /** - * @phpstan-param ReflectionClass $reflectionClass - * - * @template T of object - */ - public static function fromUncleanUnSerialization( - ReflectionClass $reflectionClass, - string $errorString, - int $errorCode, - string $errorFile, - int $errorLine, - ): self { - return new self( - sprintf( - 'Could not produce an instance of "%s" via un-serialization, since an error was triggered ' - . 'in file "%s" at line "%d"', - $reflectionClass->getName(), - $errorFile, - $errorLine, - ), - 0, - new Exception($errorString, $errorCode), - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php b/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php deleted file mode 100644 index f803f89aa..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php +++ /dev/null @@ -1,255 +0,0 @@ - $className - * - * @phpstan-return T - * - * @throws ExceptionInterface - * - * @template T of object - */ - public function instantiate(string $className): object - { - if (isset(self::$cachedCloneables[$className])) { - /** @phpstan-var T */ - $cachedCloneable = self::$cachedCloneables[$className]; - - return clone $cachedCloneable; - } - - if (isset(self::$cachedInstantiators[$className])) { - $factory = self::$cachedInstantiators[$className]; - - return $factory(); - } - - return $this->buildAndCacheFromFactory($className); - } - - /** - * Builds the requested object and caches it in static properties for performance - * - * @phpstan-param class-string $className - * - * @phpstan-return T - * - * @template T of object - */ - private function buildAndCacheFromFactory(string $className): object - { - $factory = self::$cachedInstantiators[$className] = $this->buildFactory($className); - $instance = $factory(); - - if ($this->isSafeToClone(new ReflectionClass($instance))) { - self::$cachedCloneables[$className] = clone $instance; - } - - return $instance; - } - - /** - * Builds a callable capable of instantiating the given $className without - * invoking its constructor. - * - * @phpstan-param class-string $className - * - * @phpstan-return callable(): T - * - * @throws InvalidArgumentException - * @throws UnexpectedValueException - * @throws ReflectionException - * - * @template T of object - */ - private function buildFactory(string $className): callable - { - $reflectionClass = $this->getReflectionClass($className); - - if ($this->isInstantiableViaReflection($reflectionClass)) { - return [$reflectionClass, 'newInstanceWithoutConstructor']; - } - - $serializedString = sprintf( - '%s:%d:"%s":0:{}', - is_subclass_of($className, Serializable::class) ? self::SERIALIZATION_FORMAT_USE_UNSERIALIZER : self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER, - strlen($className), - $className, - ); - - $this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString); - - return static fn () => unserialize($serializedString); - } - - /** - * @phpstan-param class-string $className - * - * @phpstan-return ReflectionClass - * - * @throws InvalidArgumentException - * @throws ReflectionException - * - * @template T of object - */ - private function getReflectionClass(string $className): ReflectionClass - { - if (! class_exists($className)) { - throw InvalidArgumentException::fromNonExistingClass($className); - } - - if (enum_exists($className, false)) { - throw InvalidArgumentException::fromEnum($className); - } - - $reflection = new ReflectionClass($className); - - if ($reflection->isAbstract()) { - throw InvalidArgumentException::fromAbstractClass($reflection); - } - - return $reflection; - } - - /** - * @phpstan-param ReflectionClass $reflectionClass - * - * @throws UnexpectedValueException - * - * @template T of object - */ - private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, string $serializedString): void - { - set_error_handler(static function (int $code, string $message, string $file, int $line) use ($reflectionClass, &$error): bool { - $error = UnexpectedValueException::fromUncleanUnSerialization( - $reflectionClass, - $message, - $code, - $file, - $line, - ); - - return true; - }); - - try { - $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); - } finally { - restore_error_handler(); - } - - if ($error) { - throw $error; - } - } - - /** - * @phpstan-param ReflectionClass $reflectionClass - * - * @throws UnexpectedValueException - * - * @template T of object - */ - private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString): void - { - try { - unserialize($serializedString); - } catch (Exception $exception) { - throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception); - } - } - - /** - * @phpstan-param ReflectionClass $reflectionClass - * - * @template T of object - */ - private function isInstantiableViaReflection(ReflectionClass $reflectionClass): bool - { - return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal()); - } - - /** - * Verifies whether the given class is to be considered internal - * - * @phpstan-param ReflectionClass $reflectionClass - * - * @template T of object - */ - private function hasInternalAncestors(ReflectionClass $reflectionClass): bool - { - do { - if ($reflectionClass->isInternal()) { - return true; - } - - $reflectionClass = $reflectionClass->getParentClass(); - } while ($reflectionClass); - - return false; - } - - /** - * Checks if a class is cloneable - * - * Classes implementing `__clone` cannot be safely cloned, as that may cause side-effects. - * - * @phpstan-param ReflectionClass $reflectionClass - * - * @template T of object - */ - private function isSafeToClone(ReflectionClass $reflectionClass): bool - { - return $reflectionClass->isCloneable() - && ! $reflectionClass->hasMethod('__clone') - && ! $reflectionClass->isSubclassOf(ArrayIterator::class); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php b/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php deleted file mode 100644 index c6ebe351b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - $className - * - * @phpstan-return T - * - * @throws ExceptionInterface - * - * @template T of object - */ - public function instantiate(string $className): object; -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/lexer/LICENSE b/fixtures/symfony_5_local_deps/vendor/doctrine/lexer/LICENSE deleted file mode 100644 index e8fdec4af..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/lexer/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2018 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/lexer/README.md b/fixtures/symfony_5_local_deps/vendor/doctrine/lexer/README.md deleted file mode 100644 index 784f2a271..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/lexer/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Doctrine Lexer - -[![Build Status](https://github.com/doctrine/lexer/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/lexer/actions) - -Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. - -This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). - -https://www.doctrine-project.org/projects/lexer.html diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/lexer/composer.json b/fixtures/symfony_5_local_deps/vendor/doctrine/lexer/composer.json deleted file mode 100644 index 995dafa0d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/lexer/composer.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "doctrine/lexer", - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "license": "MIT", - "type": "library", - "keywords": [ - "php", - "parser", - "lexer", - "annotations", - "docblock" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.21" - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Tests\\Common\\Lexer\\": "tests" - } - }, - "config": { - "allow-plugins": { - "composer/package-versions-deprecated": true, - "dealerdirect/phpcodesniffer-composer-installer": true - }, - "sort-packages": true - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/LICENSE b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/LICENSE deleted file mode 100644 index e8fdec4af..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2018 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/README.md b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/README.md deleted file mode 100644 index 91a9f65d3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Doctrine Migrations - -[![Build Status](https://github.com/doctrine/migrations/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/migrations/actions) -[![Code Coverage](https://codecov.io/gh/doctrine/migrations/branch/3.1.x/graph/badge.svg)](https://codecov.io/gh/doctrine/migrations/branch/3.1.x) -[![Packagist Downloads](https://img.shields.io/packagist/dm/doctrine/migrations)](https://packagist.org/packages/doctrine/migrations) -[![Packagist Version](https://img.shields.io/packagist/v/doctrine/migrations)](https://packagist.org/packages/doctrine/migrations) -[![GitHub license](https://img.shields.io/github/license/doctrine/migrations)](LICENSE) - -## Documentation - -All available documentation can be found [here](https://www.doctrine-project.org/projects/migrations.html). diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/UPGRADE.md b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/UPGRADE.md deleted file mode 100644 index 728c6074b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/UPGRADE.md +++ /dev/null @@ -1,302 +0,0 @@ -# Upgrade to 3.6 - -## Console -- The `--all-or-nothing` option for `migrations:migrate` does not accept a value anymore, and passing it a - value will generate a deprecation. Specifying `--all-or-nothing` will wrap all the migrations to be - executed into a single transaction, regardless of the specified configuration. - - - -# Upgrade to 3.1 - -- The "version" is the FQCN of the migration class (existing entries in the migrations table will be automatically updated). -- `MigrationsEventArgs` and `MigrationsVersionEventArgs` expose different API, -please refer to the [Code BC breaks](#code-bc-breaks) section. - -## Console -- Console output changed. The commands use a different output style. If you were relying on specific output, - please update your scripts. - Console output is not covered by the BC promise, so please try not to rely on specific a output. - Different levels of verbosity are available now (`-v`, `-vv` and `-vvv` ). -- The `--show-versions` option from `migrations:status` command has been removed, - use `migrations:list` instead. -- The `--write-sql` option for `migrations:migrate` and `migrations:execute` does not imply dry-run anymore, -use the `--dry-run` parameter instead. -- The `--db` option has been renamed to `--conn`. - -## Migrations table - -- The migrations table now has a new column named `execution_time`. -- Running the `migrations:migrate` or `migrations:execute` command will automatically upgrade the migration -table structure; a dedicated `migrations:sync-metadata-storage` command is available to sync manually the migrations table. - -## Migration template - -- The `` placeholder has been replaced by the `` placeholder. - -## Configuration files - -*migrations.php Before* -```php - 'My Project Migrations', - 'migrations_namespace' => 'MyProject\Migrations', - 'table_name' => 'doctrine_migration_versions', - 'column_name' => 'version', - 'column_length' => 14, - 'executed_at_column_name' => 'executed_at', - 'migrations_directory' => '/data/doctrine/migrations-docs-example/lib/MyProject/Migrations', - 'all_or_nothing' => true, - 'check_database_platform' => true, -]; -``` -*migrations.php After* - -```php - [ - 'table_name' => 'doctrine_migration_versions', - 'version_column_name' => 'version', - 'version_column_length' => 191, - 'executed_at_column_name' => 'executed_at', - 'execution_time_column_name' => 'execution_time', - ], - - 'migrations_paths' => [ - 'MyProject\Migrations' => '/data/doctrine/migrations/lib/MyProject/Migrations', - 'MyProject\Component\Migrations' => './Component/MyProject/Migrations', - ], - - 'all_or_nothing' => true, - 'check_database_platform' => true, -]; -``` - -Files in XML, YAML or JSON also changed in a similar way. Please refer to the official documentation for more details. - -Note: the `name` property has been removed. - -Note: the option in `table_storage` needs to be updated only if you have changed the metadata table settings -by using v2 options such as `table_name`, `column_name`, `column_length` or `executed_at_column_name`. If you did not change -those settings, it is recommended to not provide the options and let doctrine figure out the best settings. - -## Code BC breaks - -Most of the code is protected by the `@internal` declaration and in a very rare cases you might have dealt with the -internals of this library. - -The most important BC breaks are in the `Doctrine\Migrations\Configuration\Configuration` class and in the helper -system that now has been replaced by the `Doctrine\Migrations\DependencyFactory` functionalities. - -Here is a list of the most important changes: - -- Namespace `Doctrine\Migrations\Configuration\Configuration` - - CHANGED: Class `Doctrine\Migrations\Configuration\Configuration` became final - - REMOVED: Constant `Doctrine\Migrations\Configuration\Configuration::VERSION_FORMAT` was removed, there is not more limitation on the version format - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#__construct()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setName()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getName()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getConnection()` was removed, - use `Doctrine\Migrations\DependencyFactory#getConnection()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsTableName()` was removed, - use `Doctrine\Migrations\Configuration\Configuration#setMetadataStorageConfiguration` with an instance of `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsTableName()` was removed, - use `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration#getMetadataStorageConfiguration` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsColumnName()` was removed, - use `Doctrine\Migrations\Configuration\Configuration#setMetadataStorageConfiguration` with an instance of `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsColumnName()` was removed, - use `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration#getMetadataStorageConfiguration` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getQuotedMigrationsColumnName()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsColumnLength()` was removed, - use `Doctrine\Migrations\Configuration\Configuration#setMetadataStorageConfiguration` with an instance of `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsColumnLength()` was removed, - use `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration#getMetadataStorageConfiguration` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsExecutedAtColumnName()` was removed, - use `Doctrine\Migrations\Configuration\Configuration#setMetadataStorageConfiguration` with an instance of `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsExecutedAtColumnName()` was removed, - use `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration#getMetadataStorageConfiguration` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getQuotedMigrationsExecutedAtColumnName()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsDirectory()` was removed, - use `Doctrine\Migrations\Configuration\Configuration#addMigrationsDirectory()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsDirectory()` was removed, - use `Doctrine\Migrations\Configuration\Configuration#getMigrationDirectories()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsNamespace()` was removed, - use `Doctrine\Migrations\Configuration\Configuration#addMigrationsDirectory()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsNamespace()` was removed, - use `Doctrine\Migrations\Configuration\Configuration#getMigrationDirectories()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsFinder()` was removed, - use the dependency factory instead - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsFinder()` was removed, - use the dependency factory instead - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#hasVersionMigrated()` was removed, - use the dependency factory instead - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getVersionData()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#resolveVersionAlias()` was removed, - use `Doctrine\Migrations\Version\AliasResolver#resolveVersionAlias()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#isMigrationTableCreated()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#createMigrationTable()` was removed, - use `Doctrine\Migrations\Metadata\Storage\MetadataStorage#ensureInitialized()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getDateTime()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#generateVersionNumber()` was removed, - use `Doctrine\Migrations\Generator\ClassNameGenerator#generateClassName()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#connect()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#dispatchMigrationEvent()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#dispatchVersionEvent()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#dispatchEvent()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getNumberOfExecutedMigrations()` was removed, - use `Doctrine\Migrations\DependencyFactory#getMetadataStorage()->getExecutedMigrations()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getNumberOfAvailableMigrations()` was removed, - use `Doctrine\Migrations\DependencyFactory#getMigrationRepository()->getMigrations()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getLatestVersion()` was removed, - use `Doctrine\Migrations\Version\AliasResolver#resolveVersionAlias()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigratedVersions()` was removed, - use `Doctrine\Migrations\DependencyFactory#getMetadataStorage()->getExecutedMigrations()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getAvailableVersions()` was removed - use `Doctrine\Migrations\DependencyFactory#getMigrationRepository()->getMigrations()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getCurrentVersion()` was removed, - use `Doctrine\Migrations\Version\AliasResolver#resolveVersionAlias()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#registerMigrationsFromDirectory()` was removed, - use `Doctrine\Migrations\Configuration\Configuration#addMigrationsDirectory()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#registerMigration()` was removed, - use `Doctrine\Migrations\Configuration\Configuration#addMigrationClass()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#registerMigrations()` was removed - use `Doctrine\Migrations\Configuration\Configuration#addMigrationClass()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrations()` was removed, - use `Doctrine\Migrations\DependencyFactory#getMigrationRepository()->getMigrations()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getVersion()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsToExecute()` was removed, - use `Doctrine\Migrations\Version\MigrationPlanCalculator#getPlanUntilVersion()` to create a migration plan - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getPrevVersion()` was removed, - use `Doctrine\Migrations\Version\AliasResolver#resolveVersionAlias()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getNextVersion()` was removed, - use `Doctrine\Migrations\Version\AliasResolver#resolveVersionAlias()` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getRelativeVersion()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getDeltaVersion()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setOutputWriter()` was removed, - set the `Psr\Log\LoggerInterface` service in `Doctrine\Migrations\DependencyFactory` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getOutputWriter()` was removed, - get the `Psr\Log\LoggerInterface` service from `Doctrine\Migrations\DependencyFactory` - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getQueryWriter()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getDependencyFactory()` was removed - - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#validate()` was removed - - Namespace `Doctrine\Migrations\Configuration\Connection\Loader\Exception` - - REMOVED: Class `Doctrine\Migrations\Configuration\Connection\Loader\Exception\LoaderException` has been deleted - - REMOVED: Class `Doctrine\Migrations\Configuration\Connection\Loader\Exception\InvalidConfiguration` has been deleted - - Namespace `Doctrine\Migrations\Configuration\Exception` - - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\ParameterIncompatibleWithFinder` has been deleted - - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\InvalidConfigurationKey` has been deleted - - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\MigrationsNamespaceRequired` has been deleted - - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\XmlNotValid` has been deleted - - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\YamlNotAvailable` has been deleted - - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\FileAlreadyLoaded` has been deleted - - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\JsonNotValid` has been deleted - - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\YamlNotValid` has been deleted - - CHANGED: The number of required arguments for `Doctrine\Migrations\Configuration\Exception\FileNotFound::new()` increased from 0 to 1 - - Namespace `Doctrine\Migrations\Event\MigrationsEventArgs` - - CHANGED: Class `Doctrine\Migrations\Event\MigrationsEventArgs` became final - - REMOVED: Method `Doctrine\Migrations\Event\MigrationsEventArgs#getConfiguration()` was removed - - REMOVED: Method `Doctrine\Migrations\Event\MigrationsEventArgs#getDirection()` was removed, - use `Doctrine\Migrations\Event\MigrationsEventArgs#getPlan()` - - REMOVED: Method `Doctrine\Migrations\Event\MigrationsEventArgs#isDryRun()` was removed, - use `Doctrine\Migrations\Event\MigrationsEventArgs#getMigratorConfiguration()` - - CHANGED: `Doctrine\Migrations\Event\MigrationsEventArgs#__construct()` arguments have been updated - - Namespace `Doctrine\Migrations\Event\MigrationsVersionEventArgs` - - CHANGED: Class `Doctrine\Migrations\Event\MigrationsVersionEventArgs` became final - - REMOVED: Method `Doctrine\Migrations\Event\MigrationsVersionEventArgs#getVersion()` was removed - use `Doctrine\Migrations\Event\MigrationsEventArgs#getPlan()` - - Namespace `Doctrine\Migrations\Finder` - - REMOVED: These ancestors of `Doctrine\Migrations\Finder\RecursiveRegexFinder` have been removed: ["Doctrine\\Migrations\\Finder\\MigrationDeepFinder"] - - REMOVED: Class `Doctrine\Migrations\Finder\MigrationDeepFinder` has been deleted - - Namespace `Doctrine\Migrations\Tools\Console\Command` - - CHANGED: All non abstract classes in `Doctrine\Migrations\Tools\Console\Command\*` became final - - REMOVED: Class `Doctrine\Migrations\Tools\Console\Command\AbstractCommand` has been renamed into `Doctrine\Migrations\Tools\Console\Command\DoctrineCommand` and has been marked as internal - - CHANGED: Method `Doctrine\Migrations\Tools\Console\Command\*Command#__construct()` changed signature into `(?Doctrine\Migrations\DependencyFactory $di, ?string $name)` - - CHANGED: Method `initialize()` of Class `Doctrine\Migrations\Tools\Console\Command\AbstractCommand` visibility reduced from `public` to `protected` - - CHANGED: Method `execute()` of Class `Doctrine\Migrations\Tools\Console\Command\*Command` visibility reduced from `public` to `protected` - - REMOVED: Method `Doctrine\Migrations\Tools\Console\Command\DiffCommand#createMigrationDiffGenerator()` was removed - - Namespace `Doctrine\Migrations\Tools\Console\Exception` - - CHANGED: The number of required arguments for `Doctrine\Migrations\Tools\Console\Exception\SchemaDumpRequiresNoMigrations::new()` increased from 0 to 1 - - REMOVED: Class `Doctrine\Migrations\Tools\Console\Exception\ConnectionNotSpecified` has been deleted - - Namespace `Migrations\Tools\Console\Helper` - - REMOVED: All classes and namespaces are marked as internal or have been removed, - use `Doctrine\Migrations\DependencyFactory` instead - - Namespace `Doctrine\Migrations\AbstractMigration` - - CHANGED: The method `Doctrine\Migrations\AbstractMigration#__construct()` changed signature into `(Doctrine\DBAL\Connection $conn, PSR\Log\LoggerInterface $logger)` - - CHANGED: The method `Doctrine\Migrations\AbstractMigration#down()` is not abstract anymore, the default implementation will abort the migration process - - REMOVED: Property `Doctrine\Migrations\AbstractMigration#$version` was removed - - Namespace `Doctrine\Migrations\Provider` - - REMOVED: Class `Doctrine\Migrations\Provider\SchemaProviderInterface` has been deleted - - REMOVED: These ancestors of `Doctrine\Migrations\Provider\StubSchemaProvider` have been removed: ["Doctrine\\Migrations\\Provider\\SchemaProviderInterface"] - - Namespace `Doctrine\Migrations\Exception` - - REMOVED: Class `Doctrine\Migrations\Exception\MigrationNotConvertibleToSql` has been deleted - - REMOVED: Class `Doctrine\Migrations\Exception\MigrationsDirectoryRequired` has been deleted - - REMOVED: Class `Doctrine\Migrations\Version\Factory` became the interface `Doctrine\Migrations\Version\MigrationFactory` - - REMOVED: Class `Doctrine\Migrations\OutputWriter` has been deleted, - use `Psr\Log\Loggerinterface` - - - - -# Upgrade to 2.0 - -## BC Break: Moved `Doctrine\DBAL\Migrations` to `Doctrine\Migrations` - -Your migration classes that previously used to extend `Doctrine\DBAL\Migrations\AbstractMigration` now need to extend -`Doctrine\Migrations\AbstractMigration` instead. The `Doctrine\DBAL\Migrations\AbstractMigration` class will be -deprecated in the `1.8.0` release to prepare for the BC break. - -## BC Break: Removed `Doctrine\DBAL\Migrations\MigrationsVersion` - -The `Doctrine\DBAL\Migrations\MigrationsVersion` class is no longer available: please refrain from checking the Migrations version at runtime. - -## BC Break: Moved `Doctrine\Migrations\Migration` to `Doctrine\Migrations\Migrator` - -To make the name more clear and to differentiate from the `AbstractMigration` class, `Migration` was renamed to `Migrator`. - -## BC Break: Moved exception classes from `Doctrine\Migrations\%name%Exception` to `Doctrine\Migrations\Exception\%name%` -doctrine/migrations#636 -Follows concept introduced in ORM (doctrine/orm#6743 + doctrine/orm#7210) and naming follows pattern accepted in Doctrine CS. - -# Upgrade from 1.0-alpha1 to 1.0.0-alpha3 - -## AbstractMigration - -### Before: - -The method `getName()` was defined and it's implementation would change the order in which the migration would be processed. -It would cause discrepancies between the file order in a file browser and the order of execution of the migrations. - -### After: - -The `getName()` method as been removed | set final and new `getDescription()` method has been added. -The goal of this method is to be able to provide context for the migration. -This context is shown for the last migrated migration when the status command is called. - -## --write-sql option from the migrate command - -### Before: - -The `--write-sql` option would only output sql contained in the migration and would not update the table containing the migrated migrations. - -### After: - -That option now also output the sql queries necessary to update the table containing the state of the migrations. -If you want to go back to the previous behavior just make a request on the bug tracker as for now the need for it is not very clear. - -## MigrationsVersion::VERSION - -### Before: - -`MigrationsVersion::VERSION` used to be a property. -The returned value was fanciful. - -### After: - -It is now a a function so that a different value can be automatically send back if it's a modified version that's used. -The returned value is now the git tag. -The tag is in lowercase as the other doctrine projects. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/bin/doctrine-migrations b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/bin/doctrine-migrations deleted file mode 100755 index 68394e84c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/bin/doctrine-migrations +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env php -=4" - }, - "suggest": { - "doctrine/sql-formatter": "Allows to generate formatted SQL with the diff command.", - "symfony/yaml": "Allows the use of yaml for migration configuration files." - }, - "autoload": { - "psr-4": { - "Doctrine\\Migrations\\": "lib/Doctrine/Migrations" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Migrations\\Tests\\": "tests/Doctrine/Migrations/Tests" - } - }, - "bin": [ - "bin/doctrine-migrations" - ], - "config": { - "allow-plugins": { - "composer/package-versions-deprecated": true, - "dealerdirect/phpcodesniffer-composer-installer": true - }, - "sort-packages": true - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/AbstractMigration.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/AbstractMigration.php deleted file mode 100644 index 098eb620a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/AbstractMigration.php +++ /dev/null @@ -1,151 +0,0 @@ - */ - protected $sm; - - /** @var AbstractPlatform */ - protected $platform; - - /** @var Query[] */ - private array $plannedSql = []; - - public function __construct(Connection $connection, private readonly LoggerInterface $logger) - { - $this->connection = $connection; - $this->sm = $this->connection->createSchemaManager(); - $this->platform = $this->connection->getDatabasePlatform(); - } - - /** - * Indicates the transactional mode of this migration. - * - * If this function returns true (default) the migration will be executed - * in one transaction, otherwise non-transactional state will be used to - * execute each of the migration SQLs. - * - * Extending class should override this function to alter the return value. - */ - public function isTransactional(): bool - { - return true; - } - - public function getDescription(): string - { - return ''; - } - - public function warnIf(bool $condition, string $message = 'Unknown Reason'): void - { - if (! $condition) { - return; - } - - $this->logger->warning($message, ['migration' => $this]); - } - - /** @throws AbortMigration */ - public function abortIf(bool $condition, string $message = 'Unknown Reason'): void - { - if ($condition) { - throw new AbortMigration($message); - } - } - - /** @throws SkipMigration */ - public function skipIf(bool $condition, string $message = 'Unknown Reason'): void - { - if ($condition) { - throw new SkipMigration($message); - } - } - - /** @throws MigrationException|DBALException */ - public function preUp(Schema $schema): void - { - } - - /** @throws MigrationException|DBALException */ - public function postUp(Schema $schema): void - { - } - - /** @throws MigrationException|DBALException */ - public function preDown(Schema $schema): void - { - } - - /** @throws MigrationException|DBALException */ - public function postDown(Schema $schema): void - { - } - - /** @throws MigrationException|DBALException */ - abstract public function up(Schema $schema): void; - - /** @throws MigrationException|DBALException */ - public function down(Schema $schema): void - { - $this->abortIf(true, sprintf('No down() migration implemented for "%s"', static::class)); - } - - /** - * @param mixed[] $params - * @param mixed[] $types - */ - protected function addSql( - string $sql, - array $params = [], - array $types = [], - ): void { - $this->plannedSql[] = new Query($sql, $params, $types); - } - - /** @return Query[] */ - public function getSql(): array - { - return $this->plannedSql; - } - - protected function write(string $message): void - { - $this->logger->notice($message, ['migration' => $this]); - } - - /** @throws IrreversibleMigration */ - protected function throwIrreversibleMigrationException(string|null $message = null): void - { - if ($message === null) { - $message = 'This migration is irreversible and cannot be reverted.'; - } - - throw new IrreversibleMigration($message); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Configuration.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Configuration.php deleted file mode 100644 index 9e1f1cedc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Configuration.php +++ /dev/null @@ -1,212 +0,0 @@ - */ - private array $migrationsDirectories = []; - - /** @var string[] */ - private array $migrationClasses = []; - - private bool $migrationsAreOrganizedByYear = false; - - private bool $migrationsAreOrganizedByYearAndMonth = false; - - private string|null $customTemplate = null; - - private bool $isDryRun = false; - - private bool $allOrNothing = false; - - private bool $transactional = true; - - private string|null $connectionName = null; - - private string|null $entityManagerName = null; - - private bool $checkDbPlatform = true; - - private MetadataStorageConfiguration|null $metadataStorageConfiguration = null; - - private bool $frozen = false; - - public function freeze(): void - { - $this->frozen = true; - } - - private function assertNotFrozen(): void - { - if ($this->frozen) { - throw FrozenConfiguration::new(); - } - } - - public function setMetadataStorageConfiguration(MetadataStorageConfiguration $metadataStorageConfiguration): void - { - $this->assertNotFrozen(); - $this->metadataStorageConfiguration = $metadataStorageConfiguration; - } - - /** @return string[] */ - public function getMigrationClasses(): array - { - return $this->migrationClasses; - } - - public function addMigrationClass(string $className): void - { - $this->assertNotFrozen(); - $this->migrationClasses[] = $className; - } - - public function getMetadataStorageConfiguration(): MetadataStorageConfiguration|null - { - return $this->metadataStorageConfiguration; - } - - public function addMigrationsDirectory(string $namespace, string $path): void - { - $this->assertNotFrozen(); - $this->migrationsDirectories[$namespace] = $path; - } - - /** @return array */ - public function getMigrationDirectories(): array - { - return $this->migrationsDirectories; - } - - public function getConnectionName(): string|null - { - return $this->connectionName; - } - - public function setConnectionName(string|null $connectionName): void - { - $this->assertNotFrozen(); - $this->connectionName = $connectionName; - } - - public function getEntityManagerName(): string|null - { - return $this->entityManagerName; - } - - public function setEntityManagerName(string|null $entityManagerName): void - { - $this->assertNotFrozen(); - $this->entityManagerName = $entityManagerName; - } - - public function setCustomTemplate(string|null $customTemplate): void - { - $this->assertNotFrozen(); - $this->customTemplate = $customTemplate; - } - - public function getCustomTemplate(): string|null - { - return $this->customTemplate; - } - - public function areMigrationsOrganizedByYear(): bool - { - return $this->migrationsAreOrganizedByYear; - } - - /** @throws MigrationException */ - public function setMigrationsAreOrganizedByYear( - bool $migrationsAreOrganizedByYear = true, - ): void { - $this->assertNotFrozen(); - $this->migrationsAreOrganizedByYear = $migrationsAreOrganizedByYear; - } - - /** @throws MigrationException */ - public function setMigrationsAreOrganizedByYearAndMonth( - bool $migrationsAreOrganizedByYearAndMonth = true, - ): void { - $this->assertNotFrozen(); - $this->migrationsAreOrganizedByYear = $migrationsAreOrganizedByYearAndMonth; - $this->migrationsAreOrganizedByYearAndMonth = $migrationsAreOrganizedByYearAndMonth; - } - - public function areMigrationsOrganizedByYearAndMonth(): bool - { - return $this->migrationsAreOrganizedByYearAndMonth; - } - - public function setIsDryRun(bool $isDryRun): void - { - $this->assertNotFrozen(); - $this->isDryRun = $isDryRun; - } - - public function isDryRun(): bool - { - return $this->isDryRun; - } - - public function setAllOrNothing(bool $allOrNothing): void - { - $this->assertNotFrozen(); - $this->allOrNothing = $allOrNothing; - } - - public function isAllOrNothing(): bool - { - return $this->allOrNothing; - } - - public function setTransactional(bool $transactional): void - { - $this->assertNotFrozen(); - $this->transactional = $transactional; - } - - public function isTransactional(): bool - { - return $this->transactional; - } - - public function setCheckDatabasePlatform(bool $checkDbPlatform): void - { - $this->checkDbPlatform = $checkDbPlatform; - } - - public function isDatabasePlatformChecked(): bool - { - return $this->checkDbPlatform; - } - - public function setMigrationOrganization(string $migrationOrganization): void - { - $this->assertNotFrozen(); - - match (strtolower($migrationOrganization)) { - self::VERSIONS_ORGANIZATION_NONE => $this->setMigrationsAreOrganizedByYearAndMonth(false), - self::VERSIONS_ORGANIZATION_BY_YEAR => $this->setMigrationsAreOrganizedByYear(), - self::VERSIONS_ORGANIZATION_BY_YEAR_AND_MONTH => $this->setMigrationsAreOrganizedByYearAndMonth(), - default => throw UnknownConfigurationValue::new('organize_migrations', $migrationOrganization), - }; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Connection/ConfigurationFile.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Connection/ConfigurationFile.php deleted file mode 100644 index a160216d5..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Connection/ConfigurationFile.php +++ /dev/null @@ -1,51 +0,0 @@ -filename)) { - throw FileNotFound::new($this->filename); - } - - $params = include $this->filename; - - if ($params instanceof Connection) { - return $params; - } - - if ($params instanceof ConnectionLoader) { - return $params->getConnection(); - } - - if (is_array($params)) { - return DriverManager::getConnection($params); - } - - throw InvalidConfiguration::invalidArrayConfiguration(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Connection/ConnectionLoader.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Connection/ConnectionLoader.php deleted file mode 100644 index bf9e3f2ab..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Connection/ConnectionLoader.php +++ /dev/null @@ -1,23 +0,0 @@ -registry = $registry; - $that->defaultConnectionName = $connectionName; - - return $that; - } - - private function __construct() - { - } - - public function getConnection(string|null $name = null): Connection - { - $connection = $this->registry->getConnection($name ?? $this->defaultConnectionName); - if (! $connection instanceof Connection) { - throw InvalidConfiguration::invalidConnectionType($connection); - } - - return $connection; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Connection/Exception/ConnectionNotSpecified.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Connection/Exception/ConnectionNotSpecified.php deleted file mode 100644 index e3b9501f7..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Connection/Exception/ConnectionNotSpecified.php +++ /dev/null @@ -1,17 +0,0 @@ -connection; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/EntityManager/ConfigurationFile.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/EntityManager/ConfigurationFile.php deleted file mode 100644 index 9cf4025e5..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/EntityManager/ConfigurationFile.php +++ /dev/null @@ -1,51 +0,0 @@ -filename)) { - throw FileNotFound::new($this->filename); - } - - $params = include $this->filename; - - if ($params instanceof EntityManagerInterface) { - return $params; - } - - if ($params instanceof EntityManagerLoader) { - return $params->getEntityManager(); - } - - throw InvalidConfiguration::invalidArrayConfiguration(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/EntityManager/EntityManagerLoader.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/EntityManager/EntityManagerLoader.php deleted file mode 100644 index 2982c9ad0..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/EntityManager/EntityManagerLoader.php +++ /dev/null @@ -1,18 +0,0 @@ -entityManager; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/EntityManager/ManagerRegistryEntityManager.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/EntityManager/ManagerRegistryEntityManager.php deleted file mode 100644 index 380789419..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/EntityManager/ManagerRegistryEntityManager.php +++ /dev/null @@ -1,41 +0,0 @@ -registry = $registry; - $that->defaultManagerName = $managerName; - - return $that; - } - - private function __construct() - { - } - - public function getEntityManager(string|null $name = null): EntityManagerInterface - { - $managerName = $name ?? $this->defaultManagerName; - - $em = $this->registry->getManager($managerName); - if (! $em instanceof EntityManagerInterface) { - throw InvalidConfiguration::invalidManagerType($em); - } - - return $em; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Exception/ConfigurationException.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Exception/ConfigurationException.php deleted file mode 100644 index 8db929c64..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Exception/ConfigurationException.php +++ /dev/null @@ -1,11 +0,0 @@ - $configurations */ - public function __construct(private readonly array $configurations) - { - } - - public function getConfiguration(): Configuration - { - $configMap = [ - 'migrations_paths' => static function ($paths, Configuration $configuration): void { - foreach ($paths as $namespace => $path) { - $configuration->addMigrationsDirectory($namespace, $path); - } - }, - 'migrations' => static function ($migrations, Configuration $configuration): void { - foreach ($migrations as $className) { - $configuration->addMigrationClass($className); - } - }, - - 'connection' => 'setConnectionName', - 'em' => 'setEntityManagerName', - - 'table_storage' => [ - 'table_name' => 'setTableName', - 'version_column_name' => 'setVersionColumnName', - 'version_column_length' => static function ($value, TableMetadataStorageConfiguration $configuration): void { - $configuration->setVersionColumnLength((int) $value); - }, - 'executed_at_column_name' => 'setExecutedAtColumnName', - 'execution_time_column_name' => 'setExecutionTimeColumnName', - ], - - 'organize_migrations' => 'setMigrationOrganization', - 'custom_template' => 'setCustomTemplate', - 'all_or_nothing' => static function ($value, Configuration $configuration): void { - $configuration->setAllOrNothing(is_bool($value) ? $value : BooleanStringFormatter::toBoolean($value, false)); - }, - 'transactional' => static function ($value, Configuration $configuration): void { - $configuration->setTransactional(is_bool($value) ? $value : BooleanStringFormatter::toBoolean($value, true)); - }, - 'check_database_platform' => static function ($value, Configuration $configuration): void { - $configuration->setCheckDatabasePlatform(is_bool($value) ? $value : BooleanStringFormatter::toBoolean($value, false)); - }, - ]; - - $object = new Configuration(); - self::applyConfigs($configMap, $object, $this->configurations); - - if ($object->getMetadataStorageConfiguration() === null) { - $object->setMetadataStorageConfiguration(new TableMetadataStorageConfiguration()); - } - - return $object; - } - - /** - * @param mixed[] $configMap - * @param array $data - */ - private static function applyConfigs(array $configMap, Configuration|TableMetadataStorageConfiguration $object, array $data): void - { - foreach ($data as $configurationKey => $configurationValue) { - if (! isset($configMap[$configurationKey])) { - throw InvalidConfigurationKey::new((string) $configurationKey); - } - - if (is_array($configMap[$configurationKey])) { - if ($configurationKey !== 'table_storage') { - throw InvalidConfigurationKey::new((string) $configurationKey); - } - - $storageConfig = new TableMetadataStorageConfiguration(); - assert($object instanceof Configuration); - $object->setMetadataStorageConfiguration($storageConfig); - self::applyConfigs($configMap[$configurationKey], $storageConfig, $configurationValue); - } else { - $callable = $configMap[$configurationKey] instanceof Closure - ? $configMap[$configurationKey] - : [$object, $configMap[$configurationKey]]; - assert(is_callable($callable)); - call_user_func( - $callable, - $configurationValue, - $object, - $data, - ); - } - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/ConfigurationFile.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/ConfigurationFile.php deleted file mode 100644 index 3ed3ad864..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/ConfigurationFile.php +++ /dev/null @@ -1,35 +0,0 @@ -file = $file; - } - - /** - * @param array $directories - * - * @return array - */ - final protected function getDirectoriesRelativeToFile(array $directories, string $file): array - { - foreach ($directories as $ns => $dir) { - $path = realpath(dirname($file) . '/' . $dir); - - $directories[$ns] = $path !== false ? $path : $dir; - } - - return $directories; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/ConfigurationFileWithFallback.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/ConfigurationFileWithFallback.php deleted file mode 100644 index 62216c1f8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/ConfigurationFileWithFallback.php +++ /dev/null @@ -1,61 +0,0 @@ -file !== null) { - return $this->loadConfiguration($this->file); - } - - /** - * If no config has been provided, look for default config file in the path. - */ - $defaultFiles = [ - 'migrations.xml', - 'migrations.yml', - 'migrations.yaml', - 'migrations.json', - 'migrations.php', - ]; - - foreach ($defaultFiles as $file) { - if ($this->configurationFileExists($file)) { - return $this->loadConfiguration($file); - } - } - - throw MissingConfigurationFile::new(); - } - - private function configurationFileExists(string $config): bool - { - return file_exists($config); - } - - /** @throws FileTypeNotSupported */ - private function loadConfiguration(string $file): Configuration - { - return (new FormattedFile($file))->getConfiguration(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/ConfigurationLoader.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/ConfigurationLoader.php deleted file mode 100644 index cd84a4344..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/ConfigurationLoader.php +++ /dev/null @@ -1,12 +0,0 @@ -configurations; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/FormattedFile.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/FormattedFile.php deleted file mode 100644 index 45851e86e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/FormattedFile.php +++ /dev/null @@ -1,45 +0,0 @@ -loaders = [ - 'json' => static fn ($file): ConfigurationLoader => new JsonFile($file), - 'php' => static fn ($file): ConfigurationLoader => new PhpFile($file), - 'xml' => static fn ($file): ConfigurationLoader => new XmlFile($file), - 'yaml' => static fn ($file): ConfigurationLoader => new YamlFile($file), - 'yml' => static fn ($file): ConfigurationLoader => new YamlFile($file), - ]; - } - - public function getConfiguration(): Configuration - { - if (count($this->loaders) === 0) { - $this->setDefaultLoaders(); - } - - $extension = pathinfo($this->file, PATHINFO_EXTENSION); - if (! isset($this->loaders[$extension])) { - throw InvalidConfigurationFormat::new($this->file); - } - - return $this->loaders[$extension]($this->file)->getConfiguration(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/JsonFile.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/JsonFile.php deleted file mode 100644 index 13e1ca018..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/JsonFile.php +++ /dev/null @@ -1,46 +0,0 @@ -file)) { - throw FileNotFound::new($this->file); - } - - $contents = file_get_contents($this->file); - - assert($contents !== false); - - $config = json_decode($contents, true); - - if (json_last_error() !== JSON_ERROR_NONE) { - throw JsonNotValid::new(); - } - - if (isset($config['migrations_paths'])) { - $config['migrations_paths'] = $this->getDirectoriesRelativeToFile( - $config['migrations_paths'], - $this->file, - ); - } - - return (new ConfigurationArray($config))->getConfiguration(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/PhpFile.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/PhpFile.php deleted file mode 100644 index d6f2888c3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/PhpFile.php +++ /dev/null @@ -1,37 +0,0 @@ -file)) { - throw FileNotFound::new($this->file); - } - - $config = require $this->file; - if ($config instanceof Configuration) { - return $config; - } - - assert(is_array($config)); - if (isset($config['migrations_paths'])) { - $config['migrations_paths'] = $this->getDirectoriesRelativeToFile( - $config['migrations_paths'], - $this->file, - ); - } - - return (new ConfigurationArray($config))->getConfiguration(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/XML/configuration.xsd b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/XML/configuration.xsd deleted file mode 100644 index c51d47895..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/XML/configuration.xsd +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/XmlFile.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/XmlFile.php deleted file mode 100644 index b2ee83598..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/XmlFile.php +++ /dev/null @@ -1,129 +0,0 @@ -file)) { - throw FileNotFound::new($this->file); - } - - $this->validateXml($this->file); - - $rawXML = file_get_contents($this->file); - assert($rawXML !== false); - - $root = simplexml_load_string($rawXML, SimpleXMLElement::class, LIBXML_NOCDATA); - assert($root !== false); - - $config = $this->extractParameters($root, true); - - if (isset($config['all_or_nothing'])) { - $config['all_or_nothing'] = BooleanStringFormatter::toBoolean( - $config['all_or_nothing'], - false, - ); - } - - if (isset($config['transactional'])) { - $config['transactional'] = BooleanStringFormatter::toBoolean( - $config['transactional'], - true, - ); - } - - if (isset($config['migrations_paths'])) { - $config['migrations_paths'] = $this->getDirectoriesRelativeToFile( - $config['migrations_paths'], - $this->file, - ); - } - - return (new ConfigurationArray($config))->getConfiguration(); - } - - /** @return mixed[] */ - private function extractParameters(SimpleXMLElement $root, bool $loopOverNodes): array - { - $config = []; - - $itemsToCheck = $loopOverNodes ? $root->children() : $root->attributes(); - - if (! ($itemsToCheck instanceof SimpleXMLElement)) { - return $config; - } - - foreach ($itemsToCheck as $node) { - $nodeName = strtr($node->getName(), '-', '_'); - if ($nodeName === 'migrations_paths') { - $config['migrations_paths'] = []; - foreach ($node->path as $pathNode) { - $config['migrations_paths'][(string) $pathNode['namespace']] = (string) $pathNode; - } - } elseif ($nodeName === 'storage' && $node->{'table-storage'} instanceof SimpleXMLElement) { - $config['table_storage'] = $this->extractParameters($node->{'table-storage'}, false); - } elseif ($nodeName === 'migrations') { - $config['migrations'] = $this->extractMigrations($node); - } else { - $config[$nodeName] = (string) $node; - } - } - - return $config; - } - - /** @return list */ - private function extractMigrations(SimpleXMLElement $node): array - { - $migrations = []; - foreach ($node->migration as $pathNode) { - $migrations[] = (string) $pathNode; - } - - return $migrations; - } - - private function validateXml(string $file): void - { - try { - libxml_use_internal_errors(true); - - $xml = new DOMDocument(); - - if ($xml->load($file) === false) { - throw XmlNotValid::malformed(); - } - - $xsdPath = __DIR__ . DIRECTORY_SEPARATOR . 'XML' . DIRECTORY_SEPARATOR . 'configuration.xsd'; - - if ($xml->schemaValidate($xsdPath) === false) { - throw XmlNotValid::failedValidation(); - } - } finally { - libxml_clear_errors(); - libxml_use_internal_errors(false); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/YamlFile.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/YamlFile.php deleted file mode 100644 index f502bbee8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Configuration/Migration/YamlFile.php +++ /dev/null @@ -1,55 +0,0 @@ -file)) { - throw FileNotFound::new($this->file); - } - - $content = file_get_contents($this->file); - - assert($content !== false); - - try { - $config = Yaml::parse($content); - } catch (ParseException) { - throw YamlNotValid::malformed(); - } - - if (! is_array($config)) { - throw YamlNotValid::invalid(); - } - - if (isset($config['migrations_paths'])) { - $config['migrations_paths'] = $this->getDirectoriesRelativeToFile( - $config['migrations_paths'], - $this->file, - ); - } - - return (new ConfigurationArray($config))->getConfiguration(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/DbalMigrator.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/DbalMigrator.php deleted file mode 100644 index 5e782dbfe..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/DbalMigrator.php +++ /dev/null @@ -1,142 +0,0 @@ - */ - private function executeMigrations( - MigrationPlanList $migrationsPlan, - MigratorConfiguration $migratorConfiguration, - ): array { - $allOrNothing = $migratorConfiguration->isAllOrNothing(); - - if ($allOrNothing) { - $this->assertAllMigrationsAreTransactional($migrationsPlan); - $this->connection->beginTransaction(); - } - - try { - $this->dispatcher->dispatchMigrationEvent(Events::onMigrationsMigrating, $migrationsPlan, $migratorConfiguration); - - $sql = $this->executePlan($migrationsPlan, $migratorConfiguration); - - $this->dispatcher->dispatchMigrationEvent(Events::onMigrationsMigrated, $migrationsPlan, $migratorConfiguration); - } catch (Throwable $e) { - if ($allOrNothing) { - TransactionHelper::rollbackIfInTransaction($this->connection); - } - - throw $e; - } - - if ($allOrNothing) { - TransactionHelper::commitIfInTransaction($this->connection); - } - - return $sql; - } - - private function assertAllMigrationsAreTransactional(MigrationPlanList $migrationsPlan): void - { - foreach ($migrationsPlan->getItems() as $plan) { - if (! $plan->getMigration()->isTransactional()) { - throw MigrationConfigurationConflict::migrationIsNotTransactional($plan->getMigration()); - } - } - } - - /** @return array */ - private function executePlan(MigrationPlanList $migrationsPlan, MigratorConfiguration $migratorConfiguration): array - { - $sql = []; - $time = 0; - - foreach ($migrationsPlan->getItems() as $plan) { - $versionExecutionResult = $this->executor->execute($plan, $migratorConfiguration); - - // capture the to Schema for the migration so we have the ability to use - // it as the from Schema for the next migration when we are running a dry run - // $toSchema may be null in the case of skipped migrations - if (! $versionExecutionResult->isSkipped()) { - $migratorConfiguration->setFromSchema($versionExecutionResult->getToSchema()); - } - - $sql[(string) $plan->getVersion()] = $versionExecutionResult->getSql(); - $time += $versionExecutionResult->getTime(); - } - - return $sql; - } - - /** @param array $sql */ - private function endMigrations( - StopwatchEvent $stopwatchEvent, - MigrationPlanList $migrationsPlan, - array $sql, - ): void { - $stopwatchEvent->stop(); - - $this->logger->notice( - 'finished in {duration}ms, used {memory} memory, {migrations_count} migrations executed, {queries_count} sql queries', - [ - 'duration' => $stopwatchEvent->getDuration(), - 'memory' => BytesFormatter::formatBytes($stopwatchEvent->getMemory()), - 'migrations_count' => count($migrationsPlan), - 'queries_count' => count($sql, COUNT_RECURSIVE) - count($sql), - ], - ); - } - - /** - * {@inheritDoc} - */ - public function migrate(MigrationPlanList $migrationsPlan, MigratorConfiguration $migratorConfiguration): array - { - if (count($migrationsPlan) === 0) { - $this->logger->notice('No migrations to execute.'); - - return []; - } - - $stopwatchEvent = $this->stopwatch->start('migrate'); - - $sql = $this->executeMigrations($migrationsPlan, $migratorConfiguration); - - $this->endMigrations($stopwatchEvent, $migrationsPlan, $sql); - - return $sql; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/DependencyFactory.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/DependencyFactory.php deleted file mode 100644 index f415b5729..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/DependencyFactory.php +++ /dev/null @@ -1,465 +0,0 @@ - */ - private array $inResolution = []; - - private Configuration|null $configuration = null; - - /** @var object[]|callable[] */ - private array $dependencies = []; - - private Connection|null $connection = null; - private EntityManagerInterface|null $em = null; - private EventManager|null $eventManager = null; - private bool $frozen = false; - private ConfigurationLoader $configurationLoader; - private ConnectionLoader $connectionLoader; - private EntityManagerLoader|null $emLoader = null; - - /** @var callable[] */ - private array $factories = []; - - public static function fromConnection( - ConfigurationLoader $configurationLoader, - ConnectionLoader $connectionLoader, - LoggerInterface|null $logger = null, - ): self { - $dependencyFactory = new self($logger); - $dependencyFactory->configurationLoader = $configurationLoader; - $dependencyFactory->connectionLoader = $connectionLoader; - - return $dependencyFactory; - } - - public static function fromEntityManager( - ConfigurationLoader $configurationLoader, - EntityManagerLoader $emLoader, - LoggerInterface|null $logger = null, - ): self { - $dependencyFactory = new self($logger); - $dependencyFactory->configurationLoader = $configurationLoader; - $dependencyFactory->emLoader = $emLoader; - - return $dependencyFactory; - } - - private function __construct(LoggerInterface|null $logger) - { - if ($logger === null) { - return; - } - - $this->setDefinition(LoggerInterface::class, static fn (): LoggerInterface => $logger); - } - - public function isFrozen(): bool - { - return $this->frozen; - } - - public function freeze(): void - { - $this->frozen = true; - } - - private function assertNotFrozen(): void - { - if ($this->frozen) { - throw FrozenDependencies::new(); - } - } - - public function hasEntityManager(): bool - { - return $this->emLoader !== null; - } - - public function setConfigurationLoader(ConfigurationLoader $configurationLoader): void - { - $this->assertNotFrozen(); - $this->configurationLoader = $configurationLoader; - } - - public function getConfiguration(): Configuration - { - if ($this->configuration === null) { - $this->configuration = $this->configurationLoader->getConfiguration(); - $this->freeze(); - } - - return $this->configuration; - } - - public function getConnection(): Connection - { - if ($this->connection === null) { - $this->connection = $this->hasEntityManager() - ? $this->getEntityManager()->getConnection() - : $this->connectionLoader->getConnection($this->getConfiguration()->getConnectionName()); - $this->freeze(); - } - - return $this->connection; - } - - public function getEntityManager(): EntityManagerInterface - { - if ($this->em === null) { - if ($this->emLoader === null) { - throw MissingDependency::noEntityManager(); - } - - $this->em = $this->emLoader->getEntityManager($this->getConfiguration()->getEntityManagerName()); - $this->freeze(); - } - - return $this->em; - } - - public function getVersionComparator(): Comparator - { - return $this->getDependency(Comparator::class, static fn (): AlphabeticalComparator => new AlphabeticalComparator()); - } - - public function getLogger(): LoggerInterface - { - return $this->getDependency(LoggerInterface::class, static fn (): LoggerInterface => new NullLogger()); - } - - public function getEventDispatcher(): EventDispatcher - { - return $this->getDependency(EventDispatcher::class, fn (): EventDispatcher => new EventDispatcher( - $this->getConnection(), - $this->getEventManager(), - )); - } - - public function getClassNameGenerator(): ClassNameGenerator - { - return $this->getDependency(ClassNameGenerator::class, static fn (): ClassNameGenerator => new ClassNameGenerator()); - } - - public function getSchemaDumper(): SchemaDumper - { - return $this->getDependency(SchemaDumper::class, function (): SchemaDumper { - $excludedTables = []; - - $metadataConfig = $this->getConfiguration()->getMetadataStorageConfiguration(); - if ($metadataConfig instanceof TableMetadataStorageConfiguration) { - $excludedTables[] = sprintf('/^%s$/', preg_quote($metadataConfig->getTableName(), '/')); - } - - return new SchemaDumper( - $this->getConnection()->getDatabasePlatform(), - $this->getConnection()->createSchemaManager(), - $this->getMigrationGenerator(), - $this->getMigrationSqlGenerator(), - $excludedTables, - ); - }); - } - - private function getEmptySchemaProvider(): SchemaProvider - { - return $this->getDependency(EmptySchemaProvider::class, fn (): SchemaProvider => new EmptySchemaProvider($this->connection->createSchemaManager())); - } - - public function hasSchemaProvider(): bool - { - try { - $this->getSchemaProvider(); - } catch (MissingDependency) { - return false; - } - - return true; - } - - public function getSchemaProvider(): SchemaProvider - { - return $this->getDependency(SchemaProvider::class, function (): SchemaProvider { - if ($this->hasEntityManager()) { - return new OrmSchemaProvider($this->getEntityManager()); - } - - throw MissingDependency::noSchemaProvider(); - }); - } - - public function getDiffGenerator(): DiffGenerator - { - return $this->getDependency(DiffGenerator::class, fn (): DiffGenerator => new DiffGenerator( - $this->getConnection()->getConfiguration(), - $this->getConnection()->createSchemaManager(), - $this->getSchemaProvider(), - $this->getConnection()->getDatabasePlatform(), - $this->getMigrationGenerator(), - $this->getMigrationSqlGenerator(), - $this->getEmptySchemaProvider(), - )); - } - - public function getSchemaDiffProvider(): SchemaDiffProvider - { - return $this->getDependency(SchemaDiffProvider::class, fn (): LazySchemaDiffProvider => new LazySchemaDiffProvider( - new DBALSchemaDiffProvider( - $this->getConnection()->createSchemaManager(), - $this->getConnection()->getDatabasePlatform(), - ), - )); - } - - private function getFileBuilder(): FileBuilder - { - return $this->getDependency(FileBuilder::class, static fn (): FileBuilder => new ConcatenationFileBuilder()); - } - - private function getParameterFormatter(): ParameterFormatter - { - return $this->getDependency(ParameterFormatter::class, fn (): ParameterFormatter => new InlineParameterFormatter($this->getConnection())); - } - - public function getMigrationsFinder(): MigrationFinder - { - return $this->getDependency(MigrationFinder::class, function (): MigrationFinder { - $configs = $this->getConfiguration(); - $needsRecursiveFinder = $configs->areMigrationsOrganizedByYear() || $configs->areMigrationsOrganizedByYearAndMonth(); - - return $needsRecursiveFinder ? new RecursiveRegexFinder() : new GlobFinder(); - }); - } - - public function getMigrationRepository(): MigrationsRepository - { - return $this->getDependency(MigrationsRepository::class, fn (): MigrationsRepository => new FilesystemMigrationsRepository( - $this->getConfiguration()->getMigrationClasses(), - $this->getConfiguration()->getMigrationDirectories(), - $this->getMigrationsFinder(), - $this->getMigrationFactory(), - )); - } - - public function getMigrationFactory(): MigrationFactory - { - return $this->getDependency(MigrationFactory::class, fn (): MigrationFactory => new DbalMigrationFactory($this->getConnection(), $this->getLogger())); - } - - public function setService(string $id, object|callable $service): void - { - $this->assertNotFrozen(); - $this->dependencies[$id] = $service; - } - - public function getMetadataStorage(): MetadataStorage - { - return $this->getDependency(MetadataStorage::class, fn (): MetadataStorage => new TableMetadataStorage( - $this->getConnection(), - $this->getVersionComparator(), - $this->getConfiguration()->getMetadataStorageConfiguration(), - $this->getMigrationRepository(), - )); - } - - private function getVersionExecutor(): Executor - { - return $this->getDependency(Executor::class, fn (): Executor => new DbalExecutor( - $this->getMetadataStorage(), - $this->getEventDispatcher(), - $this->getConnection(), - $this->getSchemaDiffProvider(), - $this->getLogger(), - $this->getParameterFormatter(), - $this->getStopwatch(), - )); - } - - public function getQueryWriter(): QueryWriter - { - return $this->getDependency(QueryWriter::class, fn (): QueryWriter => new FileQueryWriter( - $this->getFileBuilder(), - $this->getLogger(), - )); - } - - public function getVersionAliasResolver(): AliasResolver - { - return $this->getDependency(AliasResolver::class, fn (): AliasResolver => new DefaultAliasResolver( - $this->getMigrationPlanCalculator(), - $this->getMetadataStorage(), - $this->getMigrationStatusCalculator(), - )); - } - - public function getMigrationStatusCalculator(): MigrationStatusCalculator - { - return $this->getDependency(MigrationStatusCalculator::class, fn (): MigrationStatusCalculator => new CurrentMigrationStatusCalculator( - $this->getMigrationPlanCalculator(), - $this->getMetadataStorage(), - )); - } - - public function getMigrationPlanCalculator(): MigrationPlanCalculator - { - return $this->getDependency(MigrationPlanCalculator::class, fn (): MigrationPlanCalculator => new SortedMigrationPlanCalculator( - $this->getMigrationRepository(), - $this->getMetadataStorage(), - $this->getVersionComparator(), - )); - } - - public function getMigrationGenerator(): Generator - { - return $this->getDependency(Generator::class, fn (): Generator => new Generator($this->getConfiguration())); - } - - public function getMigrationSqlGenerator(): SqlGenerator - { - return $this->getDependency(SqlGenerator::class, fn (): SqlGenerator => new SqlGenerator( - $this->getConfiguration(), - $this->getConnection()->getDatabasePlatform(), - )); - } - - public function getConsoleInputMigratorConfigurationFactory(): MigratorConfigurationFactory - { - return $this->getDependency(MigratorConfigurationFactory::class, fn (): MigratorConfigurationFactory => new ConsoleInputMigratorConfigurationFactory( - $this->getConfiguration(), - )); - } - - public function getMigrationStatusInfosHelper(): MigrationStatusInfosHelper - { - return $this->getDependency(MigrationStatusInfosHelper::class, fn (): MigrationStatusInfosHelper => new MigrationStatusInfosHelper( - $this->getConfiguration(), - $this->getConnection(), - $this->getVersionAliasResolver(), - $this->getMigrationPlanCalculator(), - $this->getMigrationStatusCalculator(), - $this->getMetadataStorage(), - )); - } - - public function getMigrator(): Migrator - { - return $this->getDependency(Migrator::class, fn (): Migrator => new DbalMigrator( - $this->getConnection(), - $this->getEventDispatcher(), - $this->getVersionExecutor(), - $this->getLogger(), - $this->getStopwatch(), - )); - } - - public function getStopwatch(): Stopwatch - { - return $this->getDependency(Stopwatch::class, static fn (): Stopwatch => new Stopwatch(true)); - } - - public function getRollup(): Rollup - { - return $this->getDependency(Rollup::class, fn (): Rollup => new Rollup( - $this->getMetadataStorage(), - $this->getMigrationRepository(), - )); - } - - private function getDependency(string $id, callable $callback): mixed - { - if (! isset($this->inResolution[$id]) && array_key_exists($id, $this->factories) && ! array_key_exists($id, $this->dependencies)) { - $this->inResolution[$id] = true; - $this->dependencies[$id] = call_user_func($this->factories[$id], $this); - unset($this->inResolution); - } - - if (! array_key_exists($id, $this->dependencies)) { - $this->dependencies[$id] = $callback(); - } - - return $this->dependencies[$id]; - } - - public function setDefinition(string $id, callable $service): void - { - $this->assertNotFrozen(); - $this->factories[$id] = $service; - } - - private function getEventManager(): EventManager - { - if ($this->eventManager !== null) { - return $this->eventManager; - } - - if ($this->hasEntityManager()) { - return $this->eventManager = $this->getEntityManager()->getEventManager(); - } - - if (method_exists(Connection::class, 'getEventManager')) { - // DBAL < 4 - return $this->eventManager = $this->getConnection()->getEventManager(); - } - - return $this->eventManager = new EventManager(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Event/Listeners/AutoCommitListener.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Event/Listeners/AutoCommitListener.php deleted file mode 100644 index a760acf3f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Event/Listeners/AutoCommitListener.php +++ /dev/null @@ -1,37 +0,0 @@ -getConnection(); - $conf = $args->getMigratorConfiguration(); - - if ($conf->isDryRun() || $conn->isAutoCommit()) { - return; - } - - TransactionHelper::commitIfInTransaction($conn); - } - - /** {@inheritDoc} */ - public function getSubscribedEvents() - { - return [Events::onMigrationsMigrated]; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Event/MigrationsEventArgs.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Event/MigrationsEventArgs.php deleted file mode 100644 index 9ef8deecd..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Event/MigrationsEventArgs.php +++ /dev/null @@ -1,38 +0,0 @@ -connection; - } - - public function getPlan(): MigrationPlanList - { - return $this->plan; - } - - public function getMigratorConfiguration(): MigratorConfiguration - { - return $this->migratorConfiguration; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Event/MigrationsVersionEventArgs.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Event/MigrationsVersionEventArgs.php deleted file mode 100644 index f309240ba..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Event/MigrationsVersionEventArgs.php +++ /dev/null @@ -1,38 +0,0 @@ -connection; - } - - public function getPlan(): MigrationPlan - { - return $this->plan; - } - - public function getMigratorConfiguration(): MigratorConfiguration - { - return $this->migratorConfiguration; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/EventDispatcher.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/EventDispatcher.php deleted file mode 100644 index a71e0c7ff..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/EventDispatcher.php +++ /dev/null @@ -1,73 +0,0 @@ -createMigrationEventArgs($migrationsPlan, $migratorConfiguration); - - $this->dispatchEvent($eventName, $event); - } - - public function dispatchVersionEvent( - string $eventName, - MigrationPlan $plan, - MigratorConfiguration $migratorConfiguration, - ): void { - $event = $this->createMigrationsVersionEventArgs( - $plan, - $migratorConfiguration, - ); - - $this->dispatchEvent($eventName, $event); - } - - private function dispatchEvent(string $eventName, EventArgs|null $args = null): void - { - $this->eventManager->dispatchEvent($eventName, $args); - } - - private function createMigrationEventArgs( - MigrationPlanList $migrationsPlan, - MigratorConfiguration $migratorConfiguration, - ): MigrationsEventArgs { - return new MigrationsEventArgs($this->connection, $migrationsPlan, $migratorConfiguration); - } - - private function createMigrationsVersionEventArgs( - MigrationPlan $plan, - MigratorConfiguration $migratorConfiguration, - ): MigrationsVersionEventArgs { - return new MigrationsVersionEventArgs( - $this->connection, - $plan, - $migratorConfiguration, - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Events.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Events.php deleted file mode 100644 index 0d2feb9fc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Events.php +++ /dev/null @@ -1,17 +0,0 @@ - $queriesByVersion */ - public function write( - string $path, - string $direction, - array $queriesByVersion, - DateTimeInterface|null $now = null, - ): bool { - $now ??= new DateTimeImmutable(); - - $string = $this->migrationFileBuilder - ->buildMigrationFile($queriesByVersion, $direction, $now); - - $path = $this->buildMigrationFilePath($path, $now); - - $this->logger->info('Writing migration file to "{path}"', ['path' => $path]); - - return file_put_contents($path, $string) !== false; - } - - private function buildMigrationFilePath(string $path, DateTimeInterface $now): string - { - if (is_dir($path)) { - $path = realpath($path); - $path .= '/doctrine_migration_' . $now->format('YmdHis') . '.sql'; - } - - return $path; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/FilesystemMigrationsRepository.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/FilesystemMigrationsRepository.php deleted file mode 100644 index 1d148fe86..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/FilesystemMigrationsRepository.php +++ /dev/null @@ -1,139 +0,0 @@ - $migrationDirectories - */ - public function __construct( - array $classes, - private readonly array $migrationDirectories, - private readonly MigrationFinder $migrationFinder, - private readonly MigrationFactory $versionFactory, - ) { - $this->registerMigrations($classes); - } - - private function registerMigrationInstance(Version $version, AbstractMigration $migration): AvailableMigration - { - if (isset($this->migrations[(string) $version])) { - throw DuplicateMigrationVersion::new( - (string) $version, - (string) $version, - ); - } - - $this->migrations[(string) $version] = new AvailableMigration($version, $migration); - - return $this->migrations[(string) $version]; - } - - /** @throws MigrationException */ - public function registerMigration(string $migrationClassName): AvailableMigration - { - $this->ensureMigrationClassExists($migrationClassName); - - $version = new Version($migrationClassName); - $migration = $this->versionFactory->createVersion($migrationClassName); - - return $this->registerMigrationInstance($version, $migration); - } - - /** - * @param string[] $migrations - * - * @return AvailableMigration[] - */ - private function registerMigrations(array $migrations): array - { - $versions = []; - - foreach ($migrations as $class) { - $versions[] = $this->registerMigration($class); - } - - return $versions; - } - - public function hasMigration(string $version): bool - { - $this->loadMigrationsFromDirectories(); - - return isset($this->migrations[$version]); - } - - public function getMigration(Version $version): AvailableMigration - { - $this->loadMigrationsFromDirectories(); - - if (! isset($this->migrations[(string) $version])) { - throw MigrationClassNotFound::new((string) $version); - } - - return $this->migrations[(string) $version]; - } - - /** - * Returns a non-sorted set of migrations. - */ - public function getMigrations(): AvailableMigrationsSet - { - $this->loadMigrationsFromDirectories(); - - return new AvailableMigrationsSet($this->migrations); - } - - /** @throws MigrationException */ - private function ensureMigrationClassExists(string $class): void - { - if (! class_exists($class)) { - throw MigrationClassNotFound::new($class); - } - } - - private function loadMigrationsFromDirectories(): void - { - $migrationDirectories = $this->migrationDirectories; - - if ($this->migrationsLoaded) { - return; - } - - $this->migrationsLoaded = true; - - foreach ($migrationDirectories as $namespace => $path) { - $migrations = $this->migrationFinder->findMigrations( - $path, - $namespace, - ); - $this->registerMigrations($migrations); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Finder/Exception/FinderException.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Finder/Exception/FinderException.php deleted file mode 100644 index 15da80513..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Finder/Exception/FinderException.php +++ /dev/null @@ -1,9 +0,0 @@ -loadMigrationClasses($includedFiles, $namespace); - $versions = []; - foreach ($classes as $class) { - $versions[] = $class->getName(); - } - - return $versions; - } - - /** - * Look up all declared classes and find those classes contained - * in the given `$files` array. - * - * @param string[] $files The set of files that were `required` - * @param string|null $namespace If not null only classes in this namespace will be returned - * - * @return ReflectionClass[] the classes in `$files` - */ - protected function loadMigrationClasses(array $files, string|null $namespace = null): array - { - $classes = []; - foreach (get_declared_classes() as $class) { - $reflectionClass = new ReflectionClass($class); - - if (! in_array($reflectionClass->getFileName(), $files, true)) { - continue; - } - - if ($namespace !== null && ! $this->isReflectionClassInNamespace($reflectionClass, $namespace)) { - continue; - } - - $classes[] = $reflectionClass; - } - - return $classes; - } - - /** @param ReflectionClass $reflectionClass */ - private function isReflectionClassInNamespace(ReflectionClass $reflectionClass, string $namespace): bool - { - return strncmp($reflectionClass->getName(), $namespace . '\\', strlen($namespace) + 1) === 0; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Finder/GlobFinder.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Finder/GlobFinder.php deleted file mode 100644 index ba9780d70..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Finder/GlobFinder.php +++ /dev/null @@ -1,29 +0,0 @@ -getRealPath($directory); - - $files = glob(rtrim($dir, '/') . '/Version*.php'); - if ($files === false) { - $files = []; - } - - return $this->loadMigrations($files, $namespace); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Finder/MigrationFinder.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Finder/MigrationFinder.php deleted file mode 100644 index 0d13b39c7..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Finder/MigrationFinder.php +++ /dev/null @@ -1,19 +0,0 @@ -pattern = $pattern ?? sprintf( - '#^.+\\%s[^\\%s]+\\.php$#i', - DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR, - ); - } - - /** @return string[] */ - public function findMigrations(string $directory, string|null $namespace = null): array - { - $dir = $this->getRealPath($directory); - - return $this->loadMigrations( - $this->getMatches($this->createIterator($dir)), - $namespace, - ); - } - - private function createIterator(string $dir): RegexIterator - { - return new RegexIterator( - new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS | FilesystemIterator::FOLLOW_SYMLINKS), - RecursiveIteratorIterator::LEAVES_ONLY, - ), - $this->getPattern(), - RegexIterator::GET_MATCH, - ); - } - - private function getPattern(): string - { - return $this->pattern; - } - - /** @return string[] */ - private function getMatches(RegexIterator $iteratorFilesMatch): array - { - $files = []; - foreach ($iteratorFilesMatch as $file) { - $files[] = $file[0]; - } - - return $files; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/ClassNameGenerator.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/ClassNameGenerator.php deleted file mode 100644 index 22b6f0d45..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/ClassNameGenerator.php +++ /dev/null @@ -1,25 +0,0 @@ -generateVersionNumber(); - } - - private function generateVersionNumber(): string - { - $now = new DateTimeImmutable('now', new DateTimeZone('UTC')); - - return $now->format(self::VERSION_FORMAT); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/ConcatenationFileBuilder.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/ConcatenationFileBuilder.php deleted file mode 100644 index 10ebc1970..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/ConcatenationFileBuilder.php +++ /dev/null @@ -1,39 +0,0 @@ - $queriesByVersion */ - public function buildMigrationFile( - array $queriesByVersion, - string $direction, - DateTimeInterface|null $now = null, - ): string { - $now ??= new DateTimeImmutable(); - $string = sprintf("-- Doctrine Migration File Generated on %s\n", $now->format('Y-m-d H:i:s')); - - foreach ($queriesByVersion as $version => $queries) { - $string .= "\n-- Version " . $version . "\n"; - - foreach ($queries as $query) { - $string .= $query->getStatement() . ";\n"; - } - } - - return $string; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/DiffGenerator.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/DiffGenerator.php deleted file mode 100644 index 19b6f3da8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/DiffGenerator.php +++ /dev/null @@ -1,140 +0,0 @@ - $schemaManager */ - public function __construct( - private readonly DBALConfiguration $dbalConfiguration, - private readonly AbstractSchemaManager $schemaManager, - private readonly SchemaProvider $schemaProvider, - private readonly AbstractPlatform $platform, - private readonly Generator $migrationGenerator, - private readonly SqlGenerator $migrationSqlGenerator, - private readonly SchemaProvider $emptySchemaProvider, - ) { - } - - /** @throws NoChangesDetected */ - public function generate( - string $fqcn, - string|null $filterExpression, - bool $formatted = false, - int $lineLength = 120, - bool $checkDbPlatform = true, - bool $fromEmptySchema = false, - ): string { - if ($filterExpression !== null) { - $this->dbalConfiguration->setSchemaAssetsFilter( - static function ($assetName) use ($filterExpression) { - if ($assetName instanceof AbstractAsset) { - $assetName = $assetName->getName(); - } - - return preg_match($filterExpression, $assetName); - }, - ); - } - - $fromSchema = $fromEmptySchema - ? $this->createEmptySchema() - : $this->createFromSchema(); - - $toSchema = $this->createToSchema(); - - $comparator = $this->schemaManager->createComparator(); - - $upSql = $this->platform->getAlterSchemaSQL($comparator->compareSchemas($fromSchema, $toSchema)); - - $up = $this->migrationSqlGenerator->generate( - $upSql, - $formatted, - $lineLength, - $checkDbPlatform, - ); - - $downSql = $this->platform->getAlterSchemaSQL($comparator->compareSchemas($toSchema, $fromSchema)); - - $down = $this->migrationSqlGenerator->generate( - $downSql, - $formatted, - $lineLength, - $checkDbPlatform, - ); - - if ($up === '' && $down === '') { - throw NoChangesDetected::new(); - } - - return $this->migrationGenerator->generateMigration( - $fqcn, - $up, - $down, - ); - } - - private function createEmptySchema(): Schema - { - return $this->emptySchemaProvider->createSchema(); - } - - private function createFromSchema(): Schema - { - return $this->schemaManager->introspectSchema(); - } - - private function createToSchema(): Schema - { - $toSchema = $this->schemaProvider->createSchema(); - - $schemaAssetsFilter = $this->dbalConfiguration->getSchemaAssetsFilter(); - - if ($schemaAssetsFilter !== null) { - foreach ($toSchema->getTables() as $table) { - $tableName = $table->getName(); - - if ($schemaAssetsFilter($this->resolveTableName($tableName))) { - continue; - } - - $toSchema->dropTable($tableName); - } - } - - return $toSchema; - } - - /** - * Resolve a table name from its fully qualified name. The `$name` argument - * comes from Doctrine\DBAL\Schema\Table#getName which can sometimes return - * a namespaced name with the form `{namespace}.{tableName}`. This extracts - * the table name from that. - */ - private function resolveTableName(string $name): string - { - $pos = strpos($name, '.'); - - return $pos === false ? $name : substr($name, $pos + 1); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/Exception/GeneratorException.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/Exception/GeneratorException.php deleted file mode 100644 index 5e90fbc8e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/Exception/GeneratorException.php +++ /dev/null @@ -1,11 +0,0 @@ - $queriesByVersion */ - public function buildMigrationFile(array $queriesByVersion, string $direction, DateTimeInterface|null $now = null): string; -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/Generator.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/Generator.php deleted file mode 100644 index fdd19854b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/Generator.php +++ /dev/null @@ -1,157 +0,0 @@ -; - -use Doctrine\DBAL\Schema\Schema; -use Doctrine\Migrations\AbstractMigration; - -/** - * Auto-generated Migration: Please modify to your needs! - */ -final class extends AbstractMigration -{ - public function getDescription(): string - { - return ''; - } - - public function up(Schema $schema): void - { - // this up() migration is auto-generated, please modify it to your needs - - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - - } -} - -TEMPLATE; - - private string|null $template = null; - - public function __construct(private readonly Configuration $configuration) - { - } - - public function generateMigration( - string $fqcn, - string|null $up = null, - string|null $down = null, - ): string { - $mch = []; - if (preg_match('~(.*)\\\\([^\\\\]+)~', $fqcn, $mch) === 0) { - throw new InvalidArgumentException(sprintf('Invalid FQCN')); - } - - [$fqcn, $namespace, $className] = $mch; - - $dirs = $this->configuration->getMigrationDirectories(); - if (! isset($dirs[$namespace])) { - throw new InvalidArgumentException(sprintf('Path not defined for the namespace "%s"', $namespace)); - } - - $dir = $dirs[$namespace]; - - $replacements = [ - '' => $namespace, - '' => $className, - '' => $up !== null ? ' ' . implode("\n ", explode("\n", $up)) : null, - '' => $down !== null ? ' ' . implode("\n ", explode("\n", $down)) : null, - '' => $this->configuration->isTransactional() ? '' : <<<'METHOD' - - - public function isTransactional(): bool - { - return false; - } -METHOD - , - ]; - - $code = strtr($this->getTemplate(), $replacements); - $code = preg_replace('/^ +$/m', '', $code); - - $directoryHelper = new MigrationDirectoryHelper(); - $dir = $directoryHelper->getMigrationDirectory($this->configuration, $dir); - $path = $dir . '/' . $className . '.php'; - - file_put_contents($path, $code); - - return $path; - } - - private function getTemplate(): string - { - if ($this->template === null) { - $this->template = $this->loadCustomTemplate(); - - if ($this->template === null) { - $this->template = self::MIGRATION_TEMPLATE; - } - } - - return $this->template; - } - - /** @throws InvalidTemplateSpecified */ - private function loadCustomTemplate(): string|null - { - $customTemplate = $this->configuration->getCustomTemplate(); - - if ($customTemplate === null) { - return null; - } - - if (! is_file($customTemplate) || ! is_readable($customTemplate)) { - throw InvalidTemplateSpecified::notFoundOrNotReadable($customTemplate); - } - - $content = file_get_contents($customTemplate); - - if ($content === false) { - throw InvalidTemplateSpecified::notReadable($customTemplate); - } - - if (trim($content) === '') { - throw InvalidTemplateSpecified::empty($customTemplate); - } - - return $content; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/SqlGenerator.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/SqlGenerator.php deleted file mode 100644 index 1501e3a6e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Generator/SqlGenerator.php +++ /dev/null @@ -1,87 +0,0 @@ -configuration->getMetadataStorageConfiguration(); - foreach ($sql as $query) { - if ( - $storageConfiguration instanceof TableMetadataStorageConfiguration - && stripos($query, $storageConfiguration->getTableName()) !== false - ) { - continue; - } - - if ($formatted) { - $maxLength = $lineLength - 18 - 8; // max - php code length - indentation - - if (strlen($query) > $maxLength) { - $query = (new SqlFormatter(new NullHighlighter()))->format($query); - } - } - - $code[] = sprintf('$this->addSql(%s);', var_export($query, true)); - } - - if (count($code) !== 0 && $checkDbPlatform && $this->configuration->isDatabasePlatformChecked()) { - $currentPlatform = '\\' . get_class($this->platform); - - array_unshift( - $code, - sprintf( - <<<'PHP' -$this->abortIf( - !$this->connection->getDatabasePlatform() instanceof %s, - "Migration can only be executed safely on '%s'." -); -PHP - , - $currentPlatform, - $currentPlatform, - ), - '', - ); - } - - return implode("\n", $code); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/InlineParameterFormatter.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/InlineParameterFormatter.php deleted file mode 100644 index 34c30e2d6..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/InlineParameterFormatter.php +++ /dev/null @@ -1,83 +0,0 @@ - $value) { - $type = $types[$key] ?? 'string'; - - $formattedParameter = '[' . $this->formatParameter($value, $type) . ']'; - - $formattedParameters[] = is_string($key) - ? sprintf(':%s => %s', $key, $formattedParameter) - : $formattedParameter; - } - - return sprintf('with parameters (%s)', implode(', ', $formattedParameters)); - } - - private function formatParameter(mixed $value, string|int $type): string|int|float|null - { - if (is_string($type) && Type::hasType($type)) { - return Type::getType($type)->convertToDatabaseValue( - $value, - $this->connection->getDatabasePlatform(), - ); - } - - return $this->parameterToString($value); - } - - /** @param int[]|bool[]|string[]|float[]|array|int|string|float|bool $value */ - private function parameterToString(array|int|string|float|bool $value): string - { - if (is_array($value)) { - return implode(', ', array_map($this->parameterToString(...), $value)); - } - - if (is_int($value) || is_string($value) || is_float($value)) { - return (string) $value; - } - - if (is_bool($value)) { - return $value === true ? 'true' : 'false'; - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/AvailableMigration.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/AvailableMigration.php deleted file mode 100644 index 6e1dffa34..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/AvailableMigration.php +++ /dev/null @@ -1,31 +0,0 @@ -version; - } - - public function getMigration(): AbstractMigration - { - return $this->migration; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/AvailableMigrationsList.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/AvailableMigrationsList.php deleted file mode 100644 index 94e56258b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/AvailableMigrationsList.php +++ /dev/null @@ -1,86 +0,0 @@ -items = array_values($items); - } - - /** @return AvailableMigration[] */ - public function getItems(): array - { - return $this->items; - } - - public function getFirst(int $offset = 0): AvailableMigration - { - if (! isset($this->items[$offset])) { - throw NoMigrationsFoundWithCriteria::new('first' . ($offset > 0 ? '+' . $offset : '')); - } - - return $this->items[$offset]; - } - - public function getLast(int $offset = 0): AvailableMigration - { - $offset = count($this->items) - 1 - (-1 * $offset); - if (! isset($this->items[$offset])) { - throw NoMigrationsFoundWithCriteria::new('last' . ($offset > 0 ? '+' . $offset : '')); - } - - return $this->items[$offset]; - } - - public function count(): int - { - return count($this->items); - } - - public function hasMigration(Version $version): bool - { - foreach ($this->items as $migration) { - if ($migration->getVersion()->equals($version)) { - return true; - } - } - - return false; - } - - public function getMigration(Version $version): AvailableMigration - { - foreach ($this->items as $migration) { - if ($migration->getVersion()->equals($version)) { - return $migration; - } - } - - throw MigrationNotAvailable::forVersion($version); - } - - public function newSubset(ExecutedMigrationsList $executedMigrations): self - { - return new self(array_filter($this->getItems(), static fn (AvailableMigration $migration): bool => ! $executedMigrations->hasMigration($migration->getVersion()))); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/AvailableMigrationsSet.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/AvailableMigrationsSet.php deleted file mode 100644 index a166e1ecb..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/AvailableMigrationsSet.php +++ /dev/null @@ -1,60 +0,0 @@ -items = array_values($items); - } - - /** @return AvailableMigration[] */ - public function getItems(): array - { - return $this->items; - } - - public function count(): int - { - return count($this->items); - } - - public function hasMigration(Version $version): bool - { - foreach ($this->items as $migration) { - if ($migration->getVersion()->equals($version)) { - return true; - } - } - - return false; - } - - public function getMigration(Version $version): AvailableMigration - { - foreach ($this->items as $migration) { - if ($migration->getVersion()->equals($version)) { - return $migration; - } - } - - throw MigrationNotAvailable::forVersion($version); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/ExecutedMigration.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/ExecutedMigration.php deleted file mode 100644 index 418a1b446..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/ExecutedMigration.php +++ /dev/null @@ -1,37 +0,0 @@ -executionTime; - } - - public function getExecutedAt(): DateTimeImmutable|null - { - return $this->executedAt; - } - - public function getVersion(): Version - { - return $this->version; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/ExecutedMigrationsList.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/ExecutedMigrationsList.php deleted file mode 100644 index bfc32c633..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/ExecutedMigrationsList.php +++ /dev/null @@ -1,87 +0,0 @@ -items = array_values($items); - } - - /** @return ExecutedMigration[] */ - public function getItems(): array - { - return $this->items; - } - - public function getFirst(int $offset = 0): ExecutedMigration - { - if (! isset($this->items[$offset])) { - throw NoMigrationsFoundWithCriteria::new('first' . ($offset > 0 ? '+' . $offset : '')); - } - - return $this->items[$offset]; - } - - public function getLast(int $offset = 0): ExecutedMigration - { - $offset = count($this->items) - 1 - (-1 * $offset); - if (! isset($this->items[$offset])) { - throw NoMigrationsFoundWithCriteria::new('last' . ($offset > 0 ? '+' . $offset : '')); - } - - return $this->items[$offset]; - } - - public function count(): int - { - return count($this->items); - } - - public function hasMigration(Version $version): bool - { - foreach ($this->items as $migration) { - if ($migration->getVersion()->equals($version)) { - return true; - } - } - - return false; - } - - public function getMigration(Version $version): ExecutedMigration - { - foreach ($this->items as $migration) { - if ($migration->getVersion()->equals($version)) { - return $migration; - } - } - - throw MigrationNotExecuted::new((string) $version); - } - - public function unavailableSubset(AvailableMigrationsList $availableMigrations): self - { - return new self(array_filter($this->getItems(), static fn (ExecutedMigration $migration): bool => ! $availableMigrations->hasMigration($migration->getVersion()))); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/MigrationPlan.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/MigrationPlan.php deleted file mode 100644 index 75eb31e86..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/MigrationPlan.php +++ /dev/null @@ -1,54 +0,0 @@ -version; - } - - public function getResult(): ExecutionResult|null - { - return $this->result; - } - - public function markAsExecuted(ExecutionResult $result): void - { - if ($this->result !== null) { - throw PlanAlreadyExecuted::new(); - } - - $this->result = $result; - } - - public function getMigration(): AbstractMigration - { - return $this->migration; - } - - public function getDirection(): string - { - return $this->direction; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/MigrationPlanList.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/MigrationPlanList.php deleted file mode 100644 index e515eb1ef..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/MigrationPlanList.php +++ /dev/null @@ -1,59 +0,0 @@ -items); - } - - /** @return MigrationPlan[] */ - public function getItems(): array - { - return $this->items; - } - - public function getDirection(): string - { - return $this->direction; - } - - public function getFirst(): MigrationPlan - { - if (count($this->items) === 0) { - throw NoMigrationsFoundWithCriteria::new('first'); - } - - return reset($this->items); - } - - public function getLast(): MigrationPlan - { - if (count($this->items) === 0) { - throw NoMigrationsFoundWithCriteria::new('last'); - } - - return end($this->items); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/Storage/MetadataStorage.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/Storage/MetadataStorage.php deleted file mode 100644 index 79b18211f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/Storage/MetadataStorage.php +++ /dev/null @@ -1,21 +0,0 @@ - getSql(ExecutionResult $result); */ -interface MetadataStorage -{ - public function ensureInitialized(): void; - - public function getExecutedMigrations(): ExecutedMigrationsList; - - public function complete(ExecutionResult $result): void; - - public function reset(): void; -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/Storage/MetadataStorageConfiguration.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/Storage/MetadataStorageConfiguration.php deleted file mode 100644 index ffbf5e0fe..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/Storage/MetadataStorageConfiguration.php +++ /dev/null @@ -1,9 +0,0 @@ - */ - private readonly AbstractSchemaManager $schemaManager; - - private readonly AbstractPlatform $platform; - private readonly TableMetadataStorageConfiguration $configuration; - - public function __construct( - private readonly Connection $connection, - private readonly MigrationsComparator $comparator, - MetadataStorageConfiguration|null $configuration = null, - private readonly MigrationsRepository|null $migrationRepository = null, - ) { - $this->schemaManager = $connection->createSchemaManager(); - $this->platform = $connection->getDatabasePlatform(); - - if ($configuration !== null && ! ($configuration instanceof TableMetadataStorageConfiguration)) { - throw new InvalidArgumentException(sprintf( - '%s accepts only %s as configuration', - self::class, - TableMetadataStorageConfiguration::class, - )); - } - - $this->configuration = $configuration ?? new TableMetadataStorageConfiguration(); - } - - public function getExecutedMigrations(): ExecutedMigrationsList - { - if (! $this->isInitialized()) { - return new ExecutedMigrationsList([]); - } - - $this->checkInitialization(); - $rows = $this->connection->fetchAllAssociative(sprintf('SELECT * FROM %s', $this->configuration->getTableName())); - - $migrations = []; - foreach ($rows as $row) { - $row = array_change_key_case($row, CASE_LOWER); - - $version = new Version($row[strtolower($this->configuration->getVersionColumnName())]); - - $executedAt = $row[strtolower($this->configuration->getExecutedAtColumnName())] ?? ''; - $executedAt = $executedAt !== '' - ? DateTimeImmutable::createFromFormat($this->platform->getDateTimeFormatString(), $executedAt) - : null; - - $executionTime = isset($row[strtolower($this->configuration->getExecutionTimeColumnName())]) - ? floatval($row[strtolower($this->configuration->getExecutionTimeColumnName())] / 1000) - : null; - - $migration = new ExecutedMigration( - $version, - $executedAt instanceof DateTimeImmutable ? $executedAt : null, - $executionTime, - ); - - $migrations[(string) $version] = $migration; - } - - uasort($migrations, fn (ExecutedMigration $a, ExecutedMigration $b): int => $this->comparator->compare($a->getVersion(), $b->getVersion())); - - return new ExecutedMigrationsList($migrations); - } - - public function reset(): void - { - $this->checkInitialization(); - - $this->connection->executeStatement( - sprintf( - 'DELETE FROM %s WHERE 1 = 1', - $this->platform->quoteIdentifier($this->configuration->getTableName()), - ), - ); - } - - public function complete(ExecutionResult $result): void - { - $this->checkInitialization(); - - if ($result->getDirection() === Direction::DOWN) { - $this->connection->delete($this->configuration->getTableName(), [ - $this->configuration->getVersionColumnName() => (string) $result->getVersion(), - ]); - } else { - $this->connection->insert($this->configuration->getTableName(), [ - $this->configuration->getVersionColumnName() => (string) $result->getVersion(), - $this->configuration->getExecutedAtColumnName() => $result->getExecutedAt(), - $this->configuration->getExecutionTimeColumnName() => $result->getTime() === null ? null : (int) round($result->getTime() * 1000), - ], [ - Types::STRING, - Types::DATETIME_IMMUTABLE, - Types::INTEGER, - ]); - } - } - - /** @return iterable */ - public function getSql(ExecutionResult $result): iterable - { - yield new Query('-- Version ' . (string) $result->getVersion() . ' update table metadata'); - - if ($result->getDirection() === Direction::DOWN) { - yield new Query(sprintf( - 'DELETE FROM %s WHERE %s = %s', - $this->configuration->getTableName(), - $this->configuration->getVersionColumnName(), - $this->connection->quote((string) $result->getVersion()), - )); - - return; - } - - yield new Query(sprintf( - 'INSERT INTO %s (%s, %s, %s) VALUES (%s, %s, 0)', - $this->configuration->getTableName(), - $this->configuration->getVersionColumnName(), - $this->configuration->getExecutedAtColumnName(), - $this->configuration->getExecutionTimeColumnName(), - $this->connection->quote((string) $result->getVersion()), - $this->connection->quote(($result->getExecutedAt() ?? new DateTimeImmutable())->format('Y-m-d H:i:s')), - )); - } - - public function ensureInitialized(): void - { - if (! $this->isInitialized()) { - $expectedSchemaChangelog = $this->getExpectedTable(); - $this->schemaManager->createTable($expectedSchemaChangelog); - $this->schemaUpToDate = true; - $this->isInitialized = true; - - return; - } - - $this->isInitialized = true; - $expectedSchemaChangelog = $this->getExpectedTable(); - $diff = $this->needsUpdate($expectedSchemaChangelog); - if ($diff === null) { - $this->schemaUpToDate = true; - - return; - } - - $this->schemaUpToDate = true; - $this->schemaManager->alterTable($diff); - $this->updateMigratedVersionsFromV1orV2toV3(); - } - - private function needsUpdate(Table $expectedTable): TableDiff|null - { - if ($this->schemaUpToDate) { - return null; - } - - $currentTable = $this->schemaManager->introspectTable($this->configuration->getTableName()); - $diff = $this->schemaManager->createComparator()->compareTables($currentTable, $expectedTable); - - return $diff->isEmpty() ? null : $diff; - } - - private function isInitialized(): bool - { - if ($this->isInitialized) { - return $this->isInitialized; - } - - if ($this->connection instanceof PrimaryReadReplicaConnection) { - $this->connection->ensureConnectedToPrimary(); - } - - return $this->schemaManager->tablesExist([$this->configuration->getTableName()]); - } - - private function checkInitialization(): void - { - if (! $this->isInitialized()) { - throw MetadataStorageError::notInitialized(); - } - - $expectedTable = $this->getExpectedTable(); - - if ($this->needsUpdate($expectedTable) !== null) { - throw MetadataStorageError::notUpToDate(); - } - } - - private function getExpectedTable(): Table - { - $schemaChangelog = new Table($this->configuration->getTableName()); - - $schemaChangelog->addColumn( - $this->configuration->getVersionColumnName(), - 'string', - ['notnull' => true, 'length' => $this->configuration->getVersionColumnLength()], - ); - $schemaChangelog->addColumn($this->configuration->getExecutedAtColumnName(), 'datetime', ['notnull' => false]); - $schemaChangelog->addColumn($this->configuration->getExecutionTimeColumnName(), 'integer', ['notnull' => false]); - - $schemaChangelog->setPrimaryKey([$this->configuration->getVersionColumnName()]); - - return $schemaChangelog; - } - - private function updateMigratedVersionsFromV1orV2toV3(): void - { - if ($this->migrationRepository === null) { - return; - } - - $availableMigrations = $this->migrationRepository->getMigrations()->getItems(); - $executedMigrations = $this->getExecutedMigrations()->getItems(); - - foreach ($availableMigrations as $availableMigration) { - foreach ($executedMigrations as $k => $executedMigration) { - if ($this->isAlreadyV3Format($availableMigration, $executedMigration)) { - continue; - } - - $this->connection->update( - $this->configuration->getTableName(), - [ - $this->configuration->getVersionColumnName() => (string) $availableMigration->getVersion(), - ], - [ - $this->configuration->getVersionColumnName() => (string) $executedMigration->getVersion(), - ], - ); - unset($executedMigrations[$k]); - } - } - } - - private function isAlreadyV3Format(AvailableMigration $availableMigration, ExecutedMigration $executedMigration): bool - { - return strpos( - (string) $availableMigration->getVersion(), - (string) $executedMigration->getVersion(), - ) !== strlen((string) $availableMigration->getVersion()) - - strlen((string) $executedMigration->getVersion()); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/Storage/TableMetadataStorageConfiguration.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/Storage/TableMetadataStorageConfiguration.php deleted file mode 100644 index 44eb5cd98..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Metadata/Storage/TableMetadataStorageConfiguration.php +++ /dev/null @@ -1,68 +0,0 @@ -tableName; - } - - public function setTableName(string $tableName): void - { - $this->tableName = $tableName; - } - - public function getVersionColumnName(): string - { - return $this->versionColumnName; - } - - public function setVersionColumnName(string $versionColumnName): void - { - $this->versionColumnName = $versionColumnName; - } - - public function getVersionColumnLength(): int - { - return $this->versionColumnLength; - } - - public function setVersionColumnLength(int $versionColumnLength): void - { - $this->versionColumnLength = $versionColumnLength; - } - - public function getExecutedAtColumnName(): string - { - return $this->executedAtColumnName; - } - - public function setExecutedAtColumnName(string $executedAtColumnName): void - { - $this->executedAtColumnName = $executedAtColumnName; - } - - public function getExecutionTimeColumnName(): string - { - return $this->executionTimeColumnName; - } - - public function setExecutionTimeColumnName(string $executionTimeColumnName): void - { - $this->executionTimeColumnName = $executionTimeColumnName; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/MigrationsRepository.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/MigrationsRepository.php deleted file mode 100644 index 56663ae44..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/MigrationsRepository.php +++ /dev/null @@ -1,18 +0,0 @@ - A list of SQL statements executed, grouped by migration version */ - public function migrate(MigrationPlanList $migrationsPlan, MigratorConfiguration $migratorConfiguration): array; -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/MigratorConfiguration.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/MigratorConfiguration.php deleted file mode 100644 index 01e7ee154..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/MigratorConfiguration.php +++ /dev/null @@ -1,88 +0,0 @@ -dryRun; - } - - public function setDryRun(bool $dryRun): self - { - $this->dryRun = $dryRun; - - return $this; - } - - public function getTimeAllQueries(): bool - { - return $this->timeAllQueries; - } - - public function setTimeAllQueries(bool $timeAllQueries): self - { - $this->timeAllQueries = $timeAllQueries; - - return $this; - } - - public function getNoMigrationException(): bool - { - return $this->noMigrationException; - } - - public function setNoMigrationException(bool $noMigrationException = false): self - { - $this->noMigrationException = $noMigrationException; - - return $this; - } - - public function isAllOrNothing(): bool - { - return $this->allOrNothing; - } - - public function setAllOrNothing(bool $allOrNothing): self - { - $this->allOrNothing = $allOrNothing; - - return $this; - } - - public function getFromSchema(): Schema|null - { - return $this->fromSchema; - } - - public function setFromSchema(Schema $fromSchema): self - { - $this->fromSchema = $fromSchema; - - return $this; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/ParameterFormatter.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/ParameterFormatter.php deleted file mode 100644 index c6a152a80..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/ParameterFormatter.php +++ /dev/null @@ -1,22 +0,0 @@ - $schemaManager- */ - public function __construct( - private readonly AbstractSchemaManager $schemaManager, - private readonly AbstractPlatform $platform, - ) { - } - - public function createFromSchema(): Schema - { - return $this->schemaManager->introspectSchema(); - } - - public function createToSchema(Schema $fromSchema): Schema - { - return clone $fromSchema; - } - - /** @return string[] */ - public function getSqlDiffToMigrate(Schema $fromSchema, Schema $toSchema): array - { - return $this->platform->getAlterSchemaSQL( - $this->schemaManager->createComparator()->compareSchemas($fromSchema, $toSchema), - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/EmptySchemaProvider.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/EmptySchemaProvider.php deleted file mode 100644 index 343912405..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/EmptySchemaProvider.php +++ /dev/null @@ -1,28 +0,0 @@ - $schemaManager */ - public function __construct(private readonly AbstractSchemaManager $schemaManager) - { - } - - public function createSchema(): Schema - { - return new Schema([], [], $this->schemaManager->createSchemaConfig()); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/Exception/NoMappingFound.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/Exception/NoMappingFound.php deleted file mode 100644 index fd5fc5115..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/Exception/NoMappingFound.php +++ /dev/null @@ -1,15 +0,0 @@ -originalSchemaManipulator; - - return LazySchema::createLazyProxy(static fn () => $originalSchemaManipulator->createFromSchema()); - } - - public function createToSchema(Schema $fromSchema): Schema - { - $originalSchemaManipulator = $this->originalSchemaManipulator; - - if ($fromSchema instanceof LazySchema && ! $fromSchema->isLazyObjectInitialized()) { - return LazySchema::createLazyProxy(static fn () => $originalSchemaManipulator->createToSchema($fromSchema)); - } - - return $this->originalSchemaManipulator->createToSchema($fromSchema); - } - - /** @return string[] */ - public function getSqlDiffToMigrate(Schema $fromSchema, Schema $toSchema): array - { - if ( - $toSchema instanceof LazySchema - && ! $toSchema->isLazyObjectInitialized() - ) { - return []; - } - - return $this->originalSchemaManipulator->getSqlDiffToMigrate($fromSchema, $toSchema); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/OrmSchemaProvider.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/OrmSchemaProvider.php deleted file mode 100644 index 750589ea6..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/OrmSchemaProvider.php +++ /dev/null @@ -1,41 +0,0 @@ -entityManager = $em; - } - - public function createSchema(): Schema - { - /** @var array> $metadata */ - $metadata = $this->entityManager->getMetadataFactory()->getAllMetadata(); - - usort($metadata, static fn (ClassMetadata $a, ClassMetadata $b): int => $a->getTableName() <=> $b->getTableName()); - - $tool = new SchemaTool($this->entityManager); - - return $tool->getSchemaFromMetadata($metadata); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/SchemaDiffProvider.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/SchemaDiffProvider.php deleted file mode 100644 index 33437195a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Provider/SchemaDiffProvider.php +++ /dev/null @@ -1,23 +0,0 @@ -toSchema = $schema; - } - - public function createSchema(): Schema - { - return $this->toSchema; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Query/Exception/InvalidArguments.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Query/Exception/InvalidArguments.php deleted file mode 100644 index df73ab62b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Query/Exception/InvalidArguments.php +++ /dev/null @@ -1,23 +0,0 @@ - count($parameters)) { - throw InvalidArguments::wrongTypesArgumentCount($statement, count($parameters), count($types)); - } - } - - public function __toString(): string - { - return $this->statement; - } - - public function getStatement(): string - { - return $this->statement; - } - - /** @return mixed[] */ - public function getParameters(): array - { - return $this->parameters; - } - - /** @return mixed[] */ - public function getTypes(): array - { - return $this->types; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/QueryWriter.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/QueryWriter.php deleted file mode 100644 index 9868d7aa7..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/QueryWriter.php +++ /dev/null @@ -1,22 +0,0 @@ - $queriesByVersion */ - public function write( - string $path, - string $direction, - array $queriesByVersion, - ): bool; -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Rollup.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Rollup.php deleted file mode 100644 index 662faaa78..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Rollup.php +++ /dev/null @@ -1,48 +0,0 @@ -migrationRepository->getMigrations(); - - if (count($versions) === 0) { - throw RollupFailed::noMigrationsFound(); - } - - if (count($versions) > 1) { - throw RollupFailed::tooManyMigrations(); - } - - $this->metadataStorage->reset(); - - $result = new ExecutionResult($versions->getItems()[0]->getVersion()); - $this->metadataStorage->complete($result); - - return $result->getVersion(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/SchemaDumper.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/SchemaDumper.php deleted file mode 100644 index f1938c9cf..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/SchemaDumper.php +++ /dev/null @@ -1,158 +0,0 @@ - $schemaManager - * @param string[] $excludedTablesRegexes - */ - public function __construct( - private readonly AbstractPlatform $platform, - private readonly AbstractSchemaManager $schemaManager, - private readonly Generator $migrationGenerator, - private readonly SqlGenerator $migrationSqlGenerator, - private readonly array $excludedTablesRegexes = [], - ) { - } - - /** - * @param string[] $excludedTablesRegexes - * - * @throws NoTablesFound - */ - public function dump( - string $fqcn, - array $excludedTablesRegexes = [], - bool $formatted = false, - int $lineLength = 120, - ): string { - $schema = $this->schemaManager->introspectSchema(); - - $up = []; - $down = []; - - foreach ($schema->getTables() as $table) { - if ($this->shouldSkipTable($table, $excludedTablesRegexes)) { - continue; - } - - $upSql = $this->platform->getCreateTableSQL($table); - - $upCode = $this->migrationSqlGenerator->generate( - $upSql, - $formatted, - $lineLength, - ); - - if ($upCode !== '') { - $up[] = $upCode; - } - - $downSql = [$this->platform->getDropTableSQL($table->getQuotedName($this->platform))]; - - $downCode = $this->migrationSqlGenerator->generate( - $downSql, - $formatted, - $lineLength, - ); - - if ($downCode === '') { - continue; - } - - $down[] = $downCode; - } - - if (count($up) === 0) { - throw NoTablesFound::new(); - } - - $up = implode("\n", $up); - $down = implode("\n", $down); - - return $this->migrationGenerator->generateMigration( - $fqcn, - $up, - $down, - ); - } - - /** @param string[] $excludedTablesRegexes */ - private function shouldSkipTable(Table $table, array $excludedTablesRegexes): bool - { - foreach (array_merge($excludedTablesRegexes, $this->excludedTablesRegexes) as $regex) { - if (self::pregMatch($regex, $table->getName()) !== 0) { - return true; - } - } - - return false; - } - - /** - * A local wrapper for "preg_match" which will throw a InvalidArgumentException if there - * is an internal error in the PCRE engine. - * Copied from https://github.com/symfony/symfony/blob/62216ea67762b18982ca3db73c391b0748a49d49/src/Symfony/Component/Yaml/Parser.php#L1072-L1090 - * - * @internal - * - * @param mixed[] $matches - * @param int-mask-of $flags - */ - private static function pregMatch(string $pattern, string $subject, array|null &$matches = null, int $flags = 0, int $offset = 0): int - { - $errorMessages = []; - set_error_handler(static function (int $severity, string $message) use (&$errorMessages): bool { - $errorMessages[] = $message; - - return true; - }); - - try { - $ret = preg_match($pattern, $subject, $matches, $flags, $offset); - } finally { - restore_error_handler(); - } - - if ($ret === false) { - throw new InvalidArgumentException(match (preg_last_error()) { - PREG_INTERNAL_ERROR => sprintf('Internal PCRE error, please check your Regex. Reported errors: %s.', implode(', ', $errorMessages)), - default => preg_last_error_msg(), - }); - } - - return $ret; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/BooleanStringFormatter.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/BooleanStringFormatter.php deleted file mode 100644 index 187e903a7..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/BooleanStringFormatter.php +++ /dev/null @@ -1,27 +0,0 @@ - true, - 'false', '0' => false, - default => $default, - }; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/BytesFormatter.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/BytesFormatter.php deleted file mode 100644 index d63062e58..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/BytesFormatter.php +++ /dev/null @@ -1,27 +0,0 @@ -setAliases(['current']) - ->setDescription('Outputs the current version'); - - parent::configure(); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $aliasResolver = $this->getDependencyFactory()->getVersionAliasResolver(); - - $version = $aliasResolver->resolveVersionAlias('current'); - if ((string) $version === '0') { - $description = '(No migration executed yet)'; - } else { - try { - $availableMigration = $this->getDependencyFactory()->getMigrationRepository()->getMigration($version); - $description = $availableMigration->getMigration()->getDescription(); - } catch (MigrationClassNotFound) { - $description = '(Migration info not available)'; - } - } - - $this->io->text(sprintf( - "%s%s\n", - (string) $version, - $description !== '' ? ' - ' . $description : '', - )); - - return 0; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DiffCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DiffCommand.php deleted file mode 100644 index 6cf6ebd94..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DiffCommand.php +++ /dev/null @@ -1,214 +0,0 @@ -setAliases(['diff']) - ->setDescription('Generate a migration by comparing your current database to your mapping information.') - ->setHelp(<<<'EOT' -The %command.name% command generates a migration by comparing your current database to your mapping information: - - %command.full_name% - -EOT) - ->addOption( - 'namespace', - null, - InputOption::VALUE_REQUIRED, - 'The namespace to use for the migration (must be in the list of configured namespaces)', - ) - ->addOption( - 'filter-expression', - null, - InputOption::VALUE_REQUIRED, - 'Tables which are filtered by Regular Expression.', - ) - ->addOption( - 'formatted', - null, - InputOption::VALUE_NONE, - 'Format the generated SQL.', - ) - ->addOption( - 'line-length', - null, - InputOption::VALUE_REQUIRED, - 'Max line length of unformatted lines.', - '120', - ) - ->addOption( - 'check-database-platform', - null, - InputOption::VALUE_OPTIONAL, - 'Check Database Platform to the generated code.', - false, - ) - ->addOption( - 'allow-empty-diff', - null, - InputOption::VALUE_NONE, - 'Do not throw an exception when no changes are detected.', - ) - ->addOption( - 'from-empty-schema', - null, - InputOption::VALUE_NONE, - 'Generate a full migration as if the current database was empty.', - ); - } - - /** @throws InvalidOptionUsage */ - protected function execute( - InputInterface $input, - OutputInterface $output, - ): int { - $filterExpression = (string) $input->getOption('filter-expression'); - if ($filterExpression === '') { - $filterExpression = null; - } - - $formatted = filter_var($input->getOption('formatted'), FILTER_VALIDATE_BOOLEAN); - $lineLength = (int) $input->getOption('line-length'); - $allowEmptyDiff = $input->getOption('allow-empty-diff'); - $checkDbPlatform = filter_var($input->getOption('check-database-platform'), FILTER_VALIDATE_BOOLEAN); - $fromEmptySchema = $input->getOption('from-empty-schema'); - $namespace = $input->getOption('namespace'); - if ($namespace === '') { - $namespace = null; - } - - if ($formatted) { - if (! class_exists(SqlFormatter::class)) { - throw InvalidOptionUsage::new( - 'The "--formatted" option can only be used if the sql formatter is installed. Please run "composer require doctrine/sql-formatter".', - ); - } - } - - $configuration = $this->getDependencyFactory()->getConfiguration(); - - $dirs = $configuration->getMigrationDirectories(); - if ($namespace === null) { - $namespace = key($dirs); - } elseif (! isset($dirs[$namespace])) { - throw new OutOfBoundsException(sprintf('Path not defined for the namespace %s', $namespace)); - } - - assert(is_string($namespace)); - - $statusCalculator = $this->getDependencyFactory()->getMigrationStatusCalculator(); - $executedUnavailableMigrations = $statusCalculator->getExecutedUnavailableMigrations(); - $newMigrations = $statusCalculator->getNewMigrations(); - - if (! $this->checkNewMigrationsOrExecutedUnavailable($newMigrations, $executedUnavailableMigrations, $input, $output)) { - $this->io->error('Migration cancelled!'); - - return 3; - } - - $fqcn = $this->getDependencyFactory()->getClassNameGenerator()->generateClassName($namespace); - - $diffGenerator = $this->getDependencyFactory()->getDiffGenerator(); - - try { - $path = $diffGenerator->generate( - $fqcn, - $filterExpression, - $formatted, - $lineLength, - $checkDbPlatform, - $fromEmptySchema, - ); - } catch (NoChangesDetected $exception) { - if ($allowEmptyDiff) { - $this->io->error($exception->getMessage()); - - return 0; - } - - throw $exception; - } - - $this->io->text([ - sprintf('Generated new migration class to "%s"', $path), - '', - sprintf( - 'To run just this migration for testing purposes, you can use migrations:execute --up \'%s\'', - addslashes($fqcn), - ), - '', - sprintf( - 'To revert the migration you can use migrations:execute --down \'%s\'', - addslashes($fqcn), - ), - '', - ]); - - return 0; - } - - private function checkNewMigrationsOrExecutedUnavailable( - AvailableMigrationsList $newMigrations, - ExecutedMigrationsList $executedUnavailableMigrations, - InputInterface $input, - OutputInterface $output, - ): bool { - if (count($newMigrations) === 0 && count($executedUnavailableMigrations) === 0) { - return true; - } - - if (count($newMigrations) !== 0) { - $this->io->warning(sprintf( - 'You have %d available migrations to execute.', - count($newMigrations), - )); - } - - if (count($executedUnavailableMigrations) !== 0) { - $this->io->warning(sprintf( - 'You have %d previously executed migrations in the database that are not registered migrations.', - count($executedUnavailableMigrations), - )); - } - - return $this->canExecute('Are you sure you wish to continue?', $input); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DoctrineCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DoctrineCommand.php deleted file mode 100644 index d7b54a5b4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DoctrineCommand.php +++ /dev/null @@ -1,137 +0,0 @@ -addOption( - 'configuration', - null, - InputOption::VALUE_REQUIRED, - 'The path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]', - ); - - $this->addOption( - 'em', - null, - InputOption::VALUE_REQUIRED, - 'The name of the entity manager to use.', - ); - - $this->addOption( - 'conn', - null, - InputOption::VALUE_REQUIRED, - 'The name of the connection to use.', - ); - - if ($this->dependencyFactory !== null) { - return; - } - - $this->addOption( - 'db-configuration', - null, - InputOption::VALUE_REQUIRED, - 'The path to a database connection configuration file.', - 'migrations-db.php', - ); - } - - protected function initialize(InputInterface $input, OutputInterface $output): void - { - $this->io = new SymfonyStyle($input, $output); - - $configurationParameter = $input->getOption('configuration'); - if ($this->dependencyFactory === null) { - $configurationLoader = new ConfigurationFileWithFallback( - is_string($configurationParameter) - ? $configurationParameter - : null, - ); - $connectionLoader = new ConfigurationFile($input->getOption('db-configuration')); - $this->dependencyFactory = DependencyFactory::fromConnection($configurationLoader, $connectionLoader); - } elseif (is_string($configurationParameter)) { - $configurationLoader = new ConfigurationFileWithFallback($configurationParameter); - $this->dependencyFactory->setConfigurationLoader($configurationLoader); - } - - $this->setNamedEmOrConnection($input); - - if ($this->dependencyFactory->isFrozen()) { - return; - } - - $logger = new ConsoleLogger($output); - $this->dependencyFactory->setService(LoggerInterface::class, $logger); - $this->dependencyFactory->freeze(); - } - - protected function getDependencyFactory(): DependencyFactory - { - if ($this->dependencyFactory === null) { - throw DependenciesNotSatisfied::new(); - } - - return $this->dependencyFactory; - } - - protected function canExecute(string $question, InputInterface $input): bool - { - return ! $input->isInteractive() || $this->io->confirm($question); - } - - private function setNamedEmOrConnection(InputInterface $input): void - { - $emName = $input->getOption('em'); - $connName = $input->getOption('conn'); - if ($emName !== null && $connName !== null) { - throw new InvalidOptionUsage('You can specify only one of the --em and --conn options.'); - } - - if ($this->dependencyFactory->hasEntityManager() && $emName !== null) { - $this->dependencyFactory->getConfiguration()->setEntityManagerName($emName); - - return; - } - - if ($connName !== null) { - $this->dependencyFactory->getConfiguration()->setConnectionName($connName); - - return; - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DumpSchemaCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DumpSchemaCommand.php deleted file mode 100644 index dd927db82..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DumpSchemaCommand.php +++ /dev/null @@ -1,144 +0,0 @@ -setAliases(['dump-schema']) - ->setDescription('Dump the schema for your database to a migration.') - ->setHelp(<<<'EOT' -The %command.name% command dumps the schema for your database to a migration: - - %command.full_name% - -After dumping your schema to a migration, you can rollup your migrations using the migrations:rollup command. -EOT) - ->addOption( - 'formatted', - null, - InputOption::VALUE_NONE, - 'Format the generated SQL.', - ) - ->addOption( - 'namespace', - null, - InputOption::VALUE_REQUIRED, - 'Namespace to use for the generated migrations (defaults to the first namespace definition).', - ) - ->addOption( - 'filter-tables', - null, - InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, - 'Filter the tables to dump via Regex.', - ) - ->addOption( - 'line-length', - null, - InputOption::VALUE_OPTIONAL, - 'Max line length of unformatted lines.', - '120', - ); - } - - /** @throws SchemaDumpRequiresNoMigrations */ - public function execute( - InputInterface $input, - OutputInterface $output, - ): int { - $formatted = $input->getOption('formatted'); - $lineLength = (int) $input->getOption('line-length'); - - $schemaDumper = $this->getDependencyFactory()->getSchemaDumper(); - - if ($formatted) { - if (! class_exists(SqlFormatter::class)) { - throw InvalidOptionUsage::new( - 'The "--formatted" option can only be used if the sql formatter is installed. Please run "composer require doctrine/sql-formatter".', - ); - } - } - - $configuration = $this->getDependencyFactory()->getConfiguration(); - - $namespace = $input->getOption('namespace'); - if ($namespace === null) { - $dirs = $configuration->getMigrationDirectories(); - $namespace = key($dirs); - } - - assert(is_string($namespace)); - - $this->checkNoPreviousDumpExistsForNamespace($namespace); - - $fqcn = $this->getDependencyFactory()->getClassNameGenerator()->generateClassName($namespace); - - $path = $schemaDumper->dump( - $fqcn, - $input->getOption('filter-tables'), - $formatted, - $lineLength, - ); - - $this->io->text([ - sprintf('Dumped your schema to a new migration class at "%s"', $path), - '', - sprintf( - 'To run just this migration for testing purposes, you can use migrations:execute --up \'%s\'', - addslashes($fqcn), - ), - '', - sprintf( - 'To revert the migration you can use migrations:execute --down \'%s\'', - addslashes($fqcn), - ), - '', - 'To use this as a rollup migration you can use the migrations:rollup command.', - '', - ]); - - return 0; - } - - private function checkNoPreviousDumpExistsForNamespace(string $namespace): void - { - $migrations = $this->getDependencyFactory()->getMigrationRepository()->getMigrations(); - foreach ($migrations->getItems() as $migration) { - if (str_contains((string) $migration->getVersion(), $namespace)) { - throw SchemaDumpRequiresNoMigrations::new($namespace); - } - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/ExecuteCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/ExecuteCommand.php deleted file mode 100644 index 92d4101c4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/ExecuteCommand.php +++ /dev/null @@ -1,178 +0,0 @@ -setAliases(['execute']) - ->setDescription( - 'Execute one or more migration versions up or down manually.', - ) - ->addArgument( - 'versions', - InputArgument::REQUIRED | InputArgument::IS_ARRAY, - 'The versions to execute.', - null, - ) - ->addOption( - 'write-sql', - null, - InputOption::VALUE_OPTIONAL, - 'The path to output the migration SQL file. Defaults to current working directory.', - false, - ) - ->addOption( - 'dry-run', - null, - InputOption::VALUE_NONE, - 'Execute the migration as a dry run.', - ) - ->addOption( - 'up', - null, - InputOption::VALUE_NONE, - 'Execute the migration up.', - ) - ->addOption( - 'down', - null, - InputOption::VALUE_NONE, - 'Execute the migration down.', - ) - ->addOption( - 'query-time', - null, - InputOption::VALUE_NONE, - 'Time all the queries individually.', - ) - ->setHelp(<<<'EOT' -The %command.name% command executes migration versions up or down manually: - - %command.full_name% FQCN - -You can show more information about the process by increasing the verbosity level. To see the -executed queries, set the level to debug with -vv: - - %command.full_name% FQCN -vv - -If no --up or --down option is specified it defaults to up: - - %command.full_name% FQCN --down - -You can also execute the migration as a --dry-run: - - %command.full_name% FQCN --dry-run - -You can output the prepared SQL statements to a file with --write-sql: - - %command.full_name% FQCN --write-sql - -Or you can also execute the migration without a warning message which you need to interact with: - - %command.full_name% FQCN --no-interaction - -All the previous commands accept multiple migration versions, allowing you run execute more than -one migration at once: - - %command.full_name% FQCN-1 FQCN-2 ...FQCN-n - -EOT); - - parent::configure(); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $migratorConfigurationFactory = $this->getDependencyFactory()->getConsoleInputMigratorConfigurationFactory(); - $migratorConfiguration = $migratorConfigurationFactory->getMigratorConfiguration($input); - - $databaseName = (string) $this->getDependencyFactory()->getConnection()->getDatabase(); - $question = sprintf( - 'WARNING! You are about to execute a migration in database "%s" that could result in schema changes and data loss. Are you sure you wish to continue?', - $databaseName === '' ? '' : $databaseName, - ); - if (! $migratorConfiguration->isDryRun() && ! $this->canExecute($question, $input)) { - $this->io->error('Migration cancelled!'); - - return 1; - } - - $this->getDependencyFactory()->getMetadataStorage()->ensureInitialized(); - - $versions = $input->getArgument('versions'); - $direction = $input->getOption('down') !== false - ? Direction::DOWN - : Direction::UP; - - $path = $input->getOption('write-sql') ?? getcwd(); - - if (is_string($path) && ! $this->isPathWritable($path)) { - $this->io->error(sprintf('The path "%s" not writeable!', $path)); - - return 1; - } - - $planCalculator = $this->getDependencyFactory()->getMigrationPlanCalculator(); - $plan = $planCalculator->getPlanForVersions(array_map(static fn (string $version): Version => new Version($version), $versions), $direction); - - $this->getDependencyFactory()->getLogger()->notice( - 'Executing' . ($migratorConfiguration->isDryRun() ? ' (dry-run)' : '') . ' {versions} {direction}', - [ - 'direction' => $plan->getDirection(), - 'versions' => implode(', ', $versions), - ], - ); - - $migrator = $this->getDependencyFactory()->getMigrator(); - $sql = $migrator->migrate($plan, $migratorConfiguration); - - if (is_string($path)) { - $writer = $this->getDependencyFactory()->getQueryWriter(); - $writer->write($path, $direction, $sql); - } - - $this->io->success(sprintf( - 'Successfully migrated version(s): %s: [%s]', - implode(', ', $versions), - strtoupper($plan->getDirection()), - )); - $this->io->newLine(); - - return 0; - } - - private function isPathWritable(string $path): bool - { - return is_writable($path) || is_dir($path) || is_writable(dirname($path)); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/GenerateCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/GenerateCommand.php deleted file mode 100644 index 3bddf9e4e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/GenerateCommand.php +++ /dev/null @@ -1,89 +0,0 @@ -setAliases(['generate']) - ->setDescription('Generate a blank migration class.') - ->addOption( - 'namespace', - null, - InputOption::VALUE_REQUIRED, - 'The namespace to use for the migration (must be in the list of configured namespaces)', - ) - ->setHelp(<<<'EOT' -The %command.name% command generates a blank migration class: - - %command.full_name% - -EOT); - - parent::configure(); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $configuration = $this->getDependencyFactory()->getConfiguration(); - - $migrationGenerator = $this->getDependencyFactory()->getMigrationGenerator(); - - $namespace = $input->getOption('namespace'); - if ($namespace === '') { - $namespace = null; - } - - $dirs = $configuration->getMigrationDirectories(); - if ($namespace === null) { - $namespace = key($dirs); - } elseif (! isset($dirs[$namespace])) { - throw new Exception(sprintf('Path not defined for the namespace %s', $namespace)); - } - - assert(is_string($namespace)); - - $fqcn = $this->getDependencyFactory()->getClassNameGenerator()->generateClassName($namespace); - - $path = $migrationGenerator->generateMigration($fqcn); - - $this->io->text([ - sprintf('Generated new migration class to "%s"', $path), - '', - sprintf( - 'To run just this migration for testing purposes, you can use migrations:execute --up \'%s\'', - $fqcn, - ), - '', - sprintf( - 'To revert the migration you can use migrations:execute --down \'%s\'', - $fqcn, - ), - '', - ]); - - return 0; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/LatestCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/LatestCommand.php deleted file mode 100644 index 5ce6af0c8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/LatestCommand.php +++ /dev/null @@ -1,53 +0,0 @@ -setAliases(['latest']) - ->setDescription('Outputs the latest version'); - - parent::configure(); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $aliasResolver = $this->getDependencyFactory()->getVersionAliasResolver(); - - try { - $version = $aliasResolver->resolveVersionAlias('latest'); - $availableMigration = $this->getDependencyFactory()->getMigrationRepository()->getMigration($version); - $description = $availableMigration->getMigration()->getDescription(); - } catch (NoMigrationsToExecute) { - $version = '0'; - $description = ''; - } - - $this->io->text(sprintf( - "%s%s\n", - $version, - $description !== '' ? ' - ' . $description : '', - )); - - return 0; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/ListCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/ListCommand.php deleted file mode 100644 index 86aa661f3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/ListCommand.php +++ /dev/null @@ -1,70 +0,0 @@ -setAliases(['list-migrations']) - ->setDescription('Display a list of all available migrations and their status.') - ->setHelp(<<<'EOT' -The %command.name% command outputs a list of all available migrations and their status: - - %command.full_name% -EOT); - - parent::configure(); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $versions = $this->getSortedVersions( - $this->getDependencyFactory()->getMigrationPlanCalculator()->getMigrations(), // available migrations - $this->getDependencyFactory()->getMetadataStorage()->getExecutedMigrations(), // executed migrations - ); - - $this->getDependencyFactory()->getMigrationStatusInfosHelper()->listVersions($versions, $output); - - return 0; - } - - /** @return Version[] */ - private function getSortedVersions(AvailableMigrationsList $availableMigrations, ExecutedMigrationsList $executedMigrations): array - { - $availableVersions = array_map(static fn (AvailableMigration $availableMigration): Version => $availableMigration->getVersion(), $availableMigrations->getItems()); - - $executedVersions = array_map(static fn (ExecutedMigration $executedMigration): Version => $executedMigration->getVersion(), $executedMigrations->getItems()); - - $versions = array_unique(array_merge($availableVersions, $executedVersions)); - - $comparator = $this->getDependencyFactory()->getVersionComparator(); - uasort($versions, $comparator->compare(...)); - - return $versions; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/MigrateCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/MigrateCommand.php deleted file mode 100644 index 2084b6f6e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/MigrateCommand.php +++ /dev/null @@ -1,296 +0,0 @@ -setAliases(['migrate']) - ->setDescription( - 'Execute a migration to a specified version or the latest available version.', - ) - ->addArgument( - 'version', - InputArgument::OPTIONAL, - 'The version FQCN or alias (first, prev, next, latest) to migrate to.', - 'latest', - ) - ->addOption( - 'write-sql', - null, - InputOption::VALUE_OPTIONAL, - 'The path to output the migration SQL file. Defaults to current working directory.', - false, - ) - ->addOption( - 'dry-run', - null, - InputOption::VALUE_NONE, - 'Execute the migration as a dry run.', - ) - ->addOption( - 'query-time', - null, - InputOption::VALUE_NONE, - 'Time all the queries individually.', - ) - ->addOption( - 'allow-no-migration', - null, - InputOption::VALUE_NONE, - 'Do not throw an exception if no migration is available.', - ) - ->addOption( - 'all-or-nothing', - null, - InputOption::VALUE_OPTIONAL, - 'Wrap the entire migration in a transaction.', - ConsoleInputMigratorConfigurationFactory::ABSENT_CONFIG_VALUE, - ) - ->setHelp(<<<'EOT' -The %command.name% command executes a migration to a specified version or the latest available version: - - %command.full_name% - -You can show more information about the process by increasing the verbosity level. To see the -executed queries, set the level to debug with -vv: - - %command.full_name% -vv - -You can optionally manually specify the version you wish to migrate to: - - %command.full_name% FQCN - -You can specify the version you wish to migrate to using an alias: - - %command.full_name% prev - These alias are defined: first, latest, prev, current and next - -You can specify the version you wish to migrate to using an number against the current version: - - %command.full_name% current+3 - -You can also execute the migration as a --dry-run: - - %command.full_name% FQCN --dry-run - -You can output the prepared SQL statements to a file with --write-sql: - - %command.full_name% FQCN --write-sql - -Or you can also execute the migration without a warning message which you need to interact with: - - %command.full_name% --no-interaction - -You can also time all the different queries if you wanna know which one is taking so long: - - %command.full_name% --query-time - -Use the --all-or-nothing option to wrap the entire migration in a transaction. - -EOT); - - parent::configure(); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $migratorConfigurationFactory = $this->getDependencyFactory()->getConsoleInputMigratorConfigurationFactory(); - $migratorConfiguration = $migratorConfigurationFactory->getMigratorConfiguration($input); - - $databaseName = (string) $this->getDependencyFactory()->getConnection()->getDatabase(); - $question = sprintf( - 'WARNING! You are about to execute a migration in database "%s" that could result in schema changes and data loss. Are you sure you wish to continue?', - $databaseName === '' ? '' : $databaseName, - ); - if (! $migratorConfiguration->isDryRun() && ! $this->canExecute($question, $input)) { - $this->io->error('Migration cancelled!'); - - return 3; - } - - $this->getDependencyFactory()->getMetadataStorage()->ensureInitialized(); - - $allowNoMigration = $input->getOption('allow-no-migration'); - $versionAlias = $input->getArgument('version'); - - $path = $input->getOption('write-sql') ?? getcwd(); - - if (is_string($path) && ! $this->isPathWritable($path)) { - $this->io->error(sprintf('The path "%s" not writeable!', $path)); - - return 1; - } - - $migrationRepository = $this->getDependencyFactory()->getMigrationRepository(); - if (count($migrationRepository->getMigrations()) === 0) { - $message = sprintf( - 'The version "%s" couldn\'t be reached, there are no registered migrations.', - $versionAlias, - ); - - if ($allowNoMigration) { - $this->io->warning($message); - - return 0; - } - - $this->io->error($message); - - return 1; - } - - try { - $version = $this->getDependencyFactory()->getVersionAliasResolver()->resolveVersionAlias($versionAlias); - } catch (UnknownMigrationVersion) { - $this->io->error(sprintf( - 'Unknown version: %s', - OutputFormatter::escape($versionAlias), - )); - - return 1; - } catch (NoMigrationsToExecute | NoMigrationsFoundWithCriteria) { - return $this->exitForAlias($versionAlias); - } - - $planCalculator = $this->getDependencyFactory()->getMigrationPlanCalculator(); - $statusCalculator = $this->getDependencyFactory()->getMigrationStatusCalculator(); - $executedUnavailableMigrations = $statusCalculator->getExecutedUnavailableMigrations(); - - if ($this->checkExecutedUnavailableMigrations($executedUnavailableMigrations, $input) === false) { - return 3; - } - - $plan = $planCalculator->getPlanUntilVersion($version); - - if (count($plan) === 0) { - return $this->exitForAlias($versionAlias); - } - - $this->getDependencyFactory()->getLogger()->notice( - 'Migrating' . ($migratorConfiguration->isDryRun() ? ' (dry-run)' : '') . ' {direction} to {to}', - [ - 'direction' => $plan->getDirection(), - 'to' => (string) $version, - ], - ); - - $migrator = $this->getDependencyFactory()->getMigrator(); - $sql = $migrator->migrate($plan, $migratorConfiguration); - - if (is_string($path)) { - $writer = $this->getDependencyFactory()->getQueryWriter(); - $writer->write($path, $plan->getDirection(), $sql); - } - - $this->io->success(sprintf( - 'Successfully migrated to version: %s', - $version, - )); - $this->io->newLine(); - - return 0; - } - - private function checkExecutedUnavailableMigrations( - ExecutedMigrationsList $executedUnavailableMigrations, - InputInterface $input, - ): bool { - if (count($executedUnavailableMigrations) !== 0) { - $this->io->warning(sprintf( - 'You have %s previously executed migrations in the database that are not registered migrations.', - count($executedUnavailableMigrations), - )); - - foreach ($executedUnavailableMigrations->getItems() as $executedUnavailableMigration) { - $this->io->text(sprintf( - '>> %s (%s)', - $executedUnavailableMigration->getExecutedAt()?->format('Y-m-d H:i:s'), - $executedUnavailableMigration->getVersion(), - )); - } - - $question = 'Are you sure you wish to continue?'; - - if (! $this->canExecute($question, $input)) { - $this->io->error('Migration cancelled!'); - - return false; - } - } - - return true; - } - - private function exitForAlias(string $versionAlias): int - { - $version = $this->getDependencyFactory()->getVersionAliasResolver()->resolveVersionAlias('current'); - - // Allow meaningful message when latest version already reached. - if (in_array($versionAlias, ['current', 'latest', 'first'], true)) { - $message = sprintf( - 'Already at the %s version ("%s")', - $versionAlias, - (string) $version, - ); - - $this->io->success($message); - } elseif (in_array($versionAlias, ['next', 'prev'], true) || str_starts_with($versionAlias, 'current')) { - $message = sprintf( - 'The version "%s" couldn\'t be reached, you are at version "%s"', - $versionAlias, - (string) $version, - ); - - $this->io->error($message); - } else { - $message = sprintf( - 'You are already at version "%s"', - (string) $version, - ); - - $this->io->success($message); - } - - return 0; - } - - private function isPathWritable(string $path): bool - { - return is_writable($path) || is_dir($path) || is_writable(dirname($path)); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/RollupCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/RollupCommand.php deleted file mode 100644 index 1c97985d3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/RollupCommand.php +++ /dev/null @@ -1,63 +0,0 @@ -setAliases(['rollup']) - ->setDescription('Rollup migrations by deleting all tracked versions and insert the one version that exists.') - ->setHelp(<<<'EOT' -The %command.name% command rolls up migrations by deleting all tracked versions and -inserts the one version that exists that was created with the migrations:dump-schema command. - - %command.full_name% - -To dump your schema to a migration version you can use the migrations:dump-schema command. -EOT); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $question = sprintf( - 'WARNING! You are about to execute a migration in database "%s" that could result in schema changes and data loss. Are you sure you wish to continue?', - $this->getDependencyFactory()->getConnection()->getDatabase() ?? '', - ); - - if (! $this->canExecute($question, $input)) { - $this->io->error('Migration cancelled!'); - - return 3; - } - - $this->getDependencyFactory()->getMetadataStorage()->ensureInitialized(); - $version = $this->getDependencyFactory()->getRollup()->rollup(); - - $this->io->success(sprintf( - 'Rolled up migrations to version %s', - (string) $version, - )); - - return 0; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/StatusCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/StatusCommand.php deleted file mode 100644 index ce710dc91..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/StatusCommand.php +++ /dev/null @@ -1,42 +0,0 @@ -setAliases(['status']) - ->setDescription('View the status of a set of migrations.') - ->setHelp(<<<'EOT' -The %command.name% command outputs the status of a set of migrations: - - %command.full_name% -EOT); - - parent::configure(); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $infosHelper = $this->getDependencyFactory()->getMigrationStatusInfosHelper(); - $infosHelper->showMigrationsInfo($output); - - return 0; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/SyncMetadataCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/SyncMetadataCommand.php deleted file mode 100644 index 3bb68ed57..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/SyncMetadataCommand.php +++ /dev/null @@ -1,44 +0,0 @@ -setAliases(['sync-metadata-storage']) - ->setDescription('Ensures that the metadata storage is at the latest version.') - ->setHelp(<<<'EOT' -The way metadata is stored in the database can change between releases. -The %command.name% command updates metadata storage to the latest version, -ensuring it is ready to receive migrations generated by the current version of Doctrine Migrations. - - - %command.full_name% -EOT); - } - - public function execute( - InputInterface $input, - OutputInterface $output, - ): int { - $this->getDependencyFactory()->getMetadataStorage()->ensureInitialized(); - - $this->io->success('Metadata storage synchronized'); - - return 0; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/UpToDateCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/UpToDateCommand.php deleted file mode 100644 index dfcf07864..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/UpToDateCommand.php +++ /dev/null @@ -1,111 +0,0 @@ -setAliases(['up-to-date']) - ->setDescription('Tells you if your schema is up-to-date.') - ->addOption('fail-on-unregistered', 'u', InputOption::VALUE_NONE, 'Whether to fail when there are unregistered extra migrations found') - ->addOption('list-migrations', 'l', InputOption::VALUE_NONE, 'Show a list of missing or not migrated versions.') - ->setHelp(<<<'EOT' -The %command.name% command tells you if your schema is up-to-date: - - %command.full_name% -EOT); - - parent::configure(); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $statusCalculator = $this->getDependencyFactory()->getMigrationStatusCalculator(); - - $executedUnavailableMigrations = $statusCalculator->getExecutedUnavailableMigrations(); - $newMigrations = $statusCalculator->getNewMigrations(); - $newMigrationsCount = count($newMigrations); - $executedUnavailableMigrationsCount = count($executedUnavailableMigrations); - - if ($newMigrationsCount === 0 && $executedUnavailableMigrationsCount === 0) { - $this->io->success('Up-to-date! No migrations to execute.'); - - return 0; - } - - $exitCode = 0; - if ($newMigrationsCount > 0) { - $this->io->error(sprintf( - 'Out-of-date! %u migration%s available to execute.', - $newMigrationsCount, - $newMigrationsCount > 1 ? 's are' : ' is', - )); - $exitCode = 1; - } - - if ($executedUnavailableMigrationsCount > 0) { - $this->io->error(sprintf( - 'You have %1$u previously executed migration%3$s in the database that %2$s registered migration%3$s.', - $executedUnavailableMigrationsCount, - $executedUnavailableMigrationsCount > 1 ? 'are not' : 'is not a', - $executedUnavailableMigrationsCount > 1 ? 's' : '', - )); - if ($input->getOption('fail-on-unregistered')) { - $exitCode = 2; - } - } - - if ($input->getOption('list-migrations')) { - $versions = $this->getSortedVersions($newMigrations, $executedUnavailableMigrations); - $this->getDependencyFactory()->getMigrationStatusInfosHelper()->listVersions($versions, $output); - - $this->io->newLine(); - } - - return $exitCode; - } - - /** @return Version[] */ - private function getSortedVersions(AvailableMigrationsList $newMigrations, ExecutedMigrationsList $executedUnavailableMigrations): array - { - $executedUnavailableVersion = array_map(static fn (ExecutedMigration $executedMigration): Version => $executedMigration->getVersion(), $executedUnavailableMigrations->getItems()); - - $newVersions = array_map(static fn (AvailableMigration $availableMigration): Version => $availableMigration->getVersion(), $newMigrations->getItems()); - - $versions = array_unique(array_merge($executedUnavailableVersion, $newVersions)); - - $comparator = $this->getDependencyFactory()->getVersionComparator(); - uasort($versions, $comparator->compare(...)); - - return $versions; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/VersionCommand.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/VersionCommand.php deleted file mode 100644 index 8397babc9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/VersionCommand.php +++ /dev/null @@ -1,260 +0,0 @@ -setAliases(['version']) - ->setDescription('Manually add and delete migration versions from the version table.') - ->addArgument( - 'version', - InputArgument::OPTIONAL, - 'The version to add or delete.', - null, - ) - ->addOption( - 'add', - null, - InputOption::VALUE_NONE, - 'Add the specified version.', - ) - ->addOption( - 'delete', - null, - InputOption::VALUE_NONE, - 'Delete the specified version.', - ) - ->addOption( - 'all', - null, - InputOption::VALUE_NONE, - 'Apply to all the versions.', - ) - ->addOption( - 'range-from', - null, - InputOption::VALUE_OPTIONAL, - 'Apply from specified version.', - ) - ->addOption( - 'range-to', - null, - InputOption::VALUE_OPTIONAL, - 'Apply to specified version.', - ) - ->setHelp(<<<'EOT' -The %command.name% command allows you to manually add, delete or synchronize migration versions from the version table: - - %command.full_name% MIGRATION-FQCN --add - -If you want to delete a version you can use the --delete option: - - %command.full_name% MIGRATION-FQCN --delete - -If you want to synchronize by adding or deleting all migration versions available in the version table you can use the --all option: - - %command.full_name% --add --all - %command.full_name% --delete --all - -If you want to synchronize by adding or deleting some range of migration versions available in the version table you can use the --range-from/--range-to option: - - %command.full_name% --add --range-from=MIGRATION-FQCN --range-to=MIGRATION-FQCN - %command.full_name% --delete --range-from=MIGRATION-FQCN --range-to=MIGRATION-FQCN - -You can also execute this command without a warning message which you need to interact with: - - %command.full_name% --no-interaction -EOT); - - parent::configure(); - } - - /** @throws InvalidOptionUsage */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - if ($input->getOption('add') === false && $input->getOption('delete') === false) { - throw InvalidOptionUsage::new('You must specify whether you want to --add or --delete the specified version.'); - } - - $this->markMigrated = $input->getOption('add'); - - if ($input->isInteractive()) { - $question = 'WARNING! You are about to add, delete or synchronize migration versions from the version table that could result in data lost. Are you sure you wish to continue?'; - - $confirmation = $this->io->confirm($question); - - if ($confirmation) { - $this->markVersions($input, $output); - } else { - $this->io->error('Migration cancelled!'); - } - } else { - $this->markVersions($input, $output); - } - - return 0; - } - - /** @throws InvalidOptionUsage */ - private function markVersions(InputInterface $input, OutputInterface $output): void - { - $affectedVersion = $input->getArgument('version'); - $allOption = $input->getOption('all'); - $rangeFromOption = $input->getOption('range-from'); - $rangeToOption = $input->getOption('range-to'); - - if ($allOption === true && ($rangeFromOption !== null || $rangeToOption !== null)) { - throw InvalidOptionUsage::new( - 'Options --all and --range-to/--range-from both used. You should use only one of them.', - ); - } - - if ($rangeFromOption !== null xor $rangeToOption !== null) { - throw InvalidOptionUsage::new( - 'Options --range-to and --range-from should be used together.', - ); - } - - $executedMigrations = $this->getDependencyFactory()->getMetadataStorage()->getExecutedMigrations(); - $availableVersions = $this->getDependencyFactory()->getMigrationPlanCalculator()->getMigrations(); - if ($allOption === true) { - if ($input->getOption('delete') === true) { - foreach ($executedMigrations->getItems() as $availableMigration) { - $this->mark($input, $output, $availableMigration->getVersion(), false, $executedMigrations); - } - } - - foreach ($availableVersions->getItems() as $availableMigration) { - $this->mark($input, $output, $availableMigration->getVersion(), true, $executedMigrations); - } - } elseif ($affectedVersion !== null) { - $this->mark($input, $output, new Version($affectedVersion), false, $executedMigrations); - } elseif ($rangeFromOption !== null && $rangeToOption !== null) { - $migrate = false; - foreach ($availableVersions->getItems() as $availableMigration) { - if ((string) $availableMigration->getVersion() === $rangeFromOption) { - $migrate = true; - } - - if ($migrate) { - $this->mark($input, $output, $availableMigration->getVersion(), true, $executedMigrations); - } - - if ((string) $availableMigration->getVersion() === $rangeToOption) { - break; - } - } - } else { - throw InvalidOptionUsage::new('You must specify the version or use the --all argument.'); - } - } - - /** - * @throws VersionAlreadyExists - * @throws VersionDoesNotExist - * @throws UnknownMigrationVersion - */ - private function mark(InputInterface $input, OutputInterface $output, Version $version, bool $all, ExecutedMigrationsList $executedMigrations): void - { - try { - $availableMigration = $this->getDependencyFactory()->getMigrationRepository()->getMigration($version); - } catch (MigrationClassNotFound) { - $availableMigration = null; - } - - $storage = $this->getDependencyFactory()->getMetadataStorage(); - if ($availableMigration === null) { - if ($input->getOption('delete') === false) { - throw UnknownMigrationVersion::new((string) $version); - } - - $question = - 'WARNING! You are about to delete a migration version from the version table that has no corresponding migration file.' . - 'Do you want to delete this migration from the migrations table?'; - - $confirmation = $this->io->confirm($question); - - if ($confirmation) { - $migrationResult = new ExecutionResult($version, Direction::DOWN); - $storage->complete($migrationResult); - $this->io->text(sprintf( - "%s deleted from the version table.\n", - (string) $version, - )); - - return; - } - } - - $marked = false; - - if ($this->markMigrated && $executedMigrations->hasMigration($version)) { - if (! $all) { - throw VersionAlreadyExists::new($version); - } - - $marked = true; - } - - if (! $this->markMigrated && ! $executedMigrations->hasMigration($version)) { - if (! $all) { - throw VersionDoesNotExist::new($version); - } - - $marked = true; - } - - if ($marked === true) { - return; - } - - if ($this->markMigrated) { - $migrationResult = new ExecutionResult($version, Direction::UP); - $storage->complete($migrationResult); - - $this->io->text(sprintf( - "%s added to the version table.\n", - (string) $version, - )); - } else { - $migrationResult = new ExecutionResult($version, Direction::DOWN); - $storage->complete($migrationResult); - - $this->io->text(sprintf( - "%s deleted from the version table.\n", - (string) $version, - )); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/ConsoleInputMigratorConfigurationFactory.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/ConsoleInputMigratorConfigurationFactory.php deleted file mode 100644 index fffc450ba..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/ConsoleInputMigratorConfigurationFactory.php +++ /dev/null @@ -1,60 +0,0 @@ -hasOption('query-time') ? (bool) $input->getOption('query-time') : false; - $dryRun = $input->hasOption('dry-run') ? (bool) $input->getOption('dry-run') : false; - $allOrNothing = $this->determineAllOrNothingValueFrom($input) ?? $this->configuration->isAllOrNothing(); - - return (new MigratorConfiguration()) - ->setDryRun($dryRun) - ->setTimeAllQueries($timeAllQueries) - ->setAllOrNothing($allOrNothing); - } - - private function determineAllOrNothingValueFrom(InputInterface $input): bool|null - { - $allOrNothingOption = null; - $wasOptionExplicitlyPassed = $input->hasOption('all-or-nothing'); - - if ($wasOptionExplicitlyPassed) { - $allOrNothingOption = $input->getOption('all-or-nothing'); - } - - if ($wasOptionExplicitlyPassed && ($allOrNothingOption !== null && $allOrNothingOption !== self::ABSENT_CONFIG_VALUE)) { - Deprecation::trigger( - 'doctrine/migrations', - 'https://github.com/doctrine/migrations/issues/1304', - <<<'DEPRECATION' - Context: Passing values to option `--all-or-nothing` - Problem: Passing values is deprecated - Solution: If you need to disable the behavior, omit the option, - otherwise, pass the option without a value - DEPRECATION, - ); - } - - return match ($allOrNothingOption) { - self::ABSENT_CONFIG_VALUE => null, - null => false, - default => (bool) $allOrNothingOption, - }; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/ConsoleLogger.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/ConsoleLogger.php deleted file mode 100644 index 34b5623bd..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/ConsoleLogger.php +++ /dev/null @@ -1,133 +0,0 @@ - */ - private array $verbosityLevelMap = [ - LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, - LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, - LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, - LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL, - LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL, - LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL, - LogLevel::INFO => OutputInterface::VERBOSITY_VERBOSE, - LogLevel::DEBUG => OutputInterface::VERBOSITY_VERY_VERBOSE, - ]; - /** @var array */ - private array $formatLevelMap = [ - LogLevel::EMERGENCY => self::ERROR, - LogLevel::ALERT => self::ERROR, - LogLevel::CRITICAL => self::ERROR, - LogLevel::ERROR => self::ERROR, - LogLevel::WARNING => self::INFO, - LogLevel::NOTICE => self::INFO, - LogLevel::INFO => self::INFO, - LogLevel::DEBUG => self::INFO, - ]; - - /** - * @param array $verbosityLevelMap - * @param array $formatLevelMap - */ - public function __construct( - private readonly OutputInterface $output, - array $verbosityLevelMap = [], - array $formatLevelMap = [], - ) { - $this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap; - $this->formatLevelMap = $formatLevelMap + $this->formatLevelMap; - } - - /** - * {@inheritDoc} - * - * @param mixed[] $context - */ - public function log($level, $message, array $context = []): void - { - if (! isset($this->verbosityLevelMap[$level])) { - throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); - } - - $output = $this->output; - - // Write to the error output if necessary and available - if ($this->formatLevelMap[$level] === self::ERROR) { - if ($this->output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - } - - // the if condition check isn't necessary -- it's the same one that $output will do internally anyway. - // We only do it for efficiency here as the message formatting is relatively expensive. - if ($output->getVerbosity() < $this->verbosityLevelMap[$level]) { - return; - } - - $output->writeln(sprintf('<%1$s>[%2$s] %3$s', $this->formatLevelMap[$level], $level, $this->interpolate($message, $context)), $this->verbosityLevelMap[$level]); - } - - /** - * Interpolates context values into the message placeholders. - * - * @param mixed[] $context - */ - private function interpolate(string|Stringable $message, array $context): string - { - $message = (string) $message; - if (! str_contains($message, '{')) { - return $message; - } - - $replacements = []; - foreach ($context as $key => $val) { - if ($val === null || is_scalar($val) || $val instanceof Stringable) { - $replacements["{{$key}}"] = $val; - } elseif ($val instanceof DateTimeInterface) { - $replacements["{{$key}}"] = $val->format(DateTime::RFC3339); - } elseif (is_object($val)) { - $replacements["{{$key}}"] = '[object ' . $val::class . ']'; - } else { - $replacements["{{$key}}"] = '[' . gettype($val) . ']'; - } - - if (! isset($replacements["{{$key}}"])) { - continue; - } - - $replacements["{{$key}}"] = '' . $replacements["{{$key}}"] . ''; - } - - return strtr($message, $replacements); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/ConsoleRunner.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/ConsoleRunner.php deleted file mode 100644 index 51c784e63..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/ConsoleRunner.php +++ /dev/null @@ -1,154 +0,0 @@ -run(); - } - - /** @param DoctrineCommand[] $commands */ - public static function createApplication(array $commands = [], DependencyFactory|null $dependencyFactory = null): Application - { - $version = InstalledVersions::getVersion('doctrine/migrations'); - assert($version !== null); - $cli = new Application('Doctrine Migrations', $version); - $cli->setCatchExceptions(true); - self::addCommands($cli, $dependencyFactory); - $cli->addCommands($commands); - - return $cli; - } - - public static function addCommands(Application $cli, DependencyFactory|null $dependencyFactory = null): void - { - $cli->addCommands([ - new CurrentCommand($dependencyFactory), - new DumpSchemaCommand($dependencyFactory), - new ExecuteCommand($dependencyFactory), - new GenerateCommand($dependencyFactory), - new LatestCommand($dependencyFactory), - new MigrateCommand($dependencyFactory), - new RollupCommand($dependencyFactory), - new StatusCommand($dependencyFactory), - new VersionCommand($dependencyFactory), - new UpToDateCommand($dependencyFactory), - new SyncMetadataCommand($dependencyFactory), - new ListCommand($dependencyFactory), - ]); - - if ($dependencyFactory === null || ! $dependencyFactory->hasSchemaProvider()) { - return; - } - - $cli->add(new DiffCommand($dependencyFactory)); - } - - private static function checkLegacyConfiguration(mixed $dependencyFactory, string $configurationFile): mixed - { - if (! ($dependencyFactory instanceof HelperSet)) { - return $dependencyFactory; - } - - $configurations = new ConfigurationFileWithFallback(); - if ($dependencyFactory->has('em') && $dependencyFactory->get('em') instanceof EntityManagerHelper) { - return DependencyFactory::fromEntityManager( - $configurations, - new ExistingEntityManager($dependencyFactory->get('em')->getEntityManager()), - ); - } - - throw new RuntimeException(sprintf( - 'Configuration HelperSet returned by "%s" does not have a valid "em" or the "db" helper.', - $configurationFile, - )); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Exception/ConsoleException.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Exception/ConsoleException.php deleted file mode 100644 index 9ee7a9315..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Exception/ConsoleException.php +++ /dev/null @@ -1,11 +0,0 @@ -areMigrationsOrganizedByYear()) { - $dir .= $this->appendDir(date('Y')); - } - - if ($configuration->areMigrationsOrganizedByYearAndMonth()) { - $dir .= $this->appendDir(date('m')); - } - - $this->createDirIfNotExists($dir); - - return $dir; - } - - private function appendDir(string $dir): string - { - return DIRECTORY_SEPARATOR . $dir; - } - - private function createDirIfNotExists(string $dir): void - { - if (file_exists($dir)) { - return; - } - - mkdir($dir, 0755, true); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Helper/MigrationStatusInfosHelper.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Helper/MigrationStatusInfosHelper.php deleted file mode 100644 index d07224dc6..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Helper/MigrationStatusInfosHelper.php +++ /dev/null @@ -1,205 +0,0 @@ -setHeaders( - [ - [new TableCell('Migration Versions', ['colspan' => 4])], - ['Migration', 'Status', 'Migrated At', 'Execution Time', 'Description'], - ], - ); - $executedMigrations = $this->metadataStorage->getExecutedMigrations(); - $availableMigrations = $this->migrationPlanCalculator->getMigrations(); - - foreach ($versions as $version) { - $description = null; - $executedAt = null; - $executionTime = null; - - if ($executedMigrations->hasMigration($version)) { - $executedMigration = $executedMigrations->getMigration($version); - $executionTime = $executedMigration->getExecutionTime(); - $executedAt = $executedMigration->getExecutedAt() instanceof DateTimeInterface - ? $executedMigration->getExecutedAt()->format('Y-m-d H:i:s') - : null; - } - - if ($availableMigrations->hasMigration($version)) { - $description = $availableMigrations->getMigration($version)->getMigration()->getDescription(); - } - - if ($executedMigrations->hasMigration($version) && $availableMigrations->hasMigration($version)) { - $status = 'migrated'; - } elseif ($executedMigrations->hasMigration($version)) { - $status = 'migrated, not available'; - } else { - $status = 'not migrated'; - } - - $table->addRow([ - (string) $version, - $status, - (string) $executedAt, - $executionTime !== null ? $executionTime . 's' : '', - $description, - ]); - } - - $table->render(); - } - - public function showMigrationsInfo(OutputInterface $output): void - { - $executedMigrations = $this->metadataStorage->getExecutedMigrations(); - $availableMigrations = $this->migrationPlanCalculator->getMigrations(); - - $newMigrations = $this->statusCalculator->getNewMigrations(); - $executedUnavailableMigrations = $this->statusCalculator->getExecutedUnavailableMigrations(); - - $storage = $this->configuration->getMetadataStorageConfiguration(); - - $table = new Table($output); - $table->setHeaders( - [ - [new TableCell('Configuration', ['colspan' => 3])], - ], - ); - - $dataGroup = [ - 'Storage' => [ - 'Type' => $storage !== null ? $storage::class : null, - ], - 'Database' => [ - 'Driver' => get_class($this->connection->getDriver()), - 'Name' => $this->connection->getDatabase(), - ], - 'Versions' => [ - 'Previous' => $this->getFormattedVersionAlias('prev', $executedMigrations), - 'Current' => $this->getFormattedVersionAlias('current', $executedMigrations), - 'Next' => $this->getFormattedVersionAlias('next', $executedMigrations), - 'Latest' => $this->getFormattedVersionAlias('latest', $executedMigrations), - ], - - 'Migrations' => [ - 'Executed' => count($executedMigrations), - 'Executed Unavailable' => count($executedUnavailableMigrations) > 0 ? ('' . count($executedUnavailableMigrations) . '') : '0', - 'Available' => count($availableMigrations), - 'New' => count($newMigrations) > 0 ? ('' . count($newMigrations) . '') : '0', - ], - 'Migration Namespaces' => $this->configuration->getMigrationDirectories(), - - ]; - if ($storage instanceof TableMetadataStorageConfiguration) { - $dataGroup['Storage'] += [ - 'Table Name' => $storage->getTableName(), - 'Column Name' => $storage->getVersionColumnName(), - ]; - } - - $first = true; - foreach ($dataGroup as $group => $dataValues) { - $nsRows = []; - foreach ($dataValues as $k => $v) { - $nsRows[] = [ - $k, - $v, - ]; - } - - if (count($nsRows) <= 0) { - continue; - } - - if (! $first) { - $table->addRow([new TableSeparator(['colspan' => 3])]); - } - - $first = false; - array_unshift( - $nsRows[0], - new TableCell('' . $group . '', ['rowspan' => count($dataValues)]), - ); - $table->addRows($nsRows); - } - - $table->render(); - } - - private function getFormattedVersionAlias(string $alias, ExecutedMigrationsList $executedMigrations): string - { - try { - $version = $this->aliasResolver->resolveVersionAlias($alias); - } catch (Throwable) { - $version = null; - } - - // No version found - if ($version === null) { - if ($alias === 'next') { - return 'Already at latest version'; - } - - if ($alias === 'prev') { - return 'Already at first version'; - } - } - - // Before first version "virtual" version number - if ((string) $version === '0') { - return '0'; - } - - // Show normal version number - return sprintf( - '%s ', - (string) $version, - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/MigratorConfigurationFactory.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/MigratorConfigurationFactory.php deleted file mode 100644 index c3452fe77..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/MigratorConfigurationFactory.php +++ /dev/null @@ -1,13 +0,0 @@ -commit(); - } - - public static function rollbackIfInTransaction(Connection $connection): void - { - if (! self::inTransaction($connection)) { - Deprecation::trigger( - 'doctrine/migrations', - 'https://github.com/doctrine/migrations/issues/1169', - <<<'DEPRECATION' -Context: trying to rollback a transaction -Problem: the transaction is already rolled back, relying on silencing is deprecated. -Solution: override `AbstractMigration::isTransactional()` so that it returns false. -Automate that by setting `transactional` to false in the configuration. -More details at https://www.doctrine-project.org/projects/doctrine-migrations/en/stable/explanation/implicit-commits.html -DEPRECATION, - ); - - return; - } - - $connection->rollBack(); - } - - private static function inTransaction(Connection $connection): bool - { - $innermostConnection = self::getInnerConnection($connection); - - /* Attempt to commit or rollback while no transaction is running - results in an exception since PHP 8 + pdo_mysql combination */ - return ! $innermostConnection instanceof PDO || $innermostConnection->inTransaction(); - } - - /** @return object|resource|null */ - private static function getInnerConnection(Connection $connection) - { - try { - return $connection->getNativeConnection(); - } catch (LogicException) { - } - - $innermostConnection = $connection; - while (method_exists($innermostConnection, 'getWrappedConnection')) { - $innermostConnection = $innermostConnection->getWrappedConnection(); - } - - return $innermostConnection; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/AliasResolver.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/AliasResolver.php deleted file mode 100644 index 790580333..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/AliasResolver.php +++ /dev/null @@ -1,28 +0,0 @@ -metadataStorage->getExecutedMigrations(); - $availableMigration = $this->migrationPlanCalculator->getMigrations(); - - return $executedMigrations->unavailableSubset($availableMigration); - } - - public function getNewMigrations(): AvailableMigrationsList - { - $executedMigrations = $this->metadataStorage->getExecutedMigrations(); - $availableMigration = $this->migrationPlanCalculator->getMigrations(); - - return $availableMigration->newSubset($executedMigrations); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DbalExecutor.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DbalExecutor.php deleted file mode 100644 index df177748c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DbalExecutor.php +++ /dev/null @@ -1,322 +0,0 @@ -sql; - } - - public function addSql(Query $sqlQuery): void - { - $this->sql[] = $sqlQuery; - } - - public function execute( - MigrationPlan $plan, - MigratorConfiguration $configuration, - ): ExecutionResult { - $result = new ExecutionResult($plan->getVersion(), $plan->getDirection(), new DateTimeImmutable()); - - $this->startMigration($plan, $configuration); - - try { - $this->executeMigration( - $plan, - $result, - $configuration, - ); - - $result->setSql($this->sql); - } catch (SkipMigration $e) { - $result->setSkipped(true); - - $this->migrationEnd($e, $plan, $result, $configuration); - } catch (Throwable $e) { - $result->setError(true, $e); - - $this->migrationEnd($e, $plan, $result, $configuration); - - throw $e; - } - - return $result; - } - - private function startMigration( - MigrationPlan $plan, - MigratorConfiguration $configuration, - ): void { - $this->sql = []; - - $this->dispatcher->dispatchVersionEvent( - Events::onMigrationsVersionExecuting, - $plan, - $configuration, - ); - - if (! $plan->getMigration()->isTransactional()) { - return; - } - - // only start transaction if in transactional mode - $this->connection->beginTransaction(); - } - - private function executeMigration( - MigrationPlan $plan, - ExecutionResult $result, - MigratorConfiguration $configuration, - ): ExecutionResult { - $stopwatchEvent = $this->stopwatch->start('execute'); - - $migration = $plan->getMigration(); - $direction = $plan->getDirection(); - - $result->setState(State::PRE); - - $fromSchema = $this->getFromSchema($configuration); - - $migration->{'pre' . ucfirst($direction)}($fromSchema); - - $this->logger->info(...$this->getMigrationHeader($plan, $migration, $direction)); - - $result->setState(State::EXEC); - - $toSchema = $this->schemaProvider->createToSchema($fromSchema); - - $result->setToSchema($toSchema); - - $migration->$direction($toSchema); - - foreach ($migration->getSql() as $sqlQuery) { - $this->addSql($sqlQuery); - } - - foreach ($this->schemaProvider->getSqlDiffToMigrate($fromSchema, $toSchema) as $sql) { - $this->addSql(new Query($sql)); - } - - if (count($this->sql) !== 0) { - if (! $configuration->isDryRun()) { - $this->executeResult($configuration); - } else { - foreach ($this->sql as $query) { - $this->outputSqlQuery($query, $configuration); - } - } - } else { - $this->logger->warning('Migration {version} was executed but did not result in any SQL statements.', [ - 'version' => (string) $plan->getVersion(), - ]); - } - - $result->setState(State::POST); - - $migration->{'post' . ucfirst($direction)}($toSchema); - - $stopwatchEvent->stop(); - $periods = $stopwatchEvent->getPeriods(); - $lastPeriod = $periods[count($periods) - 1]; - - $result->setTime((float) $lastPeriod->getDuration() / 1000); - $result->setMemory($lastPeriod->getMemory()); - - $params = [ - 'version' => (string) $plan->getVersion(), - 'time' => $lastPeriod->getDuration(), - 'memory' => BytesFormatter::formatBytes($lastPeriod->getMemory()), - 'direction' => $direction === Direction::UP ? 'migrated' : 'reverted', - ]; - - $this->logger->info('Migration {version} {direction} (took {time}ms, used {memory} memory)', $params); - - if (! $configuration->isDryRun()) { - $this->metadataStorage->complete($result); - } elseif (method_exists($this->metadataStorage, 'getSql')) { - foreach ($this->metadataStorage->getSql($result) as $sqlQuery) { - $this->addSql($sqlQuery); - } - } - - if ($migration->isTransactional()) { - TransactionHelper::commitIfInTransaction($this->connection); - } - - $plan->markAsExecuted($result); - $result->setState(State::NONE); - - $this->dispatcher->dispatchVersionEvent( - Events::onMigrationsVersionExecuted, - $plan, - $configuration, - ); - - return $result; - } - - /** @return mixed[] */ - private function getMigrationHeader(MigrationPlan $planItem, AbstractMigration $migration, string $direction): array - { - $versionInfo = (string) $planItem->getVersion(); - $description = $migration->getDescription(); - - if ($description !== '') { - $versionInfo .= ' (' . $description . ')'; - } - - $params = ['version_name' => $versionInfo]; - - if ($direction === Direction::UP) { - return ['++ migrating {version_name}', $params]; - } - - return ['++ reverting {version_name}', $params]; - } - - private function migrationEnd(Throwable $e, MigrationPlan $plan, ExecutionResult $result, MigratorConfiguration $configuration): void - { - $migration = $plan->getMigration(); - if ($migration->isTransactional()) { - //only rollback transaction if in transactional mode - TransactionHelper::rollbackIfInTransaction($this->connection); - } - - $plan->markAsExecuted($result); - $this->logResult($e, $result, $plan); - - $this->dispatcher->dispatchVersionEvent( - Events::onMigrationsVersionSkipped, - $plan, - $configuration, - ); - } - - private function logResult(Throwable $e, ExecutionResult $result, MigrationPlan $plan): void - { - if ($result->isSkipped()) { - $this->logger->notice( - 'Migration {version} skipped during {state}. Reason: "{reason}"', - [ - 'version' => (string) $plan->getVersion(), - 'reason' => $e->getMessage(), - 'state' => $this->getExecutionStateAsString($result->getState()), - ], - ); - } elseif ($result->hasError()) { - $this->logger->error( - 'Migration {version} failed during {state}. Error: "{error}"', - [ - 'version' => (string) $plan->getVersion(), - 'error' => $e->getMessage(), - 'state' => $this->getExecutionStateAsString($result->getState()), - ], - ); - } - } - - private function executeResult(MigratorConfiguration $configuration): void - { - foreach ($this->sql as $key => $query) { - $this->outputSqlQuery($query, $configuration); - - $stopwatchEvent = $this->stopwatch->start('query'); - // executeQuery() must be used here because $query might return a result set, for instance REPAIR does - $this->connection->executeQuery($query->getStatement(), $query->getParameters(), $query->getTypes()); - $stopwatchEvent->stop(); - - if (! $configuration->getTimeAllQueries()) { - continue; - } - - $this->logger->notice('Query took {duration}ms', [ - 'duration' => $stopwatchEvent->getDuration(), - ]); - } - } - - private function outputSqlQuery(Query $query, MigratorConfiguration $configuration): void - { - $params = $this->parameterFormatter->formatParameters( - $query->getParameters(), - $query->getTypes(), - ); - - $this->logger->log( - $configuration->getTimeAllQueries() ? LogLevel::NOTICE : LogLevel::DEBUG, - '{query} {params}', - [ - 'query' => $query->getStatement(), - 'params' => $params, - ], - ); - } - - private function getFromSchema(MigratorConfiguration $configuration): Schema - { - // if we're in a dry run, use the from Schema instead of reading the schema from the database - if ($configuration->isDryRun() && $configuration->getFromSchema() !== null) { - return $configuration->getFromSchema(); - } - - return $this->schemaProvider->createFromSchema(); - } - - private function getExecutionStateAsString(int $state): string - { - return match ($state) { - State::PRE => 'Pre-Checks', - State::POST => 'Post-Checks', - State::EXEC => 'Execution', - default => 'No State', - }; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DbalMigrationFactory.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DbalMigrationFactory.php deleted file mode 100644 index b1d185186..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DbalMigrationFactory.php +++ /dev/null @@ -1,31 +0,0 @@ -connection, - $this->logger, - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DefaultAliasResolver.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DefaultAliasResolver.php deleted file mode 100644 index 427227eda..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DefaultAliasResolver.php +++ /dev/null @@ -1,115 +0,0 @@ -migrationPlanCalculator->getMigrations(); - $executedMigrations = $this->metadataStorage->getExecutedMigrations(); - - switch ($alias) { - case self::ALIAS_FIRST: - case '0': - return new Version('0'); - - case self::ALIAS_CURRENT: - try { - return $executedMigrations->getLast()->getVersion(); - } catch (NoMigrationsFoundWithCriteria) { - return new Version('0'); - } - - // no break because of return - case self::ALIAS_PREV: - try { - return $executedMigrations->getLast(-1)->getVersion(); - } catch (NoMigrationsFoundWithCriteria) { - return new Version('0'); - } - - // no break because of return - case self::ALIAS_NEXT: - $newMigrations = $this->migrationStatusCalculator->getNewMigrations(); - - try { - return $newMigrations->getFirst()->getVersion(); - } catch (NoMigrationsFoundWithCriteria $e) { - throw NoMigrationsToExecute::new($e); - } - - // no break because of return - case self::ALIAS_LATEST: - try { - return $availableMigrations->getLast()->getVersion(); - } catch (NoMigrationsFoundWithCriteria) { - return $this->resolveVersionAlias(self::ALIAS_CURRENT); - } - - // no break because of return - default: - if ($availableMigrations->hasMigration(new Version($alias))) { - return $availableMigrations->getMigration(new Version($alias))->getVersion(); - } - - if (substr($alias, 0, 7) === self::ALIAS_CURRENT) { - $val = (int) substr($alias, 7); - $targetMigration = null; - if ($val > 0) { - $newMigrations = $this->migrationStatusCalculator->getNewMigrations(); - - return $newMigrations->getFirst($val - 1)->getVersion(); - } - - return $executedMigrations->getLast($val)->getVersion(); - } - } - - throw UnknownMigrationVersion::new($alias); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/Direction.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/Direction.php deleted file mode 100644 index 6fd2dbd34..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/Direction.php +++ /dev/null @@ -1,23 +0,0 @@ -direction; - } - - public function getExecutedAt(): DateTimeImmutable|null - { - return $this->executedAt; - } - - public function setExecutedAt(DateTimeImmutable $executedAt): void - { - $this->executedAt = $executedAt; - } - - public function getVersion(): Version - { - return $this->version; - } - - public function hasSql(): bool - { - return count($this->sql) !== 0; - } - - /** @return Query[] */ - public function getSql(): array - { - return $this->sql; - } - - /** @param Query[] $sql */ - public function setSql(array $sql): void - { - $this->sql = $sql; - } - - public function getTime(): float|null - { - return $this->time; - } - - public function setTime(float $time): void - { - $this->time = $time; - } - - public function getMemory(): float|null - { - return $this->memory; - } - - public function setMemory(float $memory): void - { - $this->memory = $memory; - } - - public function setSkipped(bool $skipped): void - { - $this->skipped = $skipped; - } - - public function isSkipped(): bool - { - return $this->skipped; - } - - public function setError(bool $error, Throwable|null $exception = null): void - { - $this->error = $error; - $this->exception = $exception; - } - - public function hasError(): bool - { - return $this->error; - } - - public function getException(): Throwable|null - { - return $this->exception; - } - - public function setToSchema(Schema $toSchema): void - { - $this->toSchema = $toSchema; - } - - public function getToSchema(): Schema - { - if ($this->toSchema === null) { - throw new RuntimeException('Cannot call getToSchema() when toSchema is null.'); - } - - return $this->toSchema; - } - - public function getState(): int - { - return $this->state; - } - - public function setState(int $state): void - { - $this->state = $state; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/Executor.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/Executor.php deleted file mode 100644 index 646eef1da..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/Executor.php +++ /dev/null @@ -1,21 +0,0 @@ -arrangeMigrationsForDirection($direction, $this->getMigrations()); - $availableMigrations = array_filter( - $migrationsToCheck, - // in_array third parameter is intentionally false to force object to string casting - static fn (AvailableMigration $availableMigration): bool => in_array($availableMigration->getVersion(), $versions, false) - ); - - $planItems = array_map(static fn (AvailableMigration $availableMigration): MigrationPlan => new MigrationPlan($availableMigration->getVersion(), $availableMigration->getMigration(), $direction), $availableMigrations); - - if (count($planItems) !== count($versions)) { - $plannedVersions = array_map(static fn (MigrationPlan $migrationPlan): Version => $migrationPlan->getVersion(), $planItems); - $diff = array_diff($versions, $plannedVersions); - - throw MigrationClassNotFound::new((string) reset($diff)); - } - - return new MigrationPlanList($planItems, $direction); - } - - public function getPlanUntilVersion(Version $to): MigrationPlanList - { - if ((string) $to !== '0' && ! $this->migrationRepository->hasMigration((string) $to)) { - throw MigrationClassNotFound::new((string) $to); - } - - $availableMigrations = $this->getMigrations(); // migrations are sorted at this point - $executedMigrations = $this->metadataStorage->getExecutedMigrations(); - - $direction = $this->findDirection($to, $executedMigrations, $availableMigrations); - - $migrationsToCheck = $this->arrangeMigrationsForDirection($direction, $availableMigrations); - - $toExecute = $this->findMigrationsToExecute($to, $migrationsToCheck, $direction, $executedMigrations); - - return new MigrationPlanList(array_map(static fn (AvailableMigration $migration): MigrationPlan => new MigrationPlan($migration->getVersion(), $migration->getMigration(), $direction), $toExecute), $direction); - } - - public function getMigrations(): AvailableMigrationsList - { - $availableMigrations = $this->migrationRepository->getMigrations()->getItems(); - uasort($availableMigrations, fn (AvailableMigration $a, AvailableMigration $b): int => $this->sorter->compare($a->getVersion(), $b->getVersion())); - - return new AvailableMigrationsList($availableMigrations); - } - - private function findDirection(Version $to, ExecutedMigrationsList $executedMigrations, AvailableMigrationsList $availableMigrations): string - { - if ((string) $to === '0') { - return Direction::DOWN; - } - - foreach ($availableMigrations->getItems() as $availableMigration) { - if ($availableMigration->getVersion()->equals($to)) { - break; - } - - if (! $executedMigrations->hasMigration($availableMigration->getVersion())) { - return Direction::UP; - } - } - - if ($executedMigrations->hasMigration($to) && ! $executedMigrations->getLast()->getVersion()->equals($to)) { - return Direction::DOWN; - } - - return Direction::UP; - } - - /** @return AvailableMigration[] */ - private function arrangeMigrationsForDirection(string $direction, Metadata\AvailableMigrationsList $availableMigrations): array - { - return $direction === Direction::UP ? $availableMigrations->getItems() : array_reverse($availableMigrations->getItems()); - } - - /** - * @param AvailableMigration[] $migrationsToCheck - * - * @return AvailableMigration[] - */ - private function findMigrationsToExecute(Version $to, array $migrationsToCheck, string $direction, ExecutedMigrationsList $executedMigrations): array - { - $toExecute = []; - foreach ($migrationsToCheck as $availableMigration) { - if ($direction === Direction::DOWN && $availableMigration->getVersion()->equals($to)) { - break; - } - - if ($direction === Direction::UP && ! $executedMigrations->hasMigration($availableMigration->getVersion())) { - $toExecute[] = $availableMigration; - } elseif ($direction === Direction::DOWN && $executedMigrations->hasMigration($availableMigration->getVersion())) { - $toExecute[] = $availableMigration; - } - - if ($direction === Direction::UP && $availableMigration->getVersion()->equals($to)) { - break; - } - } - - return $toExecute; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/State.php b/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/State.php deleted file mode 100644 index 4adfa0d76..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/State.php +++ /dev/null @@ -1,35 +0,0 @@ -version; - } - - public function equals(mixed $object): bool - { - return $object instanceof self && $object->version === $this->version; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/LICENSE b/fixtures/symfony_5_local_deps/vendor/doctrine/orm/LICENSE deleted file mode 100644 index f988839f6..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/README.md b/fixtures/symfony_5_local_deps/vendor/doctrine/orm/README.md deleted file mode 100644 index 22aab0538..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/README.md +++ /dev/null @@ -1,32 +0,0 @@ -| [3.0.x][3.0] | [2.18.x][2.18] | [2.17.x][2.17] | -|:----------------:|:----------------:|:----------:| -| [![Build status][3.0 image]][3.0] | [![Build status][2.18 image]][2.18] | [![Build status][2.17 image]][2.17] | -| [![Coverage Status][3.0 coverage image]][3.0 coverage]| [![Coverage Status][2.18 coverage image]][2.18 coverage] | [![Coverage Status][2.17 coverage image]][2.17 coverage] | - -[

🇺🇦 UKRAINE NEEDS YOUR HELP NOW!

](https://www.doctrine-project.org/stop-war.html) - -Doctrine ORM is an object-relational mapper for PHP 7.1+ that provides transparent persistence -for PHP objects. It sits on top of a powerful database abstraction layer (DBAL). One of its key features -is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), -inspired by Hibernate's HQL. This provides developers with a powerful alternative to SQL that maintains flexibility -without requiring unnecessary code duplication. - - -## More resources: - -* [Website](http://www.doctrine-project.org) -* [Documentation](https://www.doctrine-project.org/projects/doctrine-orm/en/stable/index.html) - - - [3.0 image]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml/badge.svg?branch=3.0.x - [3.0]: https://github.com/doctrine/orm/tree/3.0.x - [3.0 coverage image]: https://codecov.io/gh/doctrine/orm/branch/3.0.x/graph/badge.svg - [3.0 coverage]: https://codecov.io/gh/doctrine/orm/branch/3.0.x - [2.18 image]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml/badge.svg?branch=2.18.x - [2.18]: https://github.com/doctrine/orm/tree/2.18.x - [2.18 coverage image]: https://codecov.io/gh/doctrine/orm/branch/2.18.x/graph/badge.svg - [2.18 coverage]: https://codecov.io/gh/doctrine/orm/branch/2.18.x - [2.17 image]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml/badge.svg?branch=2.17.x - [2.17]: https://github.com/doctrine/orm/tree/2.17.x - [2.17 coverage image]: https://codecov.io/gh/doctrine/orm/branch/2.17.x/graph/badge.svg - [2.17 coverage]: https://codecov.io/gh/doctrine/orm/branch/2.17.x diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/SECURITY.md b/fixtures/symfony_5_local_deps/vendor/doctrine/orm/SECURITY.md deleted file mode 100644 index b0e72932b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/SECURITY.md +++ /dev/null @@ -1,17 +0,0 @@ -Security -======== - -The Doctrine library is operating very close to your database and as such needs -to handle and make assumptions about SQL injection vulnerabilities. - -It is vital that you understand how Doctrine approaches security, because -we cannot protect you from SQL injection. - -Please read the documentation chapter on Security in Doctrine DBAL and ORM to -understand the assumptions we make. - -- [DBAL Security Page](https://www.doctrine-project.org/projects/doctrine-dbal/en/stable/reference/security.html) -- [ORM Security Page](https://www.doctrine-project.org/projects/doctrine-orm/en/stable/reference/security.html) - -If you find a Security bug in Doctrine, please follow our -[Security reporting guidelines](https://www.doctrine-project.org/policies/security.html#reporting). diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/UPGRADE.md b/fixtures/symfony_5_local_deps/vendor/doctrine/orm/UPGRADE.md deleted file mode 100644 index df40b151d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/UPGRADE.md +++ /dev/null @@ -1,1561 +0,0 @@ -# Upgrade to 2.17 - -## Deprecate annotations classes for named queries - -The following classes have been deprecated: - -* `Doctrine\ORM\Mapping\NamedNativeQueries` -* `Doctrine\ORM\Mapping\NamedNativeQuery` -* `Doctrine\ORM\Mapping\NamedQueries` -* `Doctrine\ORM\Mapping\NamedQuery` - -## Deprecate `Doctrine\ORM\Query\Exec\AbstractSqlExecutor::_sqlStatements` - -Use `Doctrine\ORM\Query\Exec\AbstractSqlExecutor::sqlStatements` instead. - -## Undeprecate `Doctrine\ORM\Proxy\Autoloader` - -It will be a full-fledged class, no longer extending -`Doctrine\Common\Proxy\Autoloader` in 3.0.x. - -## Deprecated: reliance on the non-optimal defaults that come with the `AUTO` identifier generation strategy - -When the `AUTO` identifier generation strategy was introduced, the best -strategy at the time was selected for each database platform. -A lot of time has passed since then, and with ORM 3.0.0 and DBAL 4.0.0, support -for better strategies will be added. - -Because of that, it is now deprecated to rely on the historical defaults when -they differ from what we will be recommended in the future. - -Instead, you should pick a strategy for each database platform you use, and it -will be used when using `AUTO`. As of now, only PostgreSQL is affected by this. - -It is recommended that PostgreSQL users configure their existing and new -applications to use `SEQUENCE` until `doctrine/dbal` 4.0.0 is released: - -```php -use Doctrine\DBAL\Platforms\PostgreSQLPlatform; -use Doctrine\ORM\Configuration; - -assert($configuration instanceof Configuration); -$configuration->setIdentityGenerationPreferences([ - PostgreSQLPlatform::CLASS => ClassMetadata::GENERATOR_TYPE_SEQUENCE, -]); -``` - -When DBAL 4 is released, `AUTO` will result in `IDENTITY`, and the above -configuration should be removed to migrate to it. - -## Deprecate `EntityManagerInterface::getPartialReference()` - -This method does not have a replacement and will be removed in 3.0. - -## Deprecate not-enabling lazy-ghosts - -Not enabling lazy ghost objects is deprecated. In ORM 3.0, they will be always enabled. -Ensure `Doctrine\ORM\Configuration::setLazyGhostObjectEnabled(true)` is called to enable them. - -# Upgrade to 2.16 - -## Deprecated accepting duplicate IDs in the identity map - -For any given entity class and ID value, there should be only one object instance -representing the entity. - -In https://github.com/doctrine/orm/pull/10785, a check was added that will guard this -in the identity map. The most probable cause for violations of this rule are collisions -of application-provided IDs. - -In ORM 2.16.0, the check was added by throwing an exception. In ORM 2.16.1, this will be -changed to a deprecation notice. ORM 3.0 will make it an exception again. Use -`\Doctrine\ORM\Configuration::setRejectIdCollisionInIdentityMap()` if you want to opt-in -to the new mode. - -## Potential changes to the order in which `INSERT`s are executed - -In https://github.com/doctrine/orm/pull/10547, the commit order computation was improved -to fix a series of bugs where a correct (working) commit order was previously not found. -Also, the new computation may get away with fewer queries being executed: By inserting -referred-to entities first and using their ID values for foreign key fields in subsequent -`INSERT` statements, additional `UPDATE` statements that were previously necessary can be -avoided. - -When using database-provided, auto-incrementing IDs, this may lead to IDs being assigned -to entities in a different order than it was previously the case. - -## Deprecated returning post insert IDs from `EntityPersister::executeInserts()` - -Persisters implementing `\Doctrine\ORM\Persisters\Entity\EntityPersister` should no longer -return an array of post insert IDs from their `::executeInserts()` method. Make the -persister call `Doctrine\ORM\UnitOfWork::assignPostInsertId()` instead. - -## Changing the way how reflection-based mapping drivers report fields, deprecated the "old" mode - -In ORM 3.0, a change will be made regarding how the `AttributeDriver` reports field mappings. -This change is necessary to be able to detect (and reject) some invalid mapping configurations. - -To avoid surprises during 2.x upgrades, the new mode is opt-in. It can be activated on the -`AttributeDriver` and `AnnotationDriver` by setting the `$reportFieldsWhereDeclared` -constructor parameter to `true`. It will cause `MappingException`s to be thrown when invalid -configurations are detected. - -Not enabling the new mode will cause a deprecation notice to be raised. In ORM 3.0, -only the new mode will be available. - -# Upgrade to 2.15 - -## Deprecated configuring `JoinColumn` on the inverse side of one-to-one associations - -For one-to-one associations, the side using the `mappedBy` attribute is the inverse side. -The owning side is the entity with the table containing the foreign key. Using `JoinColumn` -configuration on the _inverse_ side now triggers a deprecation notice and will be an error -in 3.0. - -## Deprecated overriding fields or associations not declared in mapped superclasses - -As stated in the documentation, fields and associations may only be overridden when being inherited -from mapped superclasses. Overriding them for parent entity classes now triggers a deprecation notice -and will be an error in 3.0. - -## Deprecated undeclared entity inheritance - -As soon as an entity class inherits from another entity class, inheritance has to -be declared by adding the appropriate configuration for the root entity. - -## Deprecated stubs for "concrete table inheritance" - -This third way of mapping class inheritance was never implemented. Code stubs are -now deprecated and will be removed in 3.0. - -* `\Doctrine\ORM\Mapping\ClassMetadataInfo::INHERITANCE_TYPE_TABLE_PER_CLASS` constant -* `\Doctrine\ORM\Mapping\ClassMetadataInfo::isInheritanceTypeTablePerClass()` method -* Using `TABLE_PER_CLASS` as the value for the `InheritanceType` attribute or annotation - or in XML configuration files. - -# Upgrade to 2.14 - -## Deprecated `Doctrine\ORM\Persisters\Exception\UnrecognizedField::byName($field)` method. - -Use `Doctrine\ORM\Persisters\Exception\UnrecognizedField::byFullyQualifiedName($className, $field)` instead. - -## Deprecated constants of `Doctrine\ORM\Internal\CommitOrderCalculator` - -The following public constants have been deprecated: - -* `CommitOrderCalculator::NOT_VISITED` -* `CommitOrderCalculator::IN_PROGRESS` -* `CommitOrderCalculator::VISITED` - -These constants were used for internal purposes. Relying on them is discouraged. - -## Deprecated `Doctrine\ORM\Query\AST\InExpression` - -The AST parser will create a `InListExpression` or a `InSubselectExpression` when -encountering an `IN ()` DQL expression instead of a generic `InExpression`. - -As a consequence, `SqlWalker::walkInExpression()` has been deprecated in favor of -`SqlWalker::walkInListExpression()` and `SqlWalker::walkInSubselectExpression()`. - -## Deprecated constructing a `CacheKey` without `$hash` - -The `Doctrine\ORM\Cache\CacheKey` class has an explicit constructor now with -an optional parameter `$hash`. That parameter will become mandatory in 3.0. - -## Deprecated `AttributeDriver::$entityAnnotationClasses` - -If you need to change the behavior of `AttributeDriver::isTransient()`, -override that method instead. - -## Deprecated incomplete schema updates - -Using `orm:schema-tool:update` without passing the `--complete` flag is -deprecated. Use schema asset filtering if you need to preserve assets not -managed by DBAL. - -Likewise, calling `SchemaTool::updateSchema()` or -`SchemaTool::getUpdateSchemaSql()` with a second argument is deprecated. - -## Deprecated annotation mapping driver. - -Please switch to one of the other mapping drivers. Native attributes which PHP -supports since version 8.0 are probably your best option. - -As a consequence, the following methods are deprecated: -- `ORMSetup::createAnnotationMetadataConfiguration` -- `ORMSetup::createDefaultAnnotationDriver` - -The marker interface `Doctrine\ORM\Mapping\Annotation` is deprecated as well. -All annotation/attribute classes implement -`Doctrine\ORM\Mapping\MappingAttribute` now. - -## Deprecated `Doctrine\ORM\Proxy\Proxy` interface. - -Use `Doctrine\Persistence\Proxy` instead to check whether proxies are initialized. - -## Deprecated `Doctrine\ORM\Event\LifecycleEventArgs` class. - -It will be removed in 3.0. Use one of the dedicated event classes instead: - -* `Doctrine\ORM\Event\PrePersistEventArgs` -* `Doctrine\ORM\Event\PreUpdateEventArgs` -* `Doctrine\ORM\Event\PreRemoveEventArgs` -* `Doctrine\ORM\Event\PostPersistEventArgs` -* `Doctrine\ORM\Event\PostUpdateEventArgs` -* `Doctrine\ORM\Event\PostRemoveEventArgs` -* `Doctrine\ORM\Event\PostLoadEventArgs` - -# Upgrade to 2.13 - -## Deprecated `EntityManager::create()` - -The constructor of `EntityManager` is now public and should be used instead of the `create()` method. -However, the constructor expects a `Connection` while `create()` accepted an array with connection parameters. -You can pass that array to DBAL's `Doctrine\DBAL\DriverManager::getConnection()` method to bootstrap the -connection. - -## Deprecated `QueryBuilder` methods and constants. - -1. The `QueryBuilder::getState()` method has been deprecated as the builder state is an internal concern. -2. Relying on the type of the query being built by using `QueryBuilder::getType()` has been deprecated. - If necessary, track the type of the query being built outside of the builder. - -The following `QueryBuilder` constants related to the above methods have been deprecated: - -1. `SELECT`, -2. `DELETE`, -3. `UPDATE`, -4. `STATE_DIRTY`, -5. `STATE_CLEAN`. - -## Deprecated omitting only the alias argument for `QueryBuilder::update` and `QueryBuilder::delete` - -When building an UPDATE or DELETE query and when passing a class/type to the function, the alias argument must not be omitted. - -### Before - -```php -$qb = $em->createQueryBuilder() - ->delete('User u') - ->where('u.id = :user_id') - ->setParameter('user_id', 1); -``` - -### After - -```php -$qb = $em->createQueryBuilder() - ->delete('User', 'u') - ->where('u.id = :user_id') - ->setParameter('user_id', 1); -``` - -## Deprecated using the `IDENTITY` identifier strategy on platform that do not support identity columns - -If identity columns are emulated with sequences on the platform you are using, -you should switch to the `SEQUENCE` strategy. - -## Deprecated passing `null` to `Doctrine\ORM\Query::setFirstResult()` - -`$query->setFirstResult(null);` is equivalent to `$query->setFirstResult(0)`. - -## Deprecated calling setters without arguments - -The following methods will require an argument in 3.0. Pass `null` instead of -omitting the argument. - -* `Doctrine\ORM\Event\OnClassMetadataNotFoundEventArgs::setFoundMetadata()` -* `Doctrine\ORM\AbstractQuery::setHydrationCacheProfile()` -* `Doctrine\ORM\AbstractQuery::setResultCache()` -* `Doctrine\ORM\AbstractQuery::setResultCacheProfile()` - -## Deprecated passing invalid fetch modes to `AbstractQuery::setFetchMode()` - -Calling `AbstractQuery::setFetchMode()` with anything else than -`Doctrine\ORM\Mapping::FETCH_EAGER` results in -`Doctrine\ORM\Mapping::FETCH_LAZY` being used. Relying on that behavior is -deprecated and will result in an exception in 3.0. - -## Deprecated `getEntityManager()` in `Doctrine\ORM\Event\OnClearEventArgs` and `Doctrine\ORM\Event\*FlushEventArgs` - -This method has been deprecated in: - -* `Doctrine\ORM\Event\OnClearEventArgs` -* `Doctrine\ORM\Event\OnFlushEventArgs` -* `Doctrine\ORM\Event\PostFlushEventArgs` -* `Doctrine\ORM\Event\PreFlushEventArgs` - -It will be removed in 3.0. Use `getObjectManager()` instead. - -## Prepare split of output walkers and tree walkers - -In 3.0, `SqlWalker` and its child classes won't implement the `TreeWalker` -interface anymore. Relying on that inheritance is deprecated. - -The following methods of the `TreeWalker` interface have been deprecated: - -* `setQueryComponent()` -* `walkSelectClause()` -* `walkFromClause()` -* `walkFunction()` -* `walkOrderByClause()` -* `walkOrderByItem()` -* `walkHavingClause()` -* `walkJoin()` -* `walkSelectExpression()` -* `walkQuantifiedExpression()` -* `walkSubselect()` -* `walkSubselectFromClause()` -* `walkSimpleSelectClause()` -* `walkSimpleSelectExpression()` -* `walkAggregateExpression()` -* `walkGroupByClause()` -* `walkGroupByItem()` -* `walkDeleteClause()` -* `walkUpdateClause()` -* `walkUpdateItem()` -* `walkWhereClause()` -* `walkConditionalExpression()` -* `walkConditionalTerm()` -* `walkConditionalFactor()` -* `walkConditionalPrimary()` -* `walkExistsExpression()` -* `walkCollectionMemberExpression()` -* `walkEmptyCollectionComparisonExpression()` -* `walkNullComparisonExpression()` -* `walkInExpression()` -* `walkInstanceOfExpression()` -* `walkLiteral()` -* `walkBetweenExpression()` -* `walkLikeExpression()` -* `walkStateFieldPathExpression()` -* `walkComparisonExpression()` -* `walkInputParameter()` -* `walkArithmeticExpression()` -* `walkArithmeticTerm()` -* `walkStringPrimary()` -* `walkArithmeticFactor()` -* `walkSimpleArithmeticExpression()` -* `walkPathExpression()` -* `walkResultVariable()` -* `getExecutor()` - -The following changes have been made to the abstract `TreeWalkerAdapter` class: - -* All implementations of now-deprecated `TreeWalker` methods have been - deprecated as well. -* The method `setQueryComponent()` will become protected in 3.0. Calling it - publicly is deprecated. -* The method `_getQueryComponents()` is deprecated, call `getQueryComponents()` - instead. - -On the `TreeWalkerChain` class, all implementations of now-deprecated -`TreeWalker` methods have been deprecated as well. However, `SqlWalker` is -unaffected by those deprecations and will continue to implement all of those -methods. - -## Deprecated passing `null` to `Doctrine\ORM\Query::setDQL()` - -Doing `$query->setDQL(null);` achieves nothing. - -## Deprecated omitting second argument to `NamingStrategy::joinColumnName` - -When implementing `NamingStrategy`, it is deprecated to implement -`joinColumnName()` with only one argument. - -### Before - -```php -getConfiguration(); --$config->addEntityNamespace('CMS', 'My\App\Cms'); -+use My\App\Cms\CmsUser; - --$entityManager->getRepository('CMS:CmsUser'); -+$entityManager->getRepository(CmsUser::class); -``` - -## Deprecate `AttributeDriver::getReader()` and `AnnotationDriver::getReader()` - -That method was inherited from the abstract `AnnotationDriver` class of -`doctrine/persistence`, and does not seem to serve any purpose. - -## Un-deprecate `Doctrine\ORM\Proxy\Proxy` - -Because no forward-compatible new proxy solution had been implemented yet, the -current proxy mechanism is not considered deprecated anymore for the time -being. This applies to the following interfaces/classes: - -* `Doctrine\ORM\Proxy\Proxy` -* `Doctrine\ORM\Proxy\ProxyFactory` - -These methods have been un-deprecated: - -* `Doctrine\ORM\Configuration::getAutoGenerateProxyClasses()` -* `Doctrine\ORM\Configuration::getProxyDir()` -* `Doctrine\ORM\Configuration::getProxyNamespace()` - -Note that the `Doctrine\ORM\Proxy\Autoloader` remains deprecated and will be removed in 3.0. - -## Deprecate helper methods from `AbstractCollectionPersister` - -The following protected methods of -`Doctrine\ORM\Cache\Persister\Collection\AbstractCollectionPersister` -are not in use anymore and will be removed. - -* `evictCollectionCache()` -* `evictElementCache()` - -## Deprecate `Doctrine\ORM\Query\TreeWalkerChainIterator` - -This class won't have a replacement. - -## Deprecate `OnClearEventArgs::getEntityClass()` and `OnClearEventArgs::clearsAllEntities()` - -These methods will be removed in 3.0 along with the ability to partially clear -the entity manager. - -## Deprecate `Doctrine\ORM\Configuration::newDefaultAnnotationDriver` - -This functionality has been moved to the new `ORMSetup` class. Call -`Doctrine\ORM\ORMSetup::createDefaultAnnotationDriver()` to create -a new annotation driver. - -## Deprecate `Doctrine\ORM\Tools\Setup` - -In our effort to migrate from Doctrine Cache to PSR-6, the `Setup` class which -accepted a Doctrine Cache instance in each method has been deprecated. - -The replacement is `Doctrine\ORM\ORMSetup` which accepts a PSR-6 -cache instead. - -## Deprecate `Doctrine\ORM\Cache\MultiGetRegion` - -The interface will be merged with `Doctrine\ORM\Cache\Region` in 3.0. - -# Upgrade to 2.11 - -## Rename `AbstractIdGenerator::generate()` to `generateId()` - -Implementations of `AbstractIdGenerator` have to override the method -`generateId()` without calling the parent implementation. Not doing so is -deprecated. Calling `generate()` on any `AbstractIdGenerator` implementation -is deprecated. - -## PSR-6-based second level cache - -The second level cache has been reworked to consume a PSR-6 cache. Using a -Doctrine Cache instance is deprecated. - -* `DefaultCacheFactory`: The constructor expects a PSR-6 cache item pool as - second argument now. -* `DefaultMultiGetRegion`: This class is deprecated in favor of `DefaultRegion`. -* `DefaultRegion`: - * The constructor expects a PSR-6 cache item pool as second argument now. - * The protected `$cache` property is deprecated. - * The properties `$name` and `$lifetime` as well as the constant - `REGION_KEY_SEPARATOR` and the method `getCacheEntryKey()` are flagged as - `@internal` now. They all will become `private` in 3.0. - * The method `getCache()` is deprecated without replacement. - -## Deprecated: `Doctrine\ORM\Mapping\Driver\PHPDriver` - -Use `StaticPHPDriver` instead when you want to programmatically configure -entity metadata. - -You can convert mappings with the `orm:convert-mapping` command or more simply -in this case, `include` the metadata file from the `loadMetadata` static method -used by the `StaticPHPDriver`. - -## Deprecated: `Setup::registerAutoloadDirectory()` - -Use Composer's autoloader instead. - -## Deprecated: `AbstractHydrator::hydrateRow()` - -Following the deprecation of the method `AbstractHydrator::iterate()`, the -method `hydrateRow()` has been deprecated as well. - -## Deprecate cache settings inspection - -Doctrine does not provide its own cache implementation anymore and relies on -the PSR-6 standard instead. As a consequence, we cannot determine anymore -whether a given cache adapter is suitable for a production environment. -Because of that, functionality that aims to do so has been deprecated: - -* `Configuration::ensureProductionSettings()` -* the `orm:ensure-production-settings` console command - -# Upgrade to 2.10 - -## BC Break: `UnitOfWork` now relies on SPL object IDs, not hashes - -When calling the following methods, you are now supposed to use the result of -`spl_object_id()`, and not `spl_object_hash()`: -- `UnitOfWork::clearEntityChangeSet()` -- `UnitOfWork::setOriginalEntityProperty()` - -## BC Break: Removed `TABLE` id generator strategy - -The implementation was unfinished for 14 years. -It is now deprecated to rely on: -- `Doctrine\ORM\Id\TableGenerator`; -- `Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_TABLE`; -- `Doctrine\ORM\Mapping\ClassMetadata::$tableGeneratorDefinition`; -- or `Doctrine\ORM\Mapping\ClassMetadata::isIdGeneratorTable()`. - -## New method `Doctrine\ORM\EntityManagerInterface#wrapInTransaction($func)` - -Works the same as `Doctrine\ORM\EntityManagerInterface#transactional()` but returns any value returned from `$func` closure rather than just _non-empty value returned from the closure or true_. - -Because of BC policy, the method does not exist on the interface yet. This is the example of safe usage: - -```php -function foo(EntityManagerInterface $entityManager, callable $func) { - if (method_exists($entityManager, 'wrapInTransaction')) { - return $entityManager->wrapInTransaction($func); - } - - return $entityManager->transactional($func); -} -``` - -`Doctrine\ORM\EntityManagerInterface#transactional()` has been deprecated. - -## Minor BC BREAK: some exception methods have been removed - -The following methods were not in use and are very unlikely to be used by -downstream packages or applications, and were consequently removed: - -- `ORMException::entityMissingForeignAssignedId` -- `ORMException::entityMissingAssignedIdForField` -- `ORMException::invalidFlushMode` - -## Deprecated: database-side UUID generation - -[DB-generated UUIDs are deprecated as of `doctrine/dbal` 2.8][DBAL deprecation]. -As a consequence, using the `UUID` strategy for generating identifiers is deprecated as well. -Furthermore, relying on the following classes and methods is deprecated: - -- `Doctrine\ORM\Id\UuidGenerator` -- `Doctrine\ORM\Mapping\ClassMetadataInfo::isIdentifierUuid()` - -[DBAL deprecation]: https://github.com/doctrine/dbal/pull/3212 - -## Minor BC BREAK: Custom hydrators and `toIterable()` - -The type declaration of the `$stmt` parameter of `AbstractHydrator::toIterable()` has been removed. This change might -break custom hydrator implementations that override this very method. - -Overriding this method is not recommended, which is why the method is documented as `@final` now. - -```diff -- public function toIterable(ResultStatement $stmt, ResultSetMapping $resultSetMapping, array $hints = []): iterable -+ public function toIterable($stmt, ResultSetMapping $resultSetMapping, array $hints = []): iterable -``` - -## Deprecated: Entity Namespace Aliases - -Entity namespace aliases are deprecated, use the magic ::class constant to abbreviate full class names -in EntityManager, EntityRepository and DQL. - -```diff -- $entityManager->find('MyBundle:User', $id); -+ $entityManager->find(User::class, $id); -``` - -# Upgrade to 2.9 - -## Minor BC BREAK: Setup tool needs cache implementation - -With the deprecation of doctrine/cache, the setup tool might no longer work as expected without a different cache -implementation. To work around this: -* Install symfony/cache: `composer require symfony/cache`. This will keep previous behaviour without any changes -* Instantiate caches yourself: to use a different cache implementation, pass a cache instance when calling any - configuration factory in the setup tool: - ```diff - - $config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode, $proxyDir); - + $cache = \Doctrine\Common\Cache\Psr6\DoctrineProvider::wrap($anyPsr6Implementation); - + $config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode, $proxyDir, $cache); - ``` -* As a quick workaround, you can lock the doctrine/cache dependency to work around this: `composer require doctrine/cache ^1.11`. - Note that this is only recommended as a bandaid fix, as future versions of ORM will no longer work with doctrine/cache - 1.11. - -## Deprecated: doctrine/cache for metadata caching - -The `Doctrine\ORM\Configuration#setMetadataCacheImpl()` method is deprecated and should no longer be used. Please use -`Doctrine\ORM\Configuration#setMetadataCache()` with any PSR-6 cache adapter instead. - -## Removed: flushing metadata cache - -To support PSR-6 caches, the `--flush` option for the `orm:clear-cache:metadata` command is ignored. Metadata cache is -now always cleared regardless of the cache adapter being used. - -# Upgrade to 2.8 - -## Minor BC BREAK: Failed commit now throw OptimisticLockException - -Method `Doctrine\ORM\UnitOfWork#commit()` can throw an OptimisticLockException when a commit silently fails and returns false -since `Doctrine\DBAL\Connection#commit()` signature changed from returning void to boolean - -## Deprecated: `Doctrine\ORM\AbstractQuery#iterate()` - -The method `Doctrine\ORM\AbstractQuery#iterate()` is deprecated in favor of `Doctrine\ORM\AbstractQuery#toIterable()`. -Note that `toIterable()` yields results of the query, unlike `iterate()` which yielded each result wrapped into an array. - -# Upgrade to 2.7 - -## Added `Doctrine\ORM\AbstractQuery#enableResultCache()` and `Doctrine\ORM\AbstractQuery#disableResultCache()` methods - -Method `Doctrine\ORM\AbstractQuery#useResultCache()` which could be used for both enabling and disabling the cache -(depending on passed flag) was split into two. - -## Minor BC BREAK: paginator output walkers aren't be called anymore on sub-queries for queries without max results - -To optimize DB interaction, `Doctrine\ORM\Tools\Pagination\Paginator` no longer fetches identifiers to be able to -perform the pagination with join collections when max results isn't set in the query. - -## Minor BC BREAK: tables filtered with `schema_filter` are no longer created - -When generating schema diffs, if a source table is filtered out by a `schema_filter` expression, then a `CREATE TABLE` was -always generated, even if the table already existed. This has been changed in this release and the table will no longer -be created. - -## Deprecated number unaware `Doctrine\ORM\Mapping\UnderscoreNamingStrategy` - -In the last patch of the `v2.6.x` series, we fixed a bug that was not converting names properly when they had numbers -(e.g.: `base64Encoded` was wrongly converted to `base64encoded` instead of `base64_encoded`). - -In order to not break BC we've introduced a way to enable the fixed behavior using a boolean constructor argument. This -argument will be removed in 3.0 and the default behavior will be the fixed one. - -## Deprecated: `Doctrine\ORM\AbstractQuery#useResultCache()` - -Method `Doctrine\ORM\AbstractQuery#useResultCache()` is deprecated because it is split into `enableResultCache()` -and `disableResultCache()`. It will be removed in 3.0. - -## Deprecated code generators and related console commands - -These console commands have been deprecated: - - * `orm:convert-mapping` - * `orm:generate:entities` - * `orm:generate-repositories` - -These classes have been deprecated: - - * `Doctrine\ORM\Tools\EntityGenerator` - * `Doctrine\ORM\Tools\EntityRepositoryGenerator` - -Whole Doctrine\ORM\Tools\Export namespace with all its members have been deprecated as well. - -## Deprecated `Doctrine\ORM\Proxy\Proxy` marker interface - -Proxy objects in Doctrine ORM 3.0 will no longer implement `Doctrine\ORM\Proxy\Proxy` nor -`Doctrine\Persistence\Proxy`: instead, they implement -`ProxyManager\Proxy\GhostObjectInterface`. - -These related classes have been deprecated: - - * `Doctrine\ORM\Proxy\ProxyFactory` - * `Doctrine\ORM\Proxy\Autoloader` - we suggest using the composer autoloader instead - -These methods have been deprecated: - - * `Doctrine\ORM\Configuration#getAutoGenerateProxyClasses()` - * `Doctrine\ORM\Configuration#getProxyDir()` - * `Doctrine\ORM\Configuration#getProxyNamespace()` - -## Deprecated `Doctrine\ORM\Version` - -The `Doctrine\ORM\Version` class is now deprecated and will be removed in Doctrine ORM 3.0: -please refrain from checking the ORM version at runtime or use Composer's [runtime API](https://getcomposer.org/doc/07-runtime.md#knowing-whether-package-x-is-installed-in-version-y). - -## Deprecated `EntityManager#merge()` method - -Merge semantics was a poor fit for the PHP "share-nothing" architecture. -In addition to that, merging caused multiple issues with data integrity -in the managed entity graph, which was constantly spawning more edge-case bugs/scenarios. - -The following API methods were therefore deprecated: - -* `EntityManager#merge()` -* `UnitOfWork#merge()` - -An alternative to `EntityManager#merge()` will not be provided by ORM 3.0, since the merging -semantics should be part of the business domain rather than the persistence domain of an -application. If your application relies heavily on CRUD-alike interactions and/or `PATCH` -restful operations, you should look at alternatives such as [JMSSerializer](https://github.com/schmittjoh/serializer). - -## Extending `EntityManager` is deprecated - -Final keyword will be added to the `EntityManager::class` in Doctrine ORM 3.0 in order to ensure that EntityManager - is not used as valid extension point. Valid extension point should be EntityManagerInterface. - -## Deprecated `EntityManager#clear($entityName)` - -If your code relies on clearing a single entity type via `EntityManager#clear($entityName)`, -the signature has been changed to `EntityManager#clear()`. - -The main reason is that partial clears caused multiple issues with data integrity -in the managed entity graph, which was constantly spawning more edge-case bugs/scenarios. - -## Deprecated `EntityManager#flush($entity)` and `EntityManager#flush($entities)` - -If your code relies on single entity flushing optimisations via -`EntityManager#flush($entity)`, the signature has been changed to -`EntityManager#flush()`. - -Said API was affected by multiple data integrity bugs due to the fact -that change tracking was being restricted upon a subset of the managed -entities. The ORM cannot support committing subsets of the managed -entities while also guaranteeing data integrity, therefore this -utility was removed. - -The `flush()` semantics will remain the same, but the change tracking will be performed -on all entities managed by the unit of work, and not just on the provided -`$entity` or `$entities`, as the parameter is now completely ignored. - -The same applies to `UnitOfWork#commit($entity)`, which will simply be -`UnitOfWork#commit()`. - -If you would still like to perform batching operations over small `UnitOfWork` -instances, it is suggested to follow these paths instead: - - * eagerly use `EntityManager#clear()` in conjunction with a specific second level - cache configuration (see http://docs.doctrine-project.org/projects/doctrine-orm/en/stable/reference/second-level-cache.html) - * use an explicit change tracking policy (see http://docs.doctrine-project.org/projects/doctrine-orm/en/stable/reference/change-tracking-policies.html) - -## Deprecated `YAML` mapping drivers. - -If your code relies on `YamlDriver` or `SimpleYamlDriver`, you **MUST** change to -annotation or XML drivers instead. - -## Deprecated: `Doctrine\ORM\EntityManagerInterface#copy()` - -Method `Doctrine\ORM\EntityManagerInterface#copy()` never got its implementation and is deprecated. -It will be removed in 3.0. - -# Upgrade to 2.6 - -## Added `Doctrine\ORM\EntityRepository::count()` method - -`Doctrine\ORM\EntityRepository::count()` has been added. This new method has different -signature than `Countable::count()` (required parameter) and therefore are not compatible. -If your repository implemented the `Countable` interface, you will have to use -`$repository->count([])` instead and not implement `Countable` interface anymore. - -## Minor BC BREAK: `Doctrine\ORM\Tools\Console\ConsoleRunner` is now final - -Since it's just an utilitarian class and should not be inherited. - -## Minor BC BREAK: removed `Doctrine\ORM\Query\QueryException::associationPathInverseSideNotSupported()` - -Method `Doctrine\ORM\Query\QueryException::associationPathInverseSideNotSupported()` -now has a required parameter `$pathExpr`. - -## Minor BC BREAK: removed `Doctrine\ORM\Query\Parser#isInternalFunction()` - -Method `Doctrine\ORM\Query\Parser#isInternalFunction()` was removed because -the distinction between internal function and user defined DQL was removed. -[#6500](https://github.com/doctrine/orm/pull/6500) - -## Minor BC BREAK: removed `Doctrine\ORM\ORMException#overwriteInternalDQLFunctionNotAllowed()` - -Method `Doctrine\ORM\Query\Parser#overwriteInternalDQLFunctionNotAllowed()` was -removed because of the choice to allow users to overwrite internal functions, ie -`AVG`, `SUM`, `COUNT`, `MIN` and `MAX`. [#6500](https://github.com/doctrine/orm/pull/6500) - -## PHP 7.1 is now required - -Doctrine 2.6 now requires PHP 7.1 or newer. - -As a consequence, automatic cache setup in Doctrine\ORM\Tools\Setup::create*Configuration() was changed: -- APCu extension (ext-apcu) will now be used instead of abandoned APC (ext-apc). -- Memcached extension (ext-memcached) will be used instead of obsolete Memcache (ext-memcache). -- XCache support was dropped as it doesn't work with PHP 7. - -# Upgrade to 2.5 - -## Minor BC BREAK: removed `Doctrine\ORM\Query\SqlWalker#walkCaseExpression()` - -Method `Doctrine\ORM\Query\SqlWalker#walkCaseExpression()` was unused and part -of the internal API of the ORM, so it was removed. [#5600](https://github.com/doctrine/orm/pull/5600). - -## Minor BC BREAK: removed $className parameter on `AbstractEntityInheritancePersister#getSelectJoinColumnSQL()` - -As `$className` parameter was not used in the method, it was safely removed. - -## Minor BC BREAK: query cache key time is now a float - -As of 2.5.5, the `QueryCacheEntry#time` property will contain a float value -instead of an integer in order to have more precision and also to be consistent -with the `TimestampCacheEntry#time`. - -## Minor BC BREAK: discriminator map must now include all non-transient classes - -It is now required that you declare the root of an inheritance in the -discriminator map. - -When declaring an inheritance map, it was previously possible to skip the root -of the inheritance in the discriminator map. This was actually a validation -mistake by Doctrine2 and led to problems when trying to persist instances of -that class. - -If you don't plan to persist instances some classes in your inheritance, then -either: - - - make those classes `abstract` - - map those classes as `MappedSuperclass` - -## Minor BC BREAK: ``EntityManagerInterface`` instead of ``EntityManager`` in type-hints - -As of 2.5, classes requiring the ``EntityManager`` in any method signature will now require -an ``EntityManagerInterface`` instead. -If you are extending any of the following classes, then you need to check following -signatures: - -- ``Doctrine\ORM\Tools\DebugUnitOfWorkListener#dumpIdentityMap(EntityManagerInterface $em)`` -- ``Doctrine\ORM\Mapping\ClassMetadataFactory#setEntityManager(EntityManagerInterface $em)`` - -## Minor BC BREAK: Custom Hydrators API change - -As of 2.5, `AbstractHydrator` does not enforce the usage of cache as part of -API, and now provides you a clean API for column information through the method -`hydrateColumnInfo($column)`. -Cache variable being passed around by reference is no longer needed since -Hydrators are per query instantiated since Doctrine 2.4. - -## Minor BC BREAK: Entity based ``EntityManager#clear()`` calls follow cascade detach - -Whenever ``EntityManager#clear()`` method gets called with a given entity class -name, until 2.4, it was only detaching the specific requested entity. -As of 2.5, ``EntityManager`` will follow configured cascades, providing a better -memory management since associations will be garbage collected, optimizing -resources consumption on long running jobs. - -## BC BREAK: NamingStrategy interface changes - -1. A new method ``embeddedFieldToColumnName($propertyName, $embeddedColumnName)`` - -This method generates the column name for fields of embedded objects. If you implement your custom NamingStrategy, you -now also need to implement this new method. - -2. A change to method ``joinColumnName()`` to include the $className - -## Updates on entities scheduled for deletion are no longer processed - -In Doctrine 2.4, if you modified properties of an entity scheduled for deletion, UnitOfWork would -produce an UPDATE statement to be executed right before the DELETE statement. The entity in question -was therefore present in ``UnitOfWork#entityUpdates``, which means that ``preUpdate`` and ``postUpdate`` -listeners were (quite pointlessly) called. In ``preFlush`` listeners, it used to be possible to undo -the scheduled deletion for updated entities (by calling ``persist()`` if the entity was found in both -``entityUpdates`` and ``entityDeletions``). This does not work any longer, because the entire changeset -calculation logic is optimized away. - -## Minor BC BREAK: Default lock mode changed from LockMode::NONE to null in method signatures - -A misconception concerning default lock mode values in method signatures lead to unexpected behaviour -in SQL statements on SQL Server. With a default lock mode of ``LockMode::NONE`` throughout the -method signatures in ORM, the table lock hint ``WITH (NOLOCK)`` was appended to all locking related -queries by default. This could result in unpredictable results because an explicit ``WITH (NOLOCK)`` -table hint tells SQL Server to run a specific query in transaction isolation level READ UNCOMMITTED -instead of the default READ COMMITTED transaction isolation level. -Therefore there now is a distinction between ``LockMode::NONE`` and ``null`` to be able to tell -Doctrine whether to add table lock hints to queries by intention or not. To achieve this, the following -method signatures have been changed to declare ``$lockMode = null`` instead of ``$lockMode = LockMode::NONE``: - -- ``Doctrine\ORM\Cache\Persister\AbstractEntityPersister#getSelectSQL()`` -- ``Doctrine\ORM\Cache\Persister\AbstractEntityPersister#load()`` -- ``Doctrine\ORM\Cache\Persister\AbstractEntityPersister#refresh()`` -- ``Doctrine\ORM\Decorator\EntityManagerDecorator#find()`` -- ``Doctrine\ORM\EntityManager#find()`` -- ``Doctrine\ORM\EntityRepository#find()`` -- ``Doctrine\ORM\Persisters\BasicEntityPersister#getSelectSQL()`` -- ``Doctrine\ORM\Persisters\BasicEntityPersister#load()`` -- ``Doctrine\ORM\Persisters\BasicEntityPersister#refresh()`` -- ``Doctrine\ORM\Persisters\EntityPersister#getSelectSQL()`` -- ``Doctrine\ORM\Persisters\EntityPersister#load()`` -- ``Doctrine\ORM\Persisters\EntityPersister#refresh()`` -- ``Doctrine\ORM\Persisters\JoinedSubclassPersister#getSelectSQL()`` - -You should update signatures for these methods if you have subclassed one of the above classes. -Please also check the calling code of these methods in your application and update if necessary. - -**Note:** -This in fact is really a minor BC BREAK and should not have any affect on database vendors -other than SQL Server because it is the only one that supports and therefore cares about -``LockMode::NONE``. It's really just a FIX for SQL Server environments using ORM. - -## Minor BC BREAK: `__clone` method not called anymore when entities are instantiated via metadata API - -As of PHP 5.6, instantiation of new entities is deferred to the -[`doctrine/instantiator`](https://github.com/doctrine/instantiator) library, which will avoid calling `__clone` -or any public API on instantiated objects. - -## BC BREAK: `Doctrine\ORM\Repository\DefaultRepositoryFactory` is now `final` - -Please implement the `Doctrine\ORM\Repository\RepositoryFactory` interface instead of extending -the `Doctrine\ORM\Repository\DefaultRepositoryFactory`. - -## BC BREAK: New object expression DQL queries now respects user provided aliasing and not return consumed fields - -When executing DQL queries with new object expressions, instead of returning DTOs numerically indexes, it will now respect user provided aliases. Consider the following query: - - SELECT new UserDTO(u.id,u.name) as user,new AddressDTO(a.street,a.postalCode) as address, a.id as addressId FROM User u INNER JOIN u.addresses a WITH a.isPrimary = true - -Previously, your result would be similar to this: - - array( - 0=>array( - 0=>{UserDTO object}, - 1=>{AddressDTO object}, - 2=>{u.id scalar}, - 3=>{u.name scalar}, - 4=>{a.street scalar}, - 5=>{a.postalCode scalar}, - 'addressId'=>{a.id scalar}, - ), - ... - ) - -From now on, the resultset will look like this: - - array( - 0=>array( - 'user'=>{UserDTO object}, - 'address'=>{AddressDTO object}, - 'addressId'=>{a.id scalar} - ), - ... - ) - -## Minor BC BREAK: added second parameter $indexBy in EntityRepository#createQueryBuilder method signature - -Added way to access the underlying QueryBuilder#from() method's 'indexBy' parameter when using EntityRepository#createQueryBuilder() - -# Upgrade to 2.4 - -## BC BREAK: Compatibility Bugfix in PersistentCollection#matching() - -In Doctrine 2.3 it was possible to use the new ``matching($criteria)`` -functionality by adding constraints for assocations based on ID: - - Criteria::expr()->eq('association', $assocation->getId()); - -This functionality does not work on InMemory collections however, because -in memory criteria compares object values based on reference. -As of 2.4 the above code will throw an exception. You need to change -offending code to pass the ``$assocation`` reference directly: - - Criteria::expr()->eq('association', $assocation); - -## Composer is now the default autoloader - -The test suite now runs with composer autoloading. Support for PEAR, and tarball autoloading is deprecated. -Support for GIT submodules is removed. - -## OnFlush and PostFlush event always called - -Before 2.4 the postFlush and onFlush events were only called when there were -actually entities that changed. Now these events are called no matter if there -are entities in the UoW or changes are found. - -## Parenthesis are now considered in arithmetic expression - -Before 2.4 parenthesis are not considered in arithmetic primary expression. -That's conceptually wrong, since it might result in wrong values. For example: - -The DQL: - - SELECT 100 / ( 2 * 2 ) FROM MyEntity - -Before 2.4 it generates the SQL: - - SELECT 100 / 2 * 2 FROM my_entity - -Now parenthesis are considered, the previous DQL will generate: - - SELECT 100 / (2 * 2) FROM my_entity - -# Upgrade to 2.3 - -## Auto Discriminator Map breaks userland implementations with Listener - -The new feature to detect discriminator maps automatically when none -are provided breaks userland implementations doing this with a -listener in ``loadClassMetadata`` event. - -## EntityManager#find() not calls EntityRepository#find() anymore - -Previous to 2.3, calling ``EntityManager#find()`` would be delegated to -``EntityRepository#find()``. This has lead to some unexpected behavior in the -core of Doctrine when people have overwritten the find method in their -repositories. That is why this behavior has been reversed in 2.3, and -``EntityRepository#find()`` calls ``EntityManager#find()`` instead. - -## EntityGenerator add*() method generation - -When generating an add*() method for a collection the EntityGenerator will now not -use the Type-Hint to get the singular for the collection name, but use the field-name -and strip a trailing "s" character if there is one. - -## Merge copies non persisted properties too - -When merging an entity in UoW not only mapped properties are copied, but also others. - -## Query, QueryBuilder and NativeQuery parameters *BC break* - -From now on, parameters in queries is an ArrayCollection instead of a simple array. -This affects heavily the usage of setParameters(), because it will not append anymore -parameters to query, but will actually override the already defined ones. -Whenever you are retrieving a parameter (ie. $query->getParameter(1)), you will -receive an instance of Query\Parameter, which contains the methods "getName", -"getValue" and "getType". Parameters are also only converted to when necessary, and -not when they are set. - -Also, related functions were affected: - -* execute($parameters, $hydrationMode) the argument $parameters can be either an key=>value array or an ArrayCollection instance -* iterate($parameters, $hydrationMode) the argument $parameters can be either an key=>value array or an ArrayCollection instance -* setParameters($parameters) the argument $parameters can be either an key=>value array or an ArrayCollection instance -* getParameters() now returns ArrayCollection instead of array -* getParameter($key) now returns Parameter instance instead of parameter value - -## Query TreeWalker method renamed - -Internal changes were made to DQL and SQL generation. If you have implemented your own TreeWalker, -you probably need to update it. The method walkJoinVariableDeclaration is now named walkJoin. - -## New methods in TreeWalker interface *BC break* - -Two methods getQueryComponents() and setQueryComponent() were added to the TreeWalker interface and all its implementations -including TreeWalkerAdapter, TreeWalkerChain and SqlWalker. If you have your own implementation not inheriting from one of the -above you must implement these new methods. - -## Metadata Drivers - -Metadata drivers have been rewritten to reuse code from `Doctrine\Persistence`. Anyone who is using the -`Doctrine\ORM\Mapping\Driver\Driver` interface should instead refer to -`Doctrine\Persistence\Mapping\Driver\MappingDriver`. Same applies to -`Doctrine\ORM\Mapping\Driver\AbstractFileDriver`: you should now refer to -`Doctrine\Persistence\Mapping\Driver\FileDriver`. - -Also, following mapping drivers have been deprecated, please use their replacements in Doctrine\Common as listed: - - * `Doctrine\ORM\Mapping\Driver\DriverChain` => `Doctrine\Persistence\Mapping\Driver\MappingDriverChain` - * `Doctrine\ORM\Mapping\Driver\PHPDriver` => `Doctrine\Persistence\Mapping\Driver\PHPDriver` - * `Doctrine\ORM\Mapping\Driver\StaticPHPDriver` => `Doctrine\Persistence\Mapping\Driver\StaticPHPDriver` - -# Upgrade to 2.2 - -## ResultCache implementation rewritten - -The result cache is completely rewritten and now works on the database result level, not inside the ORM AbstractQuery -anymore. This means that for result cached queries the hydration will now always be performed again, regardless of -the hydration mode. Affected areas are: - -1. Fixes the problem that entities coming from the result cache were not registered in the UnitOfWork - leading to problems during EntityManager#flush. Calls to EntityManager#merge are not necessary anymore. -2. Affects the array hydrator which now includes the overhead of hydration compared to caching the final result. - -The API is backwards compatible however most of the getter methods on the `AbstractQuery` object are now -deprecated in favor of calling AbstractQuery#getQueryCacheProfile(). This method returns a `Doctrine\DBAL\Cache\QueryCacheProfile` -instance with access to result cache driver, lifetime and cache key. - - -## EntityManager#getPartialReference() creates read-only entity - -Entities returned from EntityManager#getPartialReference() are now marked as read-only if they -haven't been in the identity map before. This means objects of this kind never lead to changes -in the UnitOfWork. - - -## Fields omitted in a partial DQL query or a native query are never updated - -Fields of an entity that are not returned from a partial DQL Query or native SQL query -will never be updated through an UPDATE statement. - - -## Removed support for onUpdate in @JoinColumn - -The onUpdate foreign key handling makes absolutely no sense in an ORM. Additionally Oracle doesn't even support it. Support for it is removed. - - -## Changes in Annotation Handling - -There have been some changes to the annotation handling in Common 2.2 again, that affect how people with old configurations -from 2.0 have to configure the annotation driver if they don't use `Configuration::newDefaultAnnotationDriver()`: - - // Register the ORM Annotations in the AnnotationRegistry - AnnotationRegistry::registerFile('path/to/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'); - - $reader = new \Doctrine\Common\Annotations\SimpleAnnotationReader(); - $reader->addNamespace('Doctrine\ORM\Mapping'); - $reader = new \Doctrine\Common\Annotations\CachedReader($reader, new ArrayCache()); - - $driver = new AnnotationDriver($reader, (array)$paths); - - $config->setMetadataDriverImpl($driver); - - -## Scalar mappings can now be omitted from DQL result - -You are now allowed to mark scalar SELECT expressions as HIDDEN an they are not hydrated anymore. -Example: - -SELECT u, SUM(a.id) AS HIDDEN numArticles FROM User u LEFT JOIN u.Articles a ORDER BY numArticles DESC HAVING numArticles > 10 - -Your result will be a collection of Users, and not an array with key 0 as User object instance and "numArticles" as the number of articles per user - - -## Map entities as scalars in DQL result - -When hydrating to array or even a mixed result in object hydrator, previously you had the 0 index holding you entity instance. -You are now allowed to alias this, providing more flexibility for you code. -Example: - -SELECT u AS user FROM User u - -Will now return a collection of arrays with index "user" pointing to the User object instance. - - -## Performance optimizations - -Thousands of lines were completely reviewed and optimized for best performance. -Removed redundancy and improved code readability made now internal Doctrine code easier to understand. -Also, Doctrine 2.2 now is around 10-15% faster than 2.1. - -## EntityManager#find(null) - -Previously EntityManager#find(null) returned null. It now throws an exception. - -# Upgrade to 2.1 - -## Interface for EntityRepository - -The EntityRepository now has an interface Doctrine\Persistence\ObjectRepository. This means that your classes that override EntityRepository and extend find(), findOneBy() or findBy() must be adjusted to follow this interface. - -## AnnotationReader changes - -The annotation reader was heavily refactored between 2.0 and 2.1-RC1. In theory the operation of the new reader should be backwards compatible, but it has to be setup differently to work that way: - - // new call to the AnnotationRegistry - \Doctrine\Common\Annotations\AnnotationRegistry::registerFile('/doctrine-src/src/Mapping/Driver/DoctrineAnnotations.php'); - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - $reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\'); - // new code necessary starting here - $reader->setIgnoreNotImportedAnnotations(true); - $reader->setEnableParsePhpImports(false); - $reader = new \Doctrine\Common\Annotations\CachedReader( - new \Doctrine\Common\Annotations\IndexedReader($reader), new ArrayCache() - ); - -This is already done inside the ``$config->newDefaultAnnotationDriver``, so everything should automatically work if you are using this method. You can verify if everything still works by executing a console command such as schema-validate that loads all metadata into memory. - -# Update from 2.0-BETA3 to 2.0-BETA4 - -## XML Driver element demoted to attribute - -We changed how the XML Driver allows to define the change-tracking-policy. The working case is now: - - - -# Update from 2.0-BETA2 to 2.0-BETA3 - -## Serialization of Uninitialized Proxies - -As of Beta3 you can now serialize uninitialized proxies, an exception will only be thrown when -trying to access methods on the unserialized proxy as long as it has not been re-attached to the -EntityManager using `EntityManager#merge()`. See this example: - - $proxy = $em->getReference('User', 1); - - $serializedProxy = serialize($proxy); - $detachedProxy = unserialized($serializedProxy); - - echo $em->contains($detachedProxy); // FALSE - - try { - $detachedProxy->getId(); // uninitialized detached proxy - } catch(Exception $e) { - - } - $attachedProxy = $em->merge($detachedProxy); - echo $attackedProxy->getId(); // works! - -## Changed SQL implementation of Postgres and Oracle DateTime types - -The DBAL Type "datetime" included the Timezone Offset in both Postgres and Oracle. As of this version they are now -generated without Timezone (TIMESTAMP WITHOUT TIME ZONE instead of TIMESTAMP WITH TIME ZONE). -See [this comment to Ticket DBAL-22](http://www.doctrine-project.org/jira/browse/DBAL-22?focusedCommentId=13396&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_13396) -for more details as well as migration issues for PostgreSQL and Oracle. - -Both Postgres and Oracle will throw Exceptions during hydration of Objects with "DateTime" fields unless migration steps are taken! - -## Removed multi-dot/deep-path expressions in DQL - -The support for implicit joins in DQL through the multi-dot/Deep Path Expressions -was dropped. For example: - - SELECT u FROM User u WHERE u.group.name = ?1 - -See the "u.group.id" here is using multi dots (deep expression) to walk -through the graph of objects and properties. Internally the DQL parser -would rewrite these queries to: - - SELECT u FROM User u JOIN u.group g WHERE g.name = ?1 - -This explicit notation will be the only supported notation as of now. The internal -handling of multi-dots in the DQL Parser was very complex, error prone in edge cases -and required special treatment for several features we added. Additionally -it had edge cases that could not be solved without making the DQL Parser -even much more complex. For this reason we will drop the support for the -deep path expressions to increase maintainability and overall performance -of the DQL parsing process. This will benefit any DQL query being parsed, -even those not using deep path expressions. - -Note that the generated SQL of both notations is exactly the same! You -don't loose anything through this. - -## Default Allocation Size for Sequences - -The default allocation size for sequences has been changed from 10 to 1. This step was made -to not cause confusion with users and also because it is partly some kind of premature optimization. - -# Update from 2.0-BETA1 to 2.0-BETA2 - -There are no backwards incompatible changes in this release. - -# Upgrade from 2.0-ALPHA4 to 2.0-BETA1 - -## EntityRepository deprecates access to protected variables - -Instead of accessing protected variables for the EntityManager in -a custom EntityRepository it is now required to use the getter methods -for all the three instance variables: - -* `$this->_em` now accessible through `$this->getEntityManager()` -* `$this->_class` now accessible through `$this->getClassMetadata()` -* `$this->_entityName` now accessible through `$this->getEntityName()` - -Important: For Beta 2 the protected visibility of these three properties will be -changed to private! - -## Console migrated to Symfony Console - -The Doctrine CLI has been replaced by Symfony Console Configuration - -Instead of having to specify: - - [php] - $cliConfig = new CliConfiguration(); - $cliConfig->setAttribute('em', $entityManager); - -You now have to configure the script like: - - [php] - $helperSet = new \Symfony\Components\Console\Helper\HelperSet(array( - 'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()), - 'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em) - )); - -## Console: No need for Mapping Paths anymore - -In previous versions you had to specify the --from and --from-path options -to show where your mapping paths are from the console. However this information -is already known from the Mapping Driver configuration, so the requirement -for this options were dropped. - -Instead for each console command all the entities are loaded and to -restrict the operation to one or more sub-groups you can use the --filter flag. - -## AnnotationDriver is not a default mapping driver anymore - -In conjunction with the recent changes to Console we realized that the -annotations driver being a default metadata driver lead to lots of glue -code in the console components to detect where entities lie and how to load -them for batch updates like SchemaTool and other commands. However the -annotations driver being a default driver does not really help that much -anyways. - -Therefore we decided to break backwards compatibility in this issue and drop -the support for Annotations as Default Driver and require our users to -specify the driver explicitly (which allows us to ask for the path to all -entities). - -If you are using the annotations metadata driver as default driver, you -have to add the following lines to your bootstrap code: - - $driverImpl = $config->newDefaultAnnotationDriver(array(__DIR__."/Entities")); - $config->setMetadataDriverImpl($driverImpl); - -You have to specify the path to your entities as either string of a single -path or array of multiple paths -to your entities. This information will be used by all console commands to -access all entities. - -Xml and Yaml Drivers work as before! - - -## New inversedBy attribute - -It is now *mandatory* that the owning side of a bidirectional association specifies the -'inversedBy' attribute that points to the name of the field on the inverse side that completes -the association. Example: - - [php] - // BEFORE (ALPHA4 AND EARLIER) - class User - { - //... - /** @OneToOne(targetEntity="Address", mappedBy="user") */ - private $address; - //... - } - class Address - { - //... - /** @OneToOne(targetEntity="User") */ - private $user; - //... - } - - // SINCE BETA1 - // User class DOES NOT CHANGE - class Address - { - //... - /** @OneToOne(targetEntity="User", inversedBy="address") */ - private $user; - //... - } - -Thus, the inversedBy attribute is the counterpart to the mappedBy attribute. This change -was necessary to enable some simplifications and further performance improvements. We -apologize for the inconvenience. - -## Default Property for Field Mappings - -The "default" option for database column defaults has been removed. If desired, database column defaults can -be implemented by using the columnDefinition attribute of the @Column annotation (or the appropriate XML and YAML equivalents). -Prefer PHP default values, if possible. - -## Selecting Partial Objects - -Querying for partial objects now has a new syntax. The old syntax to query for partial objects -now has a different meaning. This is best illustrated by an example. If you previously -had a DQL query like this: - - [sql] - SELECT u.id, u.name FROM User u - -Since BETA1, simple state field path expressions in the select clause are used to select -object fields as plain scalar values (something that was not possible before). -To achieve the same result as previously (that is, a partial object with only id and name populated) -you need to use the following, explicit syntax: - - [sql] - SELECT PARTIAL u.{id,name} FROM User u - -## XML Mapping Driver - -The 'inheritance-type' attribute changed to take last bit of ClassMetadata constant names, i.e. -NONE, SINGLE_TABLE, INHERITANCE_TYPE_JOINED - -## YAML Mapping Driver - -The way to specify lifecycle callbacks in YAML Mapping driver was changed to allow for multiple callbacks -per event. The Old syntax ways: - - [yaml] - lifecycleCallbacks: - doStuffOnPrePersist: prePersist - doStuffOnPostPersist: postPersist - -The new syntax is: - - [yaml] - lifecycleCallbacks: - prePersist: [ doStuffOnPrePersist, doOtherStuffOnPrePersistToo ] - postPersist: [ doStuffOnPostPersist ] - -## PreUpdate Event Listeners - -Event Listeners listening to the 'preUpdate' event can only affect the primitive values of entity changesets -by using the API on the `PreUpdateEventArgs` instance passed to the preUpdate listener method. Any changes -to the state of the entitys properties won't affect the database UPDATE statement anymore. This gives drastic -performance benefits for the preUpdate event. - -## Collection API - -The Collection interface in the Common package has been updated with some missing methods -that were present only on the default implementation, ArrayCollection. Custom collection -implementations need to be updated to adhere to the updated interface. - -# Upgrade from 2.0-ALPHA3 to 2.0-ALPHA4 - -## CLI Controller changes - -CLI main object changed its name and namespace. Renamed from Doctrine\ORM\Tools\Cli to Doctrine\Common\Cli\CliController. -Doctrine\Common\Cli\CliController now only deals with namespaces. Ready to go, Core, Dbal and Orm are available and you can subscribe new tasks by retrieving the namespace and including new task. Example: - - [php] - $cli->getNamespace('Core')->addTask('my-example', '\MyProject\Tools\Cli\Tasks\MyExampleTask'); - - -## CLI Tasks documentation - -Tasks have implemented a new way to build documentation. Although it is still possible to define the help manually by extending the basicHelp and extendedHelp, they are now optional. -With new required method AbstractTask::buildDocumentation, its implementation defines the TaskDocumentation instance (accessible through AbstractTask::getDocumentation()), basicHelp and extendedHelp are now not necessary to be implemented. - -## Changes in Method Signatures - - * A bunch of Methods on both Doctrine\DBAL\Platforms\AbstractPlatform and Doctrine\DBAL\Schema\AbstractSchemaManager - have changed quite significantly by adopting the new Schema instance objects. - -## Renamed Methods - - * Doctrine\ORM\AbstractQuery::setExpireResultCache() -> expireResultCache() - * Doctrine\ORM\Query::setExpireQueryCache() -> expireQueryCache() - -## SchemaTool Changes - - * "doctrine schema-tool --drop" now always drops the complete database instead of - only those tables defined by the current database model. The previous method had - problems when foreign keys of orphaned tables pointed to tables that were scheduled - for deletion. - * Use "doctrine schema-tool --update" to get a save incremental update for your - database schema without deleting any unused tables, sequences or foreign keys. - * Use "doctrine schema-tool --complete-update" to do a full incremental update of - your schema. -# Upgrade from 2.0-ALPHA2 to 2.0-ALPHA3 - -This section details the changes made to Doctrine 2.0-ALPHA3 to make it easier for you -to upgrade your projects to use this version. - -## CLI Changes - -The $args variable used in the cli-config.php for configuring the Doctrine CLI has been renamed to $globalArguments. - -## Proxy class changes - -You are now required to make supply some minimalist configuration with regards to proxy objects. That involves 2 new configuration options. First, the directory where generated proxy classes should be placed needs to be specified. Secondly, you need to configure the namespace used for proxy classes. The following snippet shows an example: - - [php] - // step 1: configure directory for proxy classes - // $config instanceof Doctrine\ORM\Configuration - $config->setProxyDir('/path/to/myproject/lib/MyProject/Generated/Proxies'); - $config->setProxyNamespace('MyProject\Generated\Proxies'); - -Note that proxy classes behave exactly like any other classes when it comes to class loading. Therefore you need to make sure the proxy classes can be loaded by some class loader. If you place the generated proxy classes in a namespace and directory under your projects class files, like in the example above, it would be sufficient to register the MyProject namespace on a class loader. Since the proxy classes are contained in that namespace and adhere to the standards for class loading, no additional work is required. -Generating the proxy classes into a namespace within your class library is the recommended setup. - -Entities with initialized proxy objects can now be serialized and unserialized properly from within the same application. - -For more details refer to the Configuration section of the manual. - -## Removed allowPartialObjects configuration option - -The allowPartialObjects configuration option together with the `Configuration#getAllowPartialObjects` and `Configuration#setAllowPartialObjects` methods have been removed. -The new behavior is as if the option were set to FALSE all the time, basically disallowing partial objects globally. However, you can still use the `Query::HINT_FORCE_PARTIAL_LOAD` query hint to force a query to return partial objects for optimization purposes. - -## Renamed Methods - -* Doctrine\ORM\Configuration#getCacheDir() to getProxyDir() -* Doctrine\ORM\Configuration#setCacheDir($dir) to setProxyDir($dir) diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/bin/doctrine b/fixtures/symfony_5_local_deps/vendor/doctrine/orm/bin/doctrine deleted file mode 100755 index 83d380429..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/bin/doctrine +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env php -register(); - -$classLoader = new \Doctrine\Common\ClassLoader('Symfony'); -$classLoader->register(); - -$configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php'; - -$helperSet = null; -if (file_exists($configFile)) { - if ( ! is_readable($configFile)) { - trigger_error( - 'Configuration file [' . $configFile . '] does not have read permission.', E_USER_ERROR - ); - } - - require $configFile; - - foreach ($GLOBALS as $helperSetCandidate) { - if ($helperSetCandidate instanceof \Symfony\Component\Console\Helper\HelperSet) { - $helperSet = $helperSetCandidate; - break; - } - } -} - -$helperSet = ($helperSet) ?: new \Symfony\Component\Console\Helper\HelperSet(); - -\Doctrine\ORM\Tools\Console\ConsoleRunner::run($helperSet); diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/bin/doctrine.bat b/fixtures/symfony_5_local_deps/vendor/doctrine/orm/bin/doctrine.bat deleted file mode 100644 index a91645cc4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/bin/doctrine.bat +++ /dev/null @@ -1,9 +0,0 @@ -@echo off - -if "%PHPBIN%" == "" set PHPBIN=@php_bin@ -if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATH -GOTO RUN -:USE_PEAR_PATH -set PHPBIN=%PHP_PEAR_PHP_BIN% -:RUN -"%PHPBIN%" "@bin_dir@\doctrine" %* diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/bin/doctrine.php b/fixtures/symfony_5_local_deps/vendor/doctrine/orm/bin/doctrine.php deleted file mode 100644 index 2c11fd208..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/bin/doctrine.php +++ /dev/null @@ -1,62 +0,0 @@ -= 3.0" - }, - "suggest": { - "ext-dom": "Provides support for XSD validation for XML mapping files", - "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0", - "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" - }, - "autoload": { - "psr-4": { "Doctrine\\ORM\\": "src" } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Tests\\": "tests/Tests", - "Doctrine\\StaticAnalysis\\": "tests/StaticAnalysis", - "Doctrine\\Performance\\": "tests/Performance" - } - }, - "bin": ["bin/doctrine"], - "archive": { - "exclude": ["!vendor", "tests", "*phpunit.xml", "build.xml", "build.properties", "composer.phar", "vendor/satooshi", "lib/vendor", "*.swp"] - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/doctrine-mapping.xsd b/fixtures/symfony_5_local_deps/vendor/doctrine/orm/doctrine-mapping.xsd deleted file mode 100644 index a05878774..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/orm/doctrine-mapping.xsd +++ /dev/null @@ -1,643 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/CONTRIBUTING.md b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/CONTRIBUTING.md deleted file mode 100644 index 268200ad4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/CONTRIBUTING.md +++ /dev/null @@ -1,11 +0,0 @@ -# Circular dependency - -This package has a development dependency on `doctrine/common`, which has a -regular dependency on this package (`^2.0` at the time of writing). - -To be able to use Composer, one has to let it understand that this is version 2 -(even when developing on 3.0.x), as follows: - -```shell -COMPOSER_ROOT_VERSION=2.0 composer update -v -``` diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/LICENSE b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/LICENSE deleted file mode 100644 index 8c38cc1bc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2015 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/README.md b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/README.md deleted file mode 100644 index a9f564e9a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Doctrine Persistence - -[![Build Status](https://travis-ci.org/doctrine/persistence.svg)](https://travis-ci.org/doctrine/persistence) -[![Code Coverage](https://codecov.io/gh/doctrine/persistence/branch/2.1.x/graph/badge.svg)](https://codecov.io/gh/doctrine/persistence/branch/2.1.x) - -The Doctrine Persistence project is a library that provides common abstractions for object mapper persistence. - -## More resources: - -* [Website](https://www.doctrine-project.org/) -* [Documentation](https://www.doctrine-project.org/projects/doctrine-persistence/en/latest/index.html) -* [Downloads](https://github.com/doctrine/persistence/releases) diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/UPGRADE.md b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/UPGRADE.md deleted file mode 100644 index cd62ade1d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/UPGRADE.md +++ /dev/null @@ -1,152 +0,0 @@ -Note about upgrading: Doctrine uses static and runtime mechanisms to raise -awareness about deprecated code. - -- Use of `@deprecated` docblock that is detected by IDEs (like PHPStorm) or - Static Analysis tools (like Psalm, phpstan) -- Use of our low-overhead runtime deprecation API, details: - https://github.com/doctrine/deprecations/ - -# Upgrade to 3.1 - -## Added method `Proxy::__setInitialized()` - -Classes implementing `Doctrine\Persistence\Proxy` should implement the new -method. This method will be added to the interface in 4.0. - -## Deprecated `RuntimePublicReflectionProperty` - -Use `RuntimeReflectionProperty` instead. - -# Upgrade to 3.0 - -## Removed `OnClearEventArgs::clearsAllEntities()` and `OnClearEventArgs::getEntityClass()` - -These methods only make sense when partially clearing the object manager, which -is no longer possible. -The second argument of the constructor of `OnClearEventArgs` is removed as well. - -## BC Break: removed `ObjectManagerAware` - -Implement active record style functionality directly in your application, by -using a `postLoad` event. - -## BC Break: removed `AnnotationDriver` - -Use `ColocatedMappingDriver` instead. - -## BC Break: Removed `MappingException::pathRequired()` - -Use `MappingException::pathRequiredForDriver()` instead. - -## BC Break: removed `LifecycleEventArgs::getEntity()` - -Use `LifecycleEventArgs::getObject()` instead. - -## BC Break: removed support for short namespace aliases - -- `AbstractClassMetadataFactory::getFqcnFromAlias()` is removed. -- `ClassMetadataFactory` methods now require their `$className` argument to be an -actual FQCN. - -## BC Break: removed `ObjectManager::merge()` - -`ObjectManagerDecorator::merge()` is removed without replacement. - -## BC Break: removed support for `doctrine/cache` - -Removed support for using doctrine/cache for metadata caching. The -`setCacheDriver` and `getCacheDriver` methods have been removed from -`Doctrine\Persistence\Mapping\AbstractMetadata`. Please use `getCache` and -`setCache` with a PSR-6 implementation instead. - -## BC Break: changed signatures - -`$objectName` has been dropped from the signature of `ObjectManager::clear()`. - -```diff -- public function clear($objectName = null) -+ public function clear(): void -``` - -Also, native parameter type declarations have been added on all public APIs. -Native return type declarations have not been added so that it is possible to -implement types compatible with both 2.x and 3.x. - -## BC Break: Removed `PersistentObject` - -Please implement this functionality directly in your application if you want -ActiveRecord style functionality. - -# Upgrade to 2.5 - -## Deprecated `OnClearEventArgs::clearsAllEntities()` and `OnClearEventArgs::getEntityClass()` - -These methods only make sense when partially clearing the object manager, which -is deprecated. -Passing a second argument to the constructor of `OnClearEventArgs` is -deprecated as well. - -## Deprecated `ObjectManagerAware` - -Along with deprecating `PersistentObject`, deprecating `ObjectManagerAware` -means deprecating support for active record, which already came with a word of -warning. Please implement this directly in your application with a `postLoad` -event if you need active record style functionality. - -## Deprecated `MappingException::pathRequired()` - -`MappingException::pathRequiredForDriver()` should be used instead. - -# Upgrade to 2.4 - -## Deprecated `AnnotationDriver` - -Since attributes were introduced in PHP 8.0, annotations are deprecated. -`AnnotationDriver` is an abstract class that is used when implementing concrete -annotation drivers in dependent packages. It is deprecated in favor of using -`ColocatedMappingDriver` to implement both annotation and attribute based -drivers. This will involve implementing `isTransient()` as well as -`__construct()` and `getReader()` to retain backward compatibility. - -# Upgrade to 2.3 - -## Deprecated using short namespace alias syntax in favor of `::class` syntax. - -Before: - -```php -$objectManager->find('MyPackage:MyClass', $id); -$objectManager->createQuery('SELECT u FROM MyPackage:MyClass'); -``` - -After: - -```php -$objectManager->find(MyClass::class, $id); -$objectManager->createQuery('SELECT u FROM '. MyClass::class); -``` - -# Upgrade to 2.2 - -## Deprecated `doctrine/cache` usage for metadata caching - -The `setCacheDriver` and `getCacheDriver` methods in -`Doctrine\Persistence\Mapping\AbstractMetadata` have been deprecated. Please -use `getCache` and `setCache` with a PSR-6 implementation instead. Note that -even after switching to PSR-6, `getCacheDriver` will return a cache instance -that wraps the PSR-6 cache. Note that if you use a custom implementation of -doctrine/cache, the library may not be able to provide a forward compatibility -layer. The cache implementation MUST extend the -`Doctrine\Common\Cache\CacheProvider` class. - -# Upgrade to 1.2 - -## Deprecated `ObjectManager::merge()` and `ObjectManager::detach()` - -Please handle merge operations in your application, and use -`ObjectManager::clear()` instead. - -## Deprecated `PersistentObject` - -Please implement this functionality directly in your application if you want -ActiveRecord style functionality. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/composer.json b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/composer.json deleted file mode 100644 index 1c4633f88..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/composer.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "doctrine/persistence", - "type": "library", - "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", - "keywords": [ - "persistence", - "object", - "mapper", - "orm", - "odm" - ], - "homepage": "https://www.doctrine-project.org/projects/persistence.html", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}, - {"name": "Marco Pivetta", "email": "ocramius@gmail.com"} - ], - "require": { - "php": "^7.2 || ^8.0", - "doctrine/event-manager": "^1 || ^2", - "psr/cache": "^1.0 || ^2.0 || ^3.0" - }, - "require-dev": { - "composer/package-versions-deprecated": "^1.11", - "phpstan/phpstan": "1.9.4", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.1", - "doctrine/coding-standard": "^11", - "doctrine/common": "^3.0", - "phpunit/phpunit": "^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6.0", - "vimeo/psalm": "4.30.0 || 5.3.0" - }, - "conflict": { - "doctrine/common": "<2.10" - }, - "autoload": { - "psr-4": { - "Doctrine\\Persistence\\": "src/Persistence" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Tests\\": "tests", - "Doctrine\\Tests_PHP74\\": "tests_php74", - "Doctrine\\Tests_PHP81\\": "tests_php81" - } - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true, - "composer/package-versions-deprecated": true - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/AbstractManagerRegistry.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/AbstractManagerRegistry.php deleted file mode 100644 index 72142ab0c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/AbstractManagerRegistry.php +++ /dev/null @@ -1,263 +0,0 @@ - */ - private $connections; - - /** @var array */ - private $managers; - - /** @var string */ - private $defaultConnection; - - /** @var string */ - private $defaultManager; - - /** - * @var string - * @psalm-var class-string - */ - private $proxyInterfaceName; - - /** - * @param array $connections - * @param array $managers - * @psalm-param class-string $proxyInterfaceName - */ - public function __construct( - string $name, - array $connections, - array $managers, - string $defaultConnection, - string $defaultManager, - string $proxyInterfaceName - ) { - $this->name = $name; - $this->connections = $connections; - $this->managers = $managers; - $this->defaultConnection = $defaultConnection; - $this->defaultManager = $defaultManager; - $this->proxyInterfaceName = $proxyInterfaceName; - } - - /** - * Fetches/creates the given services. - * - * A service in this context is connection or a manager instance. - * - * @param string $name The name of the service. - * - * @return ObjectManager The instance of the given service. - */ - abstract protected function getService(string $name); - - /** - * Resets the given services. - * - * A service in this context is connection or a manager instance. - * - * @param string $name The name of the service. - * - * @return void - */ - abstract protected function resetService(string $name); - - /** - * Gets the name of the registry. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function getConnection(?string $name = null) - { - if ($name === null) { - $name = $this->defaultConnection; - } - - if (! isset($this->connections[$name])) { - throw new InvalidArgumentException( - sprintf('Doctrine %s Connection named "%s" does not exist.', $this->name, $name) - ); - } - - return $this->getService($this->connections[$name]); - } - - /** - * {@inheritdoc} - */ - public function getConnectionNames() - { - return $this->connections; - } - - /** - * {@inheritdoc} - */ - public function getConnections() - { - $connections = []; - foreach ($this->connections as $name => $id) { - $connections[$name] = $this->getService($id); - } - - return $connections; - } - - /** - * {@inheritdoc} - */ - public function getDefaultConnectionName() - { - return $this->defaultConnection; - } - - /** - * {@inheritdoc} - */ - public function getDefaultManagerName() - { - return $this->defaultManager; - } - - /** - * {@inheritdoc} - * - * @throws InvalidArgumentException - */ - public function getManager(?string $name = null) - { - if ($name === null) { - $name = $this->defaultManager; - } - - if (! isset($this->managers[$name])) { - throw new InvalidArgumentException( - sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name) - ); - } - - return $this->getService($this->managers[$name]); - } - - /** - * {@inheritDoc} - */ - public function getManagerForClass(string $class) - { - $proxyClass = new ReflectionClass($class); - if ($proxyClass->isAnonymous()) { - return null; - } - - if ($proxyClass->implementsInterface($this->proxyInterfaceName)) { - $parentClass = $proxyClass->getParentClass(); - - if ($parentClass === false) { - return null; - } - - $class = $parentClass->getName(); - } - - foreach ($this->managers as $id) { - $manager = $this->getService($id); - - if (! $manager->getMetadataFactory()->isTransient($class)) { - return $manager; - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function getManagerNames() - { - return $this->managers; - } - - /** - * {@inheritdoc} - */ - public function getManagers() - { - $managers = []; - - foreach ($this->managers as $name => $id) { - $manager = $this->getService($id); - $managers[$name] = $manager; - } - - return $managers; - } - - /** - * {@inheritdoc} - */ - public function getRepository( - string $persistentObject, - ?string $persistentManagerName = null - ) { - return $this - ->selectManager($persistentObject, $persistentManagerName) - ->getRepository($persistentObject); - } - - /** - * {@inheritdoc} - */ - public function resetManager(?string $name = null) - { - if ($name === null) { - $name = $this->defaultManager; - } - - if (! isset($this->managers[$name])) { - throw new InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); - } - - // force the creation of a new document manager - // if the current one is closed - $this->resetService($this->managers[$name]); - - return $this->getManager($name); - } - - /** @psalm-param class-string $persistentObject */ - private function selectManager( - string $persistentObject, - ?string $persistentManagerName = null - ): ObjectManager { - if ($persistentManagerName !== null) { - return $this->getManager($persistentManagerName); - } - - return $this->getManagerForClass($persistentObject) ?? $this->getManager(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ConnectionRegistry.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ConnectionRegistry.php deleted file mode 100644 index 59d9a74f3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ConnectionRegistry.php +++ /dev/null @@ -1,41 +0,0 @@ - An array of Connection instances. - */ - public function getConnections(); - - /** - * Gets all connection names. - * - * @return array An array of connection names. - */ - public function getConnectionNames(); -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/LifecycleEventArgs.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/LifecycleEventArgs.php deleted file mode 100644 index 1654de429..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/LifecycleEventArgs.php +++ /dev/null @@ -1,54 +0,0 @@ -object = $object; - $this->objectManager = $objectManager; - } - - /** - * Retrieves the associated object. - * - * @return object - */ - public function getObject() - { - return $this->object; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return ObjectManager - * @psalm-return TObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/LoadClassMetadataEventArgs.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/LoadClassMetadataEventArgs.php deleted file mode 100644 index aa92d5d7c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/LoadClassMetadataEventArgs.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @template-covariant TObjectManager of ObjectManager - */ -class LoadClassMetadataEventArgs extends EventArgs -{ - /** - * @var ClassMetadata - * @psalm-var TClassMetadata - */ - private $classMetadata; - - /** - * @var ObjectManager - * @psalm-var TObjectManager - */ - private $objectManager; - - /** - * @psalm-param TClassMetadata $classMetadata - * @psalm-param TObjectManager $objectManager - */ - public function __construct(ClassMetadata $classMetadata, ObjectManager $objectManager) - { - $this->classMetadata = $classMetadata; - $this->objectManager = $objectManager; - } - - /** - * Retrieves the associated ClassMetadata. - * - * @return ClassMetadata - * @psalm-return TClassMetadata - */ - public function getClassMetadata() - { - return $this->classMetadata; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return TObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/ManagerEventArgs.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/ManagerEventArgs.php deleted file mode 100644 index 5156013ff..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/ManagerEventArgs.php +++ /dev/null @@ -1,39 +0,0 @@ -objectManager = $objectManager; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return ObjectManager - * @psalm-return TObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/OnClearEventArgs.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/OnClearEventArgs.php deleted file mode 100644 index 519a8876d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/OnClearEventArgs.php +++ /dev/null @@ -1,42 +0,0 @@ -objectManager = $objectManager; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return ObjectManager - * @psalm-return TObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/PreUpdateEventArgs.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/PreUpdateEventArgs.php deleted file mode 100644 index 95ecbd452..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Event/PreUpdateEventArgs.php +++ /dev/null @@ -1,110 +0,0 @@ - - */ -class PreUpdateEventArgs extends LifecycleEventArgs -{ - /** @var array> */ - private $entityChangeSet; - - /** - * @param array> $changeSet - * @psalm-param TObjectManager $objectManager - */ - public function __construct(object $entity, ObjectManager $objectManager, array &$changeSet) - { - parent::__construct($entity, $objectManager); - - $this->entityChangeSet = &$changeSet; - } - - /** - * Retrieves the entity changeset. - * - * @return array> - */ - public function getEntityChangeSet() - { - return $this->entityChangeSet; - } - - /** - * Checks if field has a changeset. - * - * @return bool - */ - public function hasChangedField(string $field) - { - return isset($this->entityChangeSet[$field]); - } - - /** - * Gets the old value of the changeset of the changed field. - * - * @return mixed - */ - public function getOldValue(string $field) - { - $this->assertValidField($field); - - return $this->entityChangeSet[$field][0]; - } - - /** - * Gets the new value of the changeset of the changed field. - * - * @return mixed - */ - public function getNewValue(string $field) - { - $this->assertValidField($field); - - return $this->entityChangeSet[$field][1]; - } - - /** - * Sets the new value of this field. - * - * @param mixed $value - * - * @return void - */ - public function setNewValue(string $field, $value) - { - $this->assertValidField($field); - - $this->entityChangeSet[$field][1] = $value; - } - - /** - * Asserts the field exists in changeset. - * - * @return void - * - * @throws InvalidArgumentException - */ - private function assertValidField(string $field) - { - if (! isset($this->entityChangeSet[$field])) { - throw new InvalidArgumentException(sprintf( - 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.', - $field, - get_class($this->getObject()) - )); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ManagerRegistry.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ManagerRegistry.php deleted file mode 100644 index 46599a562..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ManagerRegistry.php +++ /dev/null @@ -1,89 +0,0 @@ - An array of ObjectManager instances - */ - public function getManagers(); - - /** - * Resets a named object manager. - * - * This method is useful when an object manager has been closed - * because of a rollbacked transaction AND when you think that - * it makes sense to get a new one to replace the closed one. - * - * Be warned that you will get a brand new object manager as - * the existing one is not useable anymore. This means that any - * other object with a dependency on this object manager will - * hold an obsolete reference. You can inject the registry instead - * to avoid this problem. - * - * @param string|null $name The object manager name (null for the default one). - * - * @return ObjectManager - */ - public function resetManager(?string $name = null); - - /** - * Gets all object manager names and associated service IDs. A service ID - * is a string that allows to obtain an object manager, typically from a - * PSR-11 container. - * - * @return array An array with object manager names as keys, - * and service IDs as values. - */ - public function getManagerNames(); - - /** - * Gets the ObjectRepository for a persistent object. - * - * @param string $persistentObject The name of the persistent object. - * @param string|null $persistentManagerName The object manager name (null for the default one). - * @psalm-param class-string $persistentObject - * - * @return ObjectRepository - * @psalm-return ObjectRepository - * - * @template T of object - */ - public function getRepository( - string $persistentObject, - ?string $persistentManagerName = null - ); - - /** - * Gets the object manager associated with a given class. - * - * @param class-string $class A persistent object class name. - * - * @return ObjectManager|null - */ - public function getManagerForClass(string $class); -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/AbstractClassMetadataFactory.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/AbstractClassMetadataFactory.php deleted file mode 100644 index e8f6acaa8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/AbstractClassMetadataFactory.php +++ /dev/null @@ -1,499 +0,0 @@ - - */ -abstract class AbstractClassMetadataFactory implements ClassMetadataFactory -{ - /** - * Salt used by specific Object Manager implementation. - * - * @var string - */ - protected $cacheSalt = '__CLASSMETADATA__'; - - /** @var CacheItemPoolInterface|null */ - private $cache; - - /** - * @var array - * @psalm-var CMTemplate[] - */ - private $loadedMetadata = []; - - /** @var bool */ - protected $initialized = false; - - /** @var ReflectionService|null */ - private $reflectionService = null; - - /** @var ProxyClassNameResolver|null */ - private $proxyClassNameResolver = null; - - public function setCache(CacheItemPoolInterface $cache): void - { - $this->cache = $cache; - } - - final protected function getCache(): ?CacheItemPoolInterface - { - return $this->cache; - } - - /** - * Returns an array of all the loaded metadata currently in memory. - * - * @return ClassMetadata[] - * @psalm-return CMTemplate[] - */ - public function getLoadedMetadata() - { - return $this->loadedMetadata; - } - - /** - * {@inheritDoc} - */ - public function getAllMetadata() - { - if (! $this->initialized) { - $this->initialize(); - } - - $driver = $this->getDriver(); - $metadata = []; - foreach ($driver->getAllClassNames() as $className) { - $metadata[] = $this->getMetadataFor($className); - } - - return $metadata; - } - - public function setProxyClassNameResolver(ProxyClassNameResolver $resolver): void - { - $this->proxyClassNameResolver = $resolver; - } - - /** - * Lazy initialization of this stuff, especially the metadata driver, - * since these are not needed at all when a metadata cache is active. - * - * @return void - */ - abstract protected function initialize(); - - /** - * Returns the mapping driver implementation. - * - * @return MappingDriver - */ - abstract protected function getDriver(); - - /** - * Wakes up reflection after ClassMetadata gets unserialized from cache. - * - * @psalm-param CMTemplate $class - * - * @return void - */ - abstract protected function wakeupReflection( - ClassMetadata $class, - ReflectionService $reflService - ); - - /** - * Initializes Reflection after ClassMetadata was constructed. - * - * @psalm-param CMTemplate $class - * - * @return void - */ - abstract protected function initializeReflection( - ClassMetadata $class, - ReflectionService $reflService - ); - - /** - * Checks whether the class metadata is an entity. - * - * This method should return false for mapped superclasses or embedded classes. - * - * @psalm-param CMTemplate $class - * - * @return bool - */ - abstract protected function isEntity(ClassMetadata $class); - - /** - * Removes the prepended backslash of a class string to conform with how php outputs class names - * - * @psalm-param class-string $className - * - * @psalm-return class-string - */ - private function normalizeClassName(string $className): string - { - return ltrim($className, '\\'); - } - - /** - * {@inheritDoc} - * - * @throws ReflectionException - * @throws MappingException - */ - public function getMetadataFor(string $className) - { - $className = $this->normalizeClassName($className); - - if (isset($this->loadedMetadata[$className])) { - return $this->loadedMetadata[$className]; - } - - if (class_exists($className, false) && (new ReflectionClass($className))->isAnonymous()) { - throw MappingException::classIsAnonymous($className); - } - - if (! class_exists($className, false) && strpos($className, ':') !== false) { - throw MappingException::nonExistingClass($className); - } - - $realClassName = $this->getRealClass($className); - - if (isset($this->loadedMetadata[$realClassName])) { - // We do not have the alias name in the map, include it - return $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; - } - - try { - if ($this->cache !== null) { - $cached = $this->cache->getItem($this->getCacheKey($realClassName))->get(); - if ($cached instanceof ClassMetadata) { - /** @psalm-var CMTemplate $cached */ - $this->loadedMetadata[$realClassName] = $cached; - - $this->wakeupReflection($cached, $this->getReflectionService()); - } else { - $loadedMetadata = $this->loadMetadata($realClassName); - $classNames = array_combine( - array_map([$this, 'getCacheKey'], $loadedMetadata), - $loadedMetadata - ); - - foreach ($this->cache->getItems(array_keys($classNames)) as $item) { - if (! isset($classNames[$item->getKey()])) { - continue; - } - - $item->set($this->loadedMetadata[$classNames[$item->getKey()]]); - $this->cache->saveDeferred($item); - } - - $this->cache->commit(); - } - } else { - $this->loadMetadata($realClassName); - } - } catch (MappingException $loadingException) { - $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName); - - if ($fallbackMetadataResponse === null) { - throw $loadingException; - } - - $this->loadedMetadata[$realClassName] = $fallbackMetadataResponse; - } - - if ($className !== $realClassName) { - // We do not have the alias name in the map, include it - $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; - } - - return $this->loadedMetadata[$className]; - } - - /** - * {@inheritDoc} - */ - public function hasMetadataFor(string $className) - { - $className = $this->normalizeClassName($className); - - return isset($this->loadedMetadata[$className]); - } - - /** - * Sets the metadata descriptor for a specific class. - * - * NOTE: This is only useful in very special cases, like when generating proxy classes. - * - * @psalm-param class-string $className - * @psalm-param CMTemplate $class - * - * @return void - */ - public function setMetadataFor(string $className, ClassMetadata $class) - { - $this->loadedMetadata[$this->normalizeClassName($className)] = $class; - } - - /** - * Gets an array of parent classes for the given entity class. - * - * @psalm-param class-string $name - * - * @return string[] - * @psalm-return list - */ - protected function getParentClasses(string $name) - { - // Collect parent classes, ignoring transient (not-mapped) classes. - $parentClasses = []; - - foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { - if ($this->getDriver()->isTransient($parentClass)) { - continue; - } - - $parentClasses[] = $parentClass; - } - - return $parentClasses; - } - - /** - * Loads the metadata of the class in question and all it's ancestors whose metadata - * is still not loaded. - * - * Important: The class $name does not necessarily exist at this point here. - * Scenarios in a code-generation setup might have access to XML/YAML - * Mapping files without the actual PHP code existing here. That is why the - * {@see \Doctrine\Persistence\Mapping\ReflectionService} interface - * should be used for reflection. - * - * @param string $name The name of the class for which the metadata should get loaded. - * @psalm-param class-string $name - * - * @return array - * @psalm-return list - */ - protected function loadMetadata(string $name) - { - if (! $this->initialized) { - $this->initialize(); - } - - $loaded = []; - - $parentClasses = $this->getParentClasses($name); - $parentClasses[] = $name; - - // Move down the hierarchy of parent classes, starting from the topmost class - $parent = null; - $rootEntityFound = false; - $visited = []; - $reflService = $this->getReflectionService(); - - foreach ($parentClasses as $className) { - if (isset($this->loadedMetadata[$className])) { - $parent = $this->loadedMetadata[$className]; - - if ($this->isEntity($parent)) { - $rootEntityFound = true; - - array_unshift($visited, $className); - } - - continue; - } - - $class = $this->newClassMetadataInstance($className); - $this->initializeReflection($class, $reflService); - - $this->doLoadMetadata($class, $parent, $rootEntityFound, $visited); - - $this->loadedMetadata[$className] = $class; - - $parent = $class; - - if ($this->isEntity($class)) { - $rootEntityFound = true; - - array_unshift($visited, $className); - } - - $this->wakeupReflection($class, $reflService); - - $loaded[] = $className; - } - - return $loaded; - } - - /** - * Provides a fallback hook for loading metadata when loading failed due to reflection/mapping exceptions - * - * Override this method to implement a fallback strategy for failed metadata loading - * - * @return ClassMetadata|null - * @psalm-return CMTemplate|null - */ - protected function onNotFoundMetadata(string $className) - { - return null; - } - - /** - * Actually loads the metadata from the underlying metadata. - * - * @param bool $rootEntityFound True when there is another entity (non-mapped superclass) class above the current class in the PHP class hierarchy. - * @param list $nonSuperclassParents All parent class names that are not marked as mapped superclasses, with the direct parent class being the first and the root entity class the last element. - * @psalm-param CMTemplate $class - * @psalm-param CMTemplate|null $parent - * - * @return void - */ - abstract protected function doLoadMetadata( - ClassMetadata $class, - ?ClassMetadata $parent, - bool $rootEntityFound, - array $nonSuperclassParents - ); - - /** - * Creates a new ClassMetadata instance for the given class name. - * - * @psalm-param class-string $className - * - * @return ClassMetadata - * @psalm-return CMTemplate - * - * @template T of object - */ - abstract protected function newClassMetadataInstance(string $className); - - /** - * {@inheritDoc} - */ - public function isTransient(string $className) - { - if (! $this->initialized) { - $this->initialize(); - } - - if (class_exists($className, false) && (new ReflectionClass($className))->isAnonymous()) { - return false; - } - - if (! class_exists($className, false) && strpos($className, ':') !== false) { - throw MappingException::nonExistingClass($className); - } - - /** @psalm-var class-string $className */ - return $this->getDriver()->isTransient($className); - } - - /** - * Sets the reflectionService. - * - * @return void - */ - public function setReflectionService(ReflectionService $reflectionService) - { - $this->reflectionService = $reflectionService; - } - - /** - * Gets the reflection service associated with this metadata factory. - * - * @return ReflectionService - */ - public function getReflectionService() - { - if ($this->reflectionService === null) { - $this->reflectionService = new RuntimeReflectionService(); - } - - return $this->reflectionService; - } - - protected function getCacheKey(string $realClassName): string - { - return str_replace('\\', '__', $realClassName) . $this->cacheSalt; - } - - /** - * Gets the real class name of a class name that could be a proxy. - * - * @psalm-param class-string>|class-string $class - * - * @psalm-return class-string - * - * @template T of object - */ - private function getRealClass(string $class): string - { - if ($this->proxyClassNameResolver === null) { - $this->createDefaultProxyClassNameResolver(); - } - - assert($this->proxyClassNameResolver !== null); - - return $this->proxyClassNameResolver->resolveClassName($class); - } - - private function createDefaultProxyClassNameResolver(): void - { - $this->proxyClassNameResolver = new class implements ProxyClassNameResolver { - /** - * @psalm-param class-string>|class-string $className - * - * @psalm-return class-string - * - * @template T of object - */ - public function resolveClassName(string $className): string - { - $pos = strrpos($className, '\\' . Proxy::MARKER . '\\'); - - if ($pos === false) { - /** @psalm-var class-string */ - return $className; - } - - /** @psalm-var class-string */ - return substr($className, $pos + Proxy::MARKER_LENGTH + 2); - } - }; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ClassMetadata.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ClassMetadata.php deleted file mode 100644 index f407ba3bd..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ClassMetadata.php +++ /dev/null @@ -1,141 +0,0 @@ - - */ - public function getName(); - - /** - * Gets the mapped identifier field name. - * - * The returned structure is an array of the identifier field names. - * - * @return array - * @psalm-return list - */ - public function getIdentifier(); - - /** - * Gets the ReflectionClass instance for this mapped class. - * - * @return ReflectionClass - */ - public function getReflectionClass(); - - /** - * Checks if the given field name is a mapped identifier for this class. - * - * @return bool - */ - public function isIdentifier(string $fieldName); - - /** - * Checks if the given field is a mapped property for this class. - * - * @return bool - */ - public function hasField(string $fieldName); - - /** - * Checks if the given field is a mapped association for this class. - * - * @return bool - */ - public function hasAssociation(string $fieldName); - - /** - * Checks if the given field is a mapped single valued association for this class. - * - * @return bool - */ - public function isSingleValuedAssociation(string $fieldName); - - /** - * Checks if the given field is a mapped collection valued association for this class. - * - * @return bool - */ - public function isCollectionValuedAssociation(string $fieldName); - - /** - * A numerically indexed list of field names of this persistent class. - * - * This array includes identifier fields if present on this class. - * - * @return array - */ - public function getFieldNames(); - - /** - * Returns an array of identifier field names numerically indexed. - * - * @return array - */ - public function getIdentifierFieldNames(); - - /** - * Returns a numerically indexed list of association names of this persistent class. - * - * This array includes identifier associations if present on this class. - * - * @return array - */ - public function getAssociationNames(); - - /** - * Returns a type name of this field. - * - * This type names can be implementation specific but should at least include the php types: - * integer, string, boolean, float/double, datetime. - * - * @return string|null - */ - public function getTypeOfField(string $fieldName); - - /** - * Returns the target class name of the given association. - * - * @return string|null - * @psalm-return class-string|null - */ - public function getAssociationTargetClass(string $assocName); - - /** - * Checks if the association is the inverse side of a bidirectional association. - * - * @return bool - */ - public function isAssociationInverseSide(string $assocName); - - /** - * Returns the target field of the owning side of the association. - * - * @return string - */ - public function getAssociationMappedByTargetField(string $assocName); - - /** - * Returns the identifier of this object as an array with field name as key. - * - * Has to return an empty array if no identifier isset. - * - * @return array - */ - public function getIdentifierValues(object $object); -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ClassMetadataFactory.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ClassMetadataFactory.php deleted file mode 100644 index 28b830336..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ClassMetadataFactory.php +++ /dev/null @@ -1,61 +0,0 @@ - - */ - public function getAllMetadata(); - - /** - * Gets the class metadata descriptor for a class. - * - * @param class-string $className The name of the class. - * - * @return ClassMetadata - * @psalm-return T - */ - public function getMetadataFor(string $className); - - /** - * Checks whether the factory has the metadata for a class loaded already. - * - * @param class-string $className - * - * @return bool TRUE if the metadata of the class in question is already loaded, FALSE otherwise. - */ - public function hasMetadataFor(string $className); - - /** - * Sets the metadata descriptor for a specific class. - * - * @param class-string $className - * @psalm-param T $class - * - * @return void - */ - public function setMetadataFor(string $className, ClassMetadata $class); - - /** - * Returns whether the class with the specified name should have its metadata loaded. - * This is only the case if it is either mapped directly or as a MappedSuperclass. - * - * @psalm-param class-string $className - * - * @return bool - */ - public function isTransient(string $className); -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/ColocatedMappingDriver.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/ColocatedMappingDriver.php deleted file mode 100644 index e85ba700c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/ColocatedMappingDriver.php +++ /dev/null @@ -1,212 +0,0 @@ - - */ - protected $paths = []; - - /** - * The paths excluded from path where to look for mapping files. - * - * @var array - */ - protected $excludePaths = []; - - /** - * The file extension of mapping documents. - * - * @var string - */ - protected $fileExtension = '.php'; - - /** - * Cache for getAllClassNames(). - * - * @var array|null - * @psalm-var list|null - */ - protected $classNames; - - /** - * Appends lookup paths to metadata driver. - * - * @param array $paths - * - * @return void - */ - public function addPaths(array $paths) - { - $this->paths = array_unique(array_merge($this->paths, $paths)); - } - - /** - * Retrieves the defined metadata lookup paths. - * - * @return array - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Append exclude lookup paths to metadata driver. - * - * @param string[] $paths - * - * @return void - */ - public function addExcludePaths(array $paths) - { - $this->excludePaths = array_unique(array_merge($this->excludePaths, $paths)); - } - - /** - * Retrieve the defined metadata lookup exclude paths. - * - * @return array - */ - public function getExcludePaths() - { - return $this->excludePaths; - } - - /** - * Gets the file extension used to look for mapping files under. - * - * @return string - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * Sets the file extension used to look for mapping files under. - * - * @return void - */ - public function setFileExtension(string $fileExtension) - { - $this->fileExtension = $fileExtension; - } - - /** - * {@inheritDoc} - * - * Returns whether the class with the specified name is transient. Only non-transient - * classes, that is entities and mapped superclasses, should have their metadata loaded. - * - * @psalm-param class-string $className - * - * @return bool - */ - abstract public function isTransient(string $className); - - /** - * Gets the names of all mapped classes known to this driver. - * - * @return string[] The names of all mapped classes known to this driver. - * @psalm-return list - */ - public function getAllClassNames() - { - if ($this->classNames !== null) { - return $this->classNames; - } - - if ($this->paths === []) { - throw MappingException::pathRequiredForDriver(static::class); - } - - $classes = []; - $includedFiles = []; - - foreach ($this->paths as $path) { - if (! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new RegexIterator( - new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS), - RecursiveIteratorIterator::LEAVES_ONLY - ), - '/^.+' . preg_quote($this->fileExtension) . '$/i', - RecursiveRegexIterator::GET_MATCH - ); - - foreach ($iterator as $file) { - $sourceFile = $file[0]; - - if (preg_match('(^phar:)i', $sourceFile) === 0) { - $sourceFile = realpath($sourceFile); - } - - foreach ($this->excludePaths as $excludePath) { - $realExcludePath = realpath($excludePath); - assert($realExcludePath !== false); - $exclude = str_replace('\\', '/', $realExcludePath); - $current = str_replace('\\', '/', $sourceFile); - - if (strpos($current, $exclude) !== false) { - continue 2; - } - } - - require_once $sourceFile; - - $includedFiles[] = $sourceFile; - } - } - - $declared = get_declared_classes(); - - foreach ($declared as $className) { - $rc = new ReflectionClass($className); - - $sourceFile = $rc->getFileName(); - - if (! in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) { - continue; - } - - $classes[] = $className; - } - - $this->classNames = $classes; - - return $classes; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/DefaultFileLocator.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/DefaultFileLocator.php deleted file mode 100644 index 9b00e744b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/DefaultFileLocator.php +++ /dev/null @@ -1,175 +0,0 @@ - - */ - protected $paths = []; - - /** - * The file extension of mapping documents. - * - * @var string|null - */ - protected $fileExtension; - - /** - * Initializes a new FileDriver that looks in the given path(s) for mapping - * documents and operates in the specified operating mode. - * - * @param string|array $paths One or multiple paths where mapping documents - * can be found. - * @param string|null $fileExtension The file extension of mapping documents, - * usually prefixed with a dot. - */ - public function __construct($paths, ?string $fileExtension = null) - { - $this->addPaths((array) $paths); - $this->fileExtension = $fileExtension; - } - - /** - * Appends lookup paths to metadata driver. - * - * @param array $paths - * - * @return void - */ - public function addPaths(array $paths) - { - $this->paths = array_unique(array_merge($this->paths, $paths)); - } - - /** - * Retrieves the defined metadata lookup paths. - * - * @return array - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Gets the file extension used to look for mapping files under. - * - * @return string|null - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * Sets the file extension used to look for mapping files under. - * - * @param string|null $fileExtension The file extension to set. - * - * @return void - */ - public function setFileExtension(?string $fileExtension) - { - $this->fileExtension = $fileExtension; - } - - /** - * {@inheritDoc} - */ - public function findMappingFile(string $className) - { - $fileName = str_replace('\\', '.', $className) . $this->fileExtension; - - // Check whether file exists - foreach ($this->paths as $path) { - if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) { - return $path . DIRECTORY_SEPARATOR . $fileName; - } - } - - throw MappingException::mappingFileNotFound($className, $fileName); - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames(string $globalBasename) - { - if ($this->paths === []) { - return []; - } - - $classes = []; - - foreach ($this->paths as $path) { - if (! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($path), - RecursiveIteratorIterator::LEAVES_ONLY - ); - - foreach ($iterator as $file) { - $fileName = $file->getBasename($this->fileExtension); - - if ($fileName === $file->getBasename() || $fileName === $globalBasename) { - continue; - } - - // NOTE: All files found here means classes are not transient! - - assert(is_string($fileName)); - /** @psalm-var class-string */ - $class = str_replace('.', '\\', $fileName); - $classes[] = $class; - } - } - - return $classes; - } - - /** - * {@inheritDoc} - */ - public function fileExists(string $className) - { - $fileName = str_replace('\\', '.', $className) . $this->fileExtension; - - // Check whether file exists - foreach ($this->paths as $path) { - if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) { - return true; - } - } - - return false; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/FileDriver.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/FileDriver.php deleted file mode 100644 index d3e6b0c8c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/FileDriver.php +++ /dev/null @@ -1,212 +0,0 @@ ->|null - */ - protected $classCache; - - /** @var string */ - protected $globalBasename = ''; - - /** - * Initializes a new FileDriver that looks in the given path(s) for mapping - * documents and operates in the specified operating mode. - * - * @param string|array|FileLocator $locator A FileLocator or one/multiple paths - * where mapping documents can be found. - */ - public function __construct($locator, ?string $fileExtension = null) - { - if ($locator instanceof FileLocator) { - $this->locator = $locator; - } else { - $this->locator = new DefaultFileLocator((array) $locator, $fileExtension); - } - } - - /** - * Sets the global basename. - * - * @return void - */ - public function setGlobalBasename(string $file) - { - $this->globalBasename = $file; - } - - /** - * Retrieves the global basename. - * - * @return string|null - */ - public function getGlobalBasename() - { - return $this->globalBasename; - } - - /** - * Gets the element of schema meta data for the class from the mapping file. - * This will lazily load the mapping file if it is not loaded yet. - * - * @psalm-param class-string $className - * - * @return ClassMetadata The element of schema meta data. - * @psalm-return ClassMetadata - * - * @throws MappingException - */ - public function getElement(string $className) - { - if ($this->classCache === null) { - $this->initialize(); - } - - if (isset($this->classCache[$className])) { - return $this->classCache[$className]; - } - - $result = $this->loadMappingFile($this->locator->findMappingFile($className)); - - if (! isset($result[$className])) { - throw MappingException::invalidMappingFile( - $className, - str_replace('\\', '.', $className) . $this->locator->getFileExtension() - ); - } - - $this->classCache[$className] = $result[$className]; - - return $result[$className]; - } - - /** - * {@inheritDoc} - */ - public function isTransient(string $className) - { - if ($this->classCache === null) { - $this->initialize(); - } - - if (isset($this->classCache[$className])) { - return false; - } - - return ! $this->locator->fileExists($className); - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames() - { - if ($this->classCache === null) { - $this->initialize(); - } - - if ($this->classCache === []) { - return $this->locator->getAllClassNames($this->globalBasename); - } - - /** @psalm-var array> $classCache */ - $classCache = $this->classCache; - - /** @var list $keys */ - $keys = array_keys($classCache); - - return array_values(array_unique(array_merge( - $keys, - $this->locator->getAllClassNames($this->globalBasename) - ))); - } - - /** - * Loads a mapping file with the given name and returns a map - * from class/entity names to their corresponding file driver elements. - * - * @param string $file The mapping file to load. - * - * @return ClassMetadata[] - * @psalm-return array> - */ - abstract protected function loadMappingFile(string $file); - - /** - * Initializes the class cache from all the global files. - * - * Using this feature adds a substantial performance hit to file drivers as - * more metadata has to be loaded into memory than might actually be - * necessary. This may not be relevant to scenarios where caching of - * metadata is in place, however hits very hard in scenarios where no - * caching is used. - * - * @return void - */ - protected function initialize() - { - $this->classCache = []; - if ($this->globalBasename === null) { - return; - } - - foreach ($this->locator->getPaths() as $path) { - $file = $path . '/' . $this->globalBasename . $this->locator->getFileExtension(); - if (! is_file($file)) { - continue; - } - - $this->classCache = array_merge( - $this->classCache, - $this->loadMappingFile($file) - ); - } - } - - /** - * Retrieves the locator used to discover mapping files by className. - * - * @return FileLocator - */ - public function getLocator() - { - return $this->locator; - } - - /** - * Sets the locator used to discover mapping files by className. - * - * @return void - */ - public function setLocator(FileLocator $locator) - { - $this->locator = $locator; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/FileLocator.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/FileLocator.php deleted file mode 100644 index e57d5398c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/FileLocator.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @psalm-return list - */ - public function getAllClassNames(string $globalBasename); - - /** - * Checks if a file can be found for this class name. - * - * @return bool - */ - public function fileExists(string $className); - - /** - * Gets all the paths that this file locator looks for mapping files. - * - * @return array - */ - public function getPaths(); - - /** - * Gets the file extension that mapping files are suffixed with. - * - * @return string|null - */ - public function getFileExtension(); -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/MappingDriver.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/MappingDriver.php deleted file mode 100644 index 9b6f0c806..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/MappingDriver.php +++ /dev/null @@ -1,43 +0,0 @@ - $className - * @psalm-param ClassMetadata $metadata - * - * @return void - * - * @template T of object - */ - public function loadMetadataForClass(string $className, ClassMetadata $metadata); - - /** - * Gets the names of all mapped classes known to this driver. - * - * @return array The names of all mapped classes known to this driver. - * @psalm-return list - */ - public function getAllClassNames(); - - /** - * Returns whether the class with the specified name should have its metadata loaded. - * This is only the case if it is either mapped as an Entity or a MappedSuperclass. - * - * @psalm-param class-string $className - * - * @return bool - */ - public function isTransient(string $className); -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/MappingDriverChain.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/MappingDriverChain.php deleted file mode 100644 index 8563dd231..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/MappingDriverChain.php +++ /dev/null @@ -1,142 +0,0 @@ - */ - private $drivers = []; - - /** - * Gets the default driver. - * - * @return MappingDriver|null - */ - public function getDefaultDriver() - { - return $this->defaultDriver; - } - - /** - * Set the default driver. - * - * @return void - */ - public function setDefaultDriver(MappingDriver $driver) - { - $this->defaultDriver = $driver; - } - - /** - * Adds a nested driver. - * - * @return void - */ - public function addDriver(MappingDriver $nestedDriver, string $namespace) - { - $this->drivers[$namespace] = $nestedDriver; - } - - /** - * Gets the array of nested drivers. - * - * @return array $drivers - */ - public function getDrivers() - { - return $this->drivers; - } - - /** - * {@inheritDoc} - */ - public function loadMetadataForClass(string $className, ClassMetadata $metadata) - { - foreach ($this->drivers as $namespace => $driver) { - if (strpos($className, $namespace) === 0) { - $driver->loadMetadataForClass($className, $metadata); - - return; - } - } - - if ($this->defaultDriver !== null) { - $this->defaultDriver->loadMetadataForClass($className, $metadata); - - return; - } - - throw MappingException::classNotFoundInNamespaces($className, array_keys($this->drivers)); - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames() - { - $classNames = []; - $driverClasses = []; - - foreach ($this->drivers as $namespace => $driver) { - $oid = spl_object_hash($driver); - - if (! isset($driverClasses[$oid])) { - $driverClasses[$oid] = $driver->getAllClassNames(); - } - - foreach ($driverClasses[$oid] as $className) { - if (strpos($className, $namespace) !== 0) { - continue; - } - - $classNames[$className] = true; - } - } - - if ($this->defaultDriver !== null) { - foreach ($this->defaultDriver->getAllClassNames() as $className) { - $classNames[$className] = true; - } - } - - return array_keys($classNames); - } - - /** - * {@inheritDoc} - */ - public function isTransient(string $className) - { - foreach ($this->drivers as $namespace => $driver) { - if (strpos($className, $namespace) === 0) { - return $driver->isTransient($className); - } - } - - if ($this->defaultDriver !== null) { - return $this->defaultDriver->isTransient($className); - } - - return true; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/PHPDriver.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/PHPDriver.php deleted file mode 100644 index b2ca7aec7..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/PHPDriver.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ - protected $metadata; - - /** @param string|array|FileLocator $locator */ - public function __construct($locator) - { - parent::__construct($locator, '.php'); - } - - /** - * {@inheritDoc} - */ - public function loadMetadataForClass(string $className, ClassMetadata $metadata) - { - $this->metadata = $metadata; - - $this->loadMappingFile($this->locator->findMappingFile($className)); - } - - /** - * {@inheritDoc} - */ - protected function loadMappingFile(string $file) - { - $metadata = $this->metadata; - include $file; - - return [$metadata->getName() => $metadata]; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/StaticPHPDriver.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/StaticPHPDriver.php deleted file mode 100644 index d3974435f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/StaticPHPDriver.php +++ /dev/null @@ -1,132 +0,0 @@ - - */ - private $paths = []; - - /** - * Map of all class names. - * - * @var array - * @psalm-var list - */ - private $classNames; - - /** @param array|string $paths */ - public function __construct($paths) - { - $this->addPaths((array) $paths); - } - - /** - * @param array $paths - * - * @return void - */ - public function addPaths(array $paths) - { - $this->paths = array_unique(array_merge($this->paths, $paths)); - } - - /** - * {@inheritdoc} - */ - public function loadMetadataForClass(string $className, ClassMetadata $metadata) - { - $className::loadMetadata($metadata); - } - - /** - * {@inheritDoc} - * - * @todo Same code exists in ColocatedMappingDriver, should we re-use it - * somehow or not worry about it? - */ - public function getAllClassNames() - { - if ($this->classNames !== null) { - return $this->classNames; - } - - if ($this->paths === []) { - throw MappingException::pathRequiredForDriver(static::class); - } - - $classes = []; - $includedFiles = []; - - foreach ($this->paths as $path) { - if (! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($path), - RecursiveIteratorIterator::LEAVES_ONLY - ); - - foreach ($iterator as $file) { - if ($file->getBasename('.php') === $file->getBasename()) { - continue; - } - - $sourceFile = realpath($file->getPathName()); - require_once $sourceFile; - $includedFiles[] = $sourceFile; - } - } - - $declared = get_declared_classes(); - - foreach ($declared as $className) { - $rc = new ReflectionClass($className); - - $sourceFile = $rc->getFileName(); - - if (! in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) { - continue; - } - - $classes[] = $className; - } - - $this->classNames = $classes; - - return $classes; - } - - /** - * {@inheritdoc} - */ - public function isTransient(string $className) - { - return ! method_exists($className, 'loadMetadata'); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/SymfonyFileLocator.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/SymfonyFileLocator.php deleted file mode 100644 index 428d5fbc9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/SymfonyFileLocator.php +++ /dev/null @@ -1,265 +0,0 @@ - - */ - protected $paths = []; - - /** - * A map of mapping directory path to namespace prefix used to expand class shortnames. - * - * @var array - */ - protected $prefixes = []; - - /** - * File extension that is searched for. - * - * @var string|null - */ - protected $fileExtension; - - /** - * Represents PHP namespace delimiters when looking for files - * - * @var string - */ - private $nsSeparator; - - /** - * @param array $prefixes - * @param string $nsSeparator String which would be used when converting FQCN - * to filename and vice versa. Should not be empty - */ - public function __construct( - array $prefixes, - string $fileExtension = '', - string $nsSeparator = '.' - ) { - $this->addNamespacePrefixes($prefixes); - $this->fileExtension = $fileExtension; - - if ($nsSeparator === '') { - throw new InvalidArgumentException('Namespace separator should not be empty'); - } - - $this->nsSeparator = $nsSeparator; - } - - /** - * Adds Namespace Prefixes. - * - * @param array $prefixes - * - * @return void - */ - public function addNamespacePrefixes(array $prefixes) - { - $this->prefixes = array_merge($this->prefixes, $prefixes); - $this->paths = array_merge($this->paths, array_keys($prefixes)); - } - - /** - * Gets Namespace Prefixes. - * - * @return string[] - */ - public function getNamespacePrefixes() - { - return $this->prefixes; - } - - /** - * {@inheritDoc} - */ - public function getPaths() - { - return $this->paths; - } - - /** - * {@inheritDoc} - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * Sets the file extension used to look for mapping files under. - * - * @param string $fileExtension The file extension to set. - * - * @return void - */ - public function setFileExtension(string $fileExtension) - { - $this->fileExtension = $fileExtension; - } - - /** - * {@inheritDoc} - */ - public function fileExists(string $className) - { - $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension; - foreach ($this->paths as $path) { - if (! isset($this->prefixes[$path])) { - // global namespace class - if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) { - return true; - } - - continue; - } - - $prefix = $this->prefixes[$path]; - - if (strpos($className, $prefix . '\\') !== 0) { - continue; - } - - $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension; - - if (is_file($filename)) { - return true; - } - } - - return false; - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames(?string $globalBasename = null) - { - if ($this->paths === []) { - return []; - } - - $classes = []; - - foreach ($this->paths as $path) { - if (! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($path), - RecursiveIteratorIterator::LEAVES_ONLY - ); - - foreach ($iterator as $file) { - $fileName = $file->getBasename($this->fileExtension); - - if ($fileName === $file->getBasename() || $fileName === $globalBasename) { - continue; - } - - // NOTE: All files found here means classes are not transient! - if (isset($this->prefixes[$path])) { - // Calculate namespace suffix for given prefix as a relative path from basepath to file path - $nsSuffix = strtr( - substr($this->realpath($file->getPath()), strlen($this->realpath($path))), - $this->nsSeparator, - '\\' - ); - - /** @psalm-var class-string */ - $class = $this->prefixes[$path] . str_replace(DIRECTORY_SEPARATOR, '\\', $nsSuffix) . '\\' . str_replace($this->nsSeparator, '\\', $fileName); - } else { - /** @psalm-var class-string */ - $class = str_replace($this->nsSeparator, '\\', $fileName); - } - - $classes[] = $class; - } - } - - return $classes; - } - - /** - * {@inheritDoc} - */ - public function findMappingFile(string $className) - { - $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension; - foreach ($this->paths as $path) { - if (! isset($this->prefixes[$path])) { - if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) { - return $path . DIRECTORY_SEPARATOR . $defaultFileName; - } - - continue; - } - - $prefix = $this->prefixes[$path]; - - if (strpos($className, $prefix . '\\') !== 0) { - continue; - } - - $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension; - if (is_file($filename)) { - return $filename; - } - } - - $pos = strrpos($className, '\\'); - assert(is_int($pos)); - - throw MappingException::mappingFileNotFound( - $className, - substr($className, $pos + 1) . $this->fileExtension - ); - } - - private function realpath(string $path): string - { - $realpath = realpath($path); - - if ($realpath === false) { - throw new RuntimeException(sprintf('Could not get realpath for %s', $path)); - } - - return $realpath; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/MappingException.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/MappingException.php deleted file mode 100644 index f0bc4ebd9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/MappingException.php +++ /dev/null @@ -1,88 +0,0 @@ - $namespaces - * - * @return self - */ - public static function classNotFoundInNamespaces( - string $className, - array $namespaces - ) { - return new self(sprintf( - "The class '%s' was not found in the chain configured namespaces %s", - $className, - implode(', ', $namespaces) - )); - } - - /** @param class-string $driverClassName */ - public static function pathRequiredForDriver(string $driverClassName): self - { - return new self(sprintf( - 'Specifying the paths to your entities is required when using %s to retrieve all class names.', - $driverClassName - )); - } - - /** @return self */ - public static function fileMappingDriversRequireConfiguredDirectoryPath( - ?string $path = null - ) { - if ($path !== null) { - $path = '[' . $path . ']'; - } - - return new self(sprintf( - 'File mapping drivers must have a valid directory path, ' . - 'however the given path %s seems to be incorrect!', - (string) $path - )); - } - - /** @return self */ - public static function mappingFileNotFound(string $entityName, string $fileName) - { - return new self(sprintf( - "No mapping file found named '%s' for class '%s'.", - $fileName, - $entityName - )); - } - - /** @return self */ - public static function invalidMappingFile(string $entityName, string $fileName) - { - return new self(sprintf( - "Invalid mapping file '%s' for class '%s'.", - $fileName, - $entityName - )); - } - - /** @return self */ - public static function nonExistingClass(string $className) - { - return new self(sprintf("Class '%s' does not exist", $className)); - } - - /** @param class-string $className */ - public static function classIsAnonymous(string $className): self - { - return new self(sprintf('Class "%s" is anonymous', $className)); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ProxyClassNameResolver.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ProxyClassNameResolver.php deleted file mode 100644 index 2801d9098..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ProxyClassNameResolver.php +++ /dev/null @@ -1,19 +0,0 @@ ->|class-string $className - * - * @psalm-return class-string - * - * @template T of object - */ - public function resolveClassName(string $className): string; -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ReflectionService.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ReflectionService.php deleted file mode 100644 index 9484e1f3c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/ReflectionService.php +++ /dev/null @@ -1,75 +0,0 @@ - $class - * - * @return ReflectionClass|null - * @psalm-return ReflectionClass|null - * - * @template T of object - */ - public function getClass(string $class); - - /** - * Returns an accessible property (setAccessible(true)) or null. - * - * @psalm-param class-string $class - * - * @return ReflectionProperty|null - */ - public function getAccessibleProperty(string $class, string $property); - - /** - * Checks if the class have a public method with the given name. - * - * @psalm-param class-string $class - * - * @return bool - */ - public function hasPublicMethod(string $class, string $method); -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/RuntimeReflectionService.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/RuntimeReflectionService.php deleted file mode 100644 index 399e05751..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/RuntimeReflectionService.php +++ /dev/null @@ -1,111 +0,0 @@ -supportsTypedPropertiesWorkaround = version_compare(phpversion(), '7.4.0') >= 0; - } - - /** - * {@inheritDoc} - */ - public function getParentClasses(string $class) - { - if (! class_exists($class)) { - throw MappingException::nonExistingClass($class); - } - - $parents = class_parents($class); - - assert($parents !== false); - - return $parents; - } - - /** - * {@inheritDoc} - */ - public function getClassShortName(string $class) - { - $reflectionClass = new ReflectionClass($class); - - return $reflectionClass->getShortName(); - } - - /** - * {@inheritDoc} - */ - public function getClassNamespace(string $class) - { - $reflectionClass = new ReflectionClass($class); - - return $reflectionClass->getNamespaceName(); - } - - /** - * @psalm-param class-string $class - * - * @return ReflectionClass - * @psalm-return ReflectionClass - * - * @template T of object - */ - public function getClass(string $class) - { - return new ReflectionClass($class); - } - - /** - * {@inheritDoc} - */ - public function getAccessibleProperty(string $class, string $property) - { - $reflectionProperty = new RuntimeReflectionProperty($class, $property); - - if ($this->supportsTypedPropertiesWorkaround && ! array_key_exists($property, $this->getClass($class)->getDefaultProperties())) { - $reflectionProperty = new TypedNoDefaultReflectionProperty($class, $property); - } - - $reflectionProperty->setAccessible(true); - - return $reflectionProperty; - } - - /** - * {@inheritDoc} - */ - public function hasPublicMethod(string $class, string $method) - { - try { - $reflectionMethod = new ReflectionMethod($class, $method); - } catch (ReflectionException $e) { - return false; - } - - return $reflectionMethod->isPublic(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/StaticReflectionService.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/StaticReflectionService.php deleted file mode 100644 index c9f21470f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Mapping/StaticReflectionService.php +++ /dev/null @@ -1,78 +0,0 @@ -find($id). - * - * @param string $className The class name of the object to find. - * @param mixed $id The identity of the object to find. - * @psalm-param class-string $className - * - * @return object|null The found object. - * @psalm-return T|null - * - * @template T of object - */ - public function find(string $className, $id); - - /** - * Tells the ObjectManager to make an instance managed and persistent. - * - * The object will be entered into the database as a result of the flush operation. - * - * NOTE: The persist operation always considers objects that are not yet known to - * this ObjectManager as NEW. Do not pass detached objects to the persist operation. - * - * @param object $object The instance to make managed and persistent. - * - * @return void - */ - public function persist(object $object); - - /** - * Removes an object instance. - * - * A removed object will be removed from the database as a result of the flush operation. - * - * @param object $object The object instance to remove. - * - * @return void - */ - public function remove(object $object); - - /** - * Clears the ObjectManager. All objects that are currently managed - * by this ObjectManager become detached. - * - * @return void - */ - public function clear(); - - /** - * Detaches an object from the ObjectManager, causing a managed object to - * become detached. Unflushed changes made to the object if any - * (including removal of the object), will not be synchronized to the database. - * Objects which previously referenced the detached object will continue to - * reference it. - * - * @param object $object The object to detach. - * - * @return void - */ - public function detach(object $object); - - /** - * Refreshes the persistent state of an object from the database, - * overriding any local changes that have not yet been persisted. - * - * @param object $object The object to refresh. - * - * @return void - */ - public function refresh(object $object); - - /** - * Flushes all changes to objects that have been queued up to now to the database. - * This effectively synchronizes the in-memory state of managed objects with the - * database. - * - * @return void - */ - public function flush(); - - /** - * Gets the repository for a class. - * - * @psalm-param class-string $className - * - * @psalm-return ObjectRepository - * - * @template T of object - */ - public function getRepository(string $className); - - /** - * Returns the ClassMetadata descriptor for a class. - * - * The class name must be the fully-qualified class name without a leading backslash - * (as it is returned by get_class($obj)). - * - * @psalm-param class-string $className - * - * @psalm-return ClassMetadata - * - * @template T of object - */ - public function getClassMetadata(string $className); - - /** - * Gets the metadata factory used to gather the metadata of classes. - * - * @psalm-return ClassMetadataFactory> - */ - public function getMetadataFactory(); - - /** - * Helper method to initialize a lazy loading proxy or persistent collection. - * - * This method is a no-op for other objects. - * - * @return void - */ - public function initializeObject(object $obj); - - /** - * Checks if the object is part of the current UnitOfWork and therefore managed. - * - * @return bool - */ - public function contains(object $object); -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ObjectManagerDecorator.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ObjectManagerDecorator.php deleted file mode 100644 index 5855a338e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ObjectManagerDecorator.php +++ /dev/null @@ -1,92 +0,0 @@ -wrapped->find($className, $id); - } - - public function persist(object $object) - { - $this->wrapped->persist($object); - } - - public function remove(object $object) - { - $this->wrapped->remove($object); - } - - public function clear(): void - { - $this->wrapped->clear(); - } - - public function detach(object $object) - { - $this->wrapped->detach($object); - } - - public function refresh(object $object) - { - $this->wrapped->refresh($object); - } - - public function flush() - { - $this->wrapped->flush(); - } - - /** - * {@inheritdoc} - */ - public function getRepository(string $className) - { - return $this->wrapped->getRepository($className); - } - - /** - * {@inheritdoc} - */ - public function getClassMetadata(string $className) - { - return $this->wrapped->getClassMetadata($className); - } - - /** @psalm-return ClassMetadataFactory> */ - public function getMetadataFactory() - { - return $this->wrapped->getMetadataFactory(); - } - - public function initializeObject(object $obj) - { - $this->wrapped->initializeObject($obj); - } - - /** - * {@inheritdoc} - */ - public function contains(object $object) - { - return $this->wrapped->contains($object); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ObjectRepository.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ObjectRepository.php deleted file mode 100644 index a714731e9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/ObjectRepository.php +++ /dev/null @@ -1,73 +0,0 @@ - The objects. - * @psalm-return T[] - */ - public function findAll(); - - /** - * Finds objects by a set of criteria. - * - * Optionally sorting and limiting details can be passed. An implementation may throw - * an UnexpectedValueException if certain values of the sorting or limiting details are - * not supported. - * - * @param array $criteria - * @param array|null $orderBy - * @psalm-param array|null $orderBy - * - * @return array The objects. - * @psalm-return T[] - * - * @throws UnexpectedValueException - */ - public function findBy( - array $criteria, - ?array $orderBy = null, - ?int $limit = null, - ?int $offset = null - ); - - /** - * Finds a single object by a set of criteria. - * - * @param array $criteria The criteria. - * - * @return object|null The object. - * @psalm-return T|null - */ - public function findOneBy(array $criteria); - - /** - * Returns the class name of the object managed by the repository. - * - * @psalm-return class-string - */ - public function getClassName(); -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/PropertyChangedListener.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/PropertyChangedListener.php deleted file mode 100644 index 6b50707ed..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/PropertyChangedListener.php +++ /dev/null @@ -1,24 +0,0 @@ - */ - private $enumType; - - /** @param class-string $enumType */ - public function __construct(ReflectionProperty $originalReflectionProperty, string $enumType) - { - $this->originalReflectionProperty = $originalReflectionProperty; - $this->enumType = $enumType; - } - - /** - * {@inheritDoc} - * - * Converts enum instance to its value. - * - * @param object|null $object - * - * @return int|string|int[]|string[]|null - */ - #[ReturnTypeWillChange] - public function getValue($object = null) - { - if ($object === null) { - return null; - } - - $enum = $this->originalReflectionProperty->getValue($object); - - if ($enum === null) { - return null; - } - - return $this->fromEnum($enum); - } - - /** - * Converts enum value to enum instance. - * - * @param object $object - * @param mixed $value - */ - public function setValue($object, $value = null): void - { - if ($value !== null) { - $value = $this->toEnum($value); - } - - $this->originalReflectionProperty->setValue($object, $value); - } - - /** - * @param BackedEnum|BackedEnum[] $enum - * - * @return ($enum is BackedEnum ? (string|int) : (string[]|int[])) - */ - private function fromEnum($enum) - { - if (is_array($enum)) { - return array_map(static function (BackedEnum $enum) { - return $enum->value; - }, $enum); - } - - return $enum->value; - } - - /** - * @param int|string|int[]|string[] $value - * - * @return ($value is int|string ? BackedEnum : BackedEnum[]) - */ - private function toEnum($value) - { - if (is_array($value)) { - return array_map([$this->enumType, 'from'], $value); - } - - return $this->enumType::from($value); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Reflection/RuntimePublicReflectionProperty.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Reflection/RuntimePublicReflectionProperty.php deleted file mode 100644 index e2367ec17..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Reflection/RuntimePublicReflectionProperty.php +++ /dev/null @@ -1,61 +0,0 @@ -getName()] ?? null : parent::getValue(); - } - - /** - * {@inheritDoc} - * - * Avoids triggering lazy loading via `__set` if the provided object - * is a {@see \Doctrine\Common\Proxy\Proxy}. - * - * @link https://bugs.php.net/bug.php?id=63463 - * - * @param object|null $object - * @param mixed $value - * - * @return void - */ - #[ReturnTypeWillChange] - public function setValue($object, $value = null) - { - if (! ($object instanceof Proxy && ! $object->__isInitialized())) { - parent::setValue($object, $value); - - return; - } - - $originalInitializer = $object->__getInitializer(); - $object->__setInitializer(null); - - parent::setValue($object, $value); - - $object->__setInitializer($originalInitializer); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Reflection/TypedNoDefaultReflectionProperty.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Reflection/TypedNoDefaultReflectionProperty.php deleted file mode 100644 index 5e7062064..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Reflection/TypedNoDefaultReflectionProperty.php +++ /dev/null @@ -1,13 +0,0 @@ -isInitialized($object) ? parent::getValue($object) : null; - } - - /** - * {@inheritDoc} - * - * Works around the problem with setting typed no default properties to - * NULL which is not supported, instead unset() to uninitialize. - * - * @link https://github.com/doctrine/orm/issues/7999 - * - * @param object|null $object - * - * @return void - */ - #[ReturnTypeWillChange] - public function setValue($object, $value = null) - { - if ($value === null && $this->hasType() && ! $this->getType()->allowsNull()) { - $propertyName = $this->getName(); - - $unsetter = function () use ($propertyName): void { - unset($this->$propertyName); - }; - $unsetter = $unsetter->bindTo($object, $this->getDeclaringClass()->getName()); - - assert($unsetter instanceof Closure); - - $unsetter(); - - return; - } - - parent::setValue($object, $value); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Reflection/TypedNoDefaultRuntimePublicReflectionProperty.php b/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Reflection/TypedNoDefaultRuntimePublicReflectionProperty.php deleted file mode 100644 index 181172f25..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/persistence/src/Persistence/Reflection/TypedNoDefaultRuntimePublicReflectionProperty.php +++ /dev/null @@ -1,15 +0,0 @@ - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/README.md b/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/README.md deleted file mode 100644 index 62b42e453..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/README.md +++ /dev/null @@ -1,137 +0,0 @@ -# SqlFormatter - -A lightweight php package for formatting sql statements. - -It can automatically indent and add line breaks in addition to syntax -highlighting. - -## History - -This package is a fork from https://github.com/jdorn/sql-formatter -Here is what the original History section says: - -> I found myself having to debug auto-generated SQL statements all the time and -> wanted some way to easily output formatted HTML without having to include a -> huge library or copy and paste into online formatters. - -> I was originally planning to extract the formatting code from PhpMyAdmin, -> but that was 10,000+ lines of code and used global variables. - -> I saw that other people had the same problem and used Stack Overflow user -> losif's answer as a starting point. http://stackoverflow.com/a/3924147 - -― @jdorn - -## Usage - -The `SqlFormatter` class has a method `format` which takes an SQL string as -input and returns a formatted block. - -Sample usage: - -```php -= NOW()) ) - GROUP BY Column1 ORDER BY Column3 DESC LIMIT 5,10"; - -echo (new SqlFormatter())->format($query); -``` - -Output: - -formatted output with HTML Highlight - -When you run php under cli and instantiated `SqlFormatter` without argument, highlighted with `CliHighlighter`. - -SqlFormatter constructor takes `Highlighter` implementations. `HtmlHighlighter` etc. - - -### Formatting Only - -If you don't want syntax highlighting and only want the indentations and -line breaks, pass in a `NullHighlighter` instance as the second parameter. - -This is useful for outputting to error logs or other non-html formats. - -```php -format($query); -``` - -Output: - -``` -SELECT - count(*), - `Column1`, - `Testing`, - `Testing Three` -FROM - `Table1` -WHERE - Column1 = 'testing' - AND ( - ( - `Column2` = `Column3` - OR Column4 >= NOW() - ) - ) -GROUP BY - Column1 -ORDER BY - Column3 DESC -LIMIT - 5, 10 -``` - -### Syntax Highlighting Only - -There is a separate method `highlight` that preserves all original whitespace -and just adds syntax highlighting. - -This is useful for sql that is already well formatted and just needs to be a -little easier to read. - -```php -highlight($query); -``` - -Output: - -HTML Highlight output - -### Compress Query - -The `compress` method removes all comments and compresses whitespace. - -This is useful for outputting queries that can be copy pasted to the command -line easily. - -```sql --- This is a comment - SELECT - /* This is another comment - On more than one line */ - Id #This is one final comment - as temp, DateCreated as Created FROM MyTable; -``` - -```php -echo (new SqlFormatter())->compress($query); -``` - -Output: - -```sql -SELECT Id as temp, DateCreated as Created FROM MyTable; -``` diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/bin/sql-formatter b/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/bin/sql-formatter deleted file mode 100755 index d3079ef25..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/bin/sql-formatter +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env php -Run this PHP script from the command line to see CLI syntax highlighting and formatting. It supports Unix pipes or command line argument style.

"; - echo "
php bin/sql-formatter \"SELECT * FROM MyTable WHERE (id>5 AND \\`name\\` LIKE \\"testing\\");\"
"; - echo "
echo \"SELECT * FROM MyTable WHERE (id>5 AND \\`name\\` LIKE \\"testing\\");\" | php bin/sql-formatter
"; - exit; -} - -if(isset($argv[1])) { - $sql = $argv[1]; -} -else { - $sql = stream_get_contents(fopen('php://stdin', 'r')); -} - -$autoloadFiles = [ - __DIR__ . '/../vendor/autoload.php', - __DIR__ . '/../../../autoload.php' -]; - -foreach ($autoloadFiles as $autoloadFile) { - if (file_exists($autoloadFile)) { - require_once $autoloadFile; - break; - } -} - -echo (new \Doctrine\SqlFormatter\SqlFormatter())->format($sql); diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/composer.json b/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/composer.json deleted file mode 100644 index d95f87549..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "doctrine/sql-formatter", - "description": "a PHP SQL highlighting library", - "homepage": "https://github.com/doctrine/sql-formatter/", - "keywords": ["sql", "highlight"], - "license": "MIT", - "type": "library", - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4" - }, - "authors": [ - { - "name": "Jeremy Dorn", - "email": "jeremy@jeremydorn.com", - "homepage": "https://jeremydorn.com/" - } - ], - "autoload": { - "psr-4": { - "Doctrine\\SqlFormatter\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\SqlFormatter\\Tests\\": "tests" - } - }, - "config": { - "allow-plugins": { - "bamarni/composer-bin-plugin": true - }, - "sort-packages": true, - "platform": { - "php": "7.1.0" - } - }, - "bin": ["bin/sql-formatter"] -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/CliHighlighter.php b/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/CliHighlighter.php deleted file mode 100644 index c5f388996..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/CliHighlighter.php +++ /dev/null @@ -1,80 +0,0 @@ - */ - private $escapeSequences; - - /** - * @param array $escapeSequences - */ - public function __construct(array $escapeSequences = []) - { - $this->escapeSequences = $escapeSequences + [ - self::HIGHLIGHT_QUOTE => "\x1b[34;1m", - self::HIGHLIGHT_BACKTICK_QUOTE => "\x1b[35;1m", - self::HIGHLIGHT_RESERVED => "\x1b[37m", - self::HIGHLIGHT_BOUNDARY => '', - self::HIGHLIGHT_NUMBER => "\x1b[32;1m", - self::HIGHLIGHT_WORD => '', - self::HIGHLIGHT_ERROR => "\x1b[31;1;7m", - self::HIGHLIGHT_COMMENT => "\x1b[30;1m", - self::HIGHLIGHT_VARIABLE => "\x1b[36;1m", - self::HIGHLIGHT_FUNCTIONS => "\x1b[37m", - ]; - } - - public function highlightToken(int $type, string $value): string - { - if ($type === Token::TOKEN_TYPE_BOUNDARY && ($value === '(' || $value === ')')) { - return $value; - } - - $prefix = $this->prefix($type); - if ($prefix === null) { - return $value; - } - - return $prefix . $value . "\x1b[0m"; - } - - private function prefix(int $type): ?string - { - if (! isset(self::TOKEN_TYPE_TO_HIGHLIGHT[$type])) { - return null; - } - - return $this->escapeSequences[self::TOKEN_TYPE_TO_HIGHLIGHT[$type]]; - } - - public function highlightError(string $value): string - { - return sprintf( - '%s%s%s%s', - PHP_EOL, - $this->escapeSequences[self::HIGHLIGHT_ERROR], - $value, - "\x1b[0m" - ); - } - - public function highlightErrorMessage(string $value): string - { - return $this->highlightError($value); - } - - public function output(string $string): string - { - return $string . "\n"; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Cursor.php b/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Cursor.php deleted file mode 100644 index 0b54a6699..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Cursor.php +++ /dev/null @@ -1,56 +0,0 @@ -tokens = $tokens; - } - - public function next(?int $exceptTokenType = null): ?Token - { - while ($token = $this->tokens[++$this->position] ?? null) { - if ($exceptTokenType !== null && $token->isOfType($exceptTokenType)) { - continue; - } - - return $token; - } - - return null; - } - - public function previous(?int $exceptTokenType = null): ?Token - { - while ($token = $this->tokens[--$this->position] ?? null) { - if ($exceptTokenType !== null && $token->isOfType($exceptTokenType)) { - continue; - } - - return $token; - } - - return null; - } - - public function subCursor(): self - { - $cursor = new self($this->tokens); - $cursor->position = $this->position; - - return $cursor; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Highlighter.php b/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Highlighter.php deleted file mode 100644 index 02c5c97fd..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Highlighter.php +++ /dev/null @@ -1,56 +0,0 @@ - self::HIGHLIGHT_BOUNDARY, - Token::TOKEN_TYPE_WORD => self::HIGHLIGHT_WORD, - Token::TOKEN_TYPE_BACKTICK_QUOTE => self::HIGHLIGHT_BACKTICK_QUOTE, - Token::TOKEN_TYPE_QUOTE => self::HIGHLIGHT_QUOTE, - Token::TOKEN_TYPE_RESERVED => self::HIGHLIGHT_RESERVED, - Token::TOKEN_TYPE_RESERVED_TOPLEVEL => self::HIGHLIGHT_RESERVED, - Token::TOKEN_TYPE_RESERVED_NEWLINE => self::HIGHLIGHT_RESERVED, - Token::TOKEN_TYPE_NUMBER => self::HIGHLIGHT_NUMBER, - Token::TOKEN_TYPE_VARIABLE => self::HIGHLIGHT_VARIABLE, - Token::TOKEN_TYPE_COMMENT => self::HIGHLIGHT_COMMENT, - Token::TOKEN_TYPE_BLOCK_COMMENT => self::HIGHLIGHT_COMMENT, - ]; - - public const HIGHLIGHT_BOUNDARY = 'boundary'; - public const HIGHLIGHT_WORD = 'word'; - public const HIGHLIGHT_BACKTICK_QUOTE = 'backtickQuote'; - public const HIGHLIGHT_QUOTE = 'quote'; - public const HIGHLIGHT_RESERVED = 'reserved'; - public const HIGHLIGHT_NUMBER = 'number'; - public const HIGHLIGHT_VARIABLE = 'variable'; - public const HIGHLIGHT_COMMENT = 'comment'; - public const HIGHLIGHT_ERROR = 'error'; - - /** - * Highlights a token depending on its type. - */ - public function highlightToken(int $type, string $value): string; - - /** - * Highlights a token which causes an issue - */ - public function highlightError(string $value): string; - - /** - * Highlights an error message - */ - public function highlightErrorMessage(string $value): string; - - /** - * Helper function for building string output - * - * @param string $string The string to be quoted - * - * @return string The quoted string - */ - public function output(string $string): string; -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/HtmlHighlighter.php b/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/HtmlHighlighter.php deleted file mode 100644 index 98946b5c5..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/HtmlHighlighter.php +++ /dev/null @@ -1,98 +0,0 @@ - tags - * - * @var bool - */ - private $usePre; - - /** @var array */ - private $htmlAttributes; - - /** - * @param array $htmlAttributes - */ - public function __construct(array $htmlAttributes = [], bool $usePre = true) - { - $this->htmlAttributes = $htmlAttributes + [ - self::HIGHLIGHT_QUOTE => 'style="color: blue;"', - self::HIGHLIGHT_BACKTICK_QUOTE => 'style="color: purple;"', - self::HIGHLIGHT_RESERVED => 'style="font-weight:bold;"', - self::HIGHLIGHT_BOUNDARY => '', - self::HIGHLIGHT_NUMBER => 'style="color: green;"', - self::HIGHLIGHT_WORD => 'style="color: #333;"', - self::HIGHLIGHT_ERROR => 'style="background-color: red;"', - self::HIGHLIGHT_COMMENT => 'style="color: #aaa;"', - self::HIGHLIGHT_VARIABLE => 'style="color: orange;"', - self::HIGHLIGHT_PRE => 'style="color: black; background-color: white;"', - ]; - $this->usePre = $usePre; - } - - public function highlightToken(int $type, string $value): string - { - $value = htmlentities($value, ENT_COMPAT | ENT_IGNORE, 'UTF-8'); - - if ($type === Token::TOKEN_TYPE_BOUNDARY && ($value === '(' || $value === ')')) { - return $value; - } - - $attributes = $this->attributes($type); - if ($attributes === null) { - return $value; - } - - return '' . $value . ''; - } - - public function attributes(int $type): ?string - { - if (! isset(self::TOKEN_TYPE_TO_HIGHLIGHT[$type])) { - return null; - } - - return $this->htmlAttributes[self::TOKEN_TYPE_TO_HIGHLIGHT[$type]]; - } - - public function highlightError(string $value): string - { - return sprintf( - '%s%s', - PHP_EOL, - $this->htmlAttributes[self::HIGHLIGHT_ERROR], - $value - ); - } - - public function highlightErrorMessage(string $value): string - { - return $this->highlightError($value); - } - - public function output(string $string): string - { - $string = trim($string); - if (! $this->usePre) { - return $string; - } - - return '
htmlAttributes[self::HIGHLIGHT_PRE] . '>' . $string . '
'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/NullHighlighter.php b/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/NullHighlighter.php deleted file mode 100644 index b62c998a9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/NullHighlighter.php +++ /dev/null @@ -1,28 +0,0 @@ -tokenizer = new Tokenizer(); - $this->highlighter = $highlighter ?? (PHP_SAPI === 'cli' ? new CliHighlighter() : new HtmlHighlighter()); - } - - /** - * Format the whitespace in a SQL string to make it easier to read. - * - * @param string $string The SQL string - * - * @return string The SQL string with HTML styles and formatting wrapped in a
 tag
-     */
-    public function format(string $string, string $indentString = '  '): string
-    {
-        // This variable will be populated with formatted html
-        $return = '';
-
-        // Use an actual tab while formatting and then switch out with $indentString at the end
-        $tab = "\t";
-
-        $indentLevel           = 0;
-        $newline               = false;
-        $inlineParentheses     = false;
-        $increaseSpecialIndent = false;
-        $increaseBlockIndent   = false;
-        $indentTypes           = [];
-        $addedNewline          = false;
-        $inlineCount           = 0;
-        $inlineIndented        = false;
-        $clauseLimit           = false;
-
-        // Tokenize String
-        $cursor = $this->tokenizer->tokenize($string);
-
-        // Format token by token
-        while ($token = $cursor->next(Token::TOKEN_TYPE_WHITESPACE)) {
-            $highlighted = $this->highlighter->highlightToken(
-                $token->type(),
-                $token->value()
-            );
-
-            // If we are increasing the special indent level now
-            if ($increaseSpecialIndent) {
-                $indentLevel++;
-                $increaseSpecialIndent = false;
-                array_unshift($indentTypes, 'special');
-            }
-
-            // If we are increasing the block indent level now
-            if ($increaseBlockIndent) {
-                $indentLevel++;
-                $increaseBlockIndent = false;
-                array_unshift($indentTypes, 'block');
-            }
-
-            // If we need a new line before the token
-            if ($newline) {
-                $return       = rtrim($return, ' ');
-                $return      .= "\n" . str_repeat($tab, $indentLevel);
-                $newline      = false;
-                $addedNewline = true;
-            } else {
-                $addedNewline = false;
-            }
-
-            // Display comments directly where they appear in the source
-            if ($token->isOfType(Token::TOKEN_TYPE_COMMENT, Token::TOKEN_TYPE_BLOCK_COMMENT)) {
-                if ($token->isOfType(Token::TOKEN_TYPE_BLOCK_COMMENT)) {
-                    $indent      = str_repeat($tab, $indentLevel);
-                    $return      = rtrim($return, " \t");
-                    $return     .= "\n" . $indent;
-                    $highlighted = str_replace("\n", "\n" . $indent, $highlighted);
-                }
-
-                $return .= $highlighted;
-                $newline = true;
-                continue;
-            }
-
-            if ($inlineParentheses) {
-                // End of inline parentheses
-                if ($token->value() === ')') {
-                    $return = rtrim($return, ' ');
-
-                    if ($inlineIndented) {
-                        array_shift($indentTypes);
-                        $indentLevel--;
-                        $return  = rtrim($return, ' ');
-                        $return .= "\n" . str_repeat($tab, $indentLevel);
-                    }
-
-                    $inlineParentheses = false;
-
-                    $return .= $highlighted . ' ';
-                    continue;
-                }
-
-                if ($token->value() === ',') {
-                    if ($inlineCount >= 30) {
-                        $inlineCount = 0;
-                        $newline     = true;
-                    }
-                }
-
-                $inlineCount += strlen($token->value());
-            }
-
-            // Opening parentheses increase the block indent level and start a new line
-            if ($token->value() === '(') {
-                // First check if this should be an inline parentheses block
-                // Examples are "NOW()", "COUNT(*)", "int(10)", key(`somecolumn`), DECIMAL(7,2)
-                // Allow up to 3 non-whitespace tokens inside inline parentheses
-                $length    = 0;
-                $subCursor = $cursor->subCursor();
-                for ($j = 1; $j <= 250; $j++) {
-                    // Reached end of string
-                    $next = $subCursor->next(Token::TOKEN_TYPE_WHITESPACE);
-                    if (! $next) {
-                        break;
-                    }
-
-                    // Reached closing parentheses, able to inline it
-                    if ($next->value() === ')') {
-                        $inlineParentheses = true;
-                        $inlineCount       = 0;
-                        $inlineIndented    = false;
-                        break;
-                    }
-
-                    // Reached an invalid token for inline parentheses
-                    if ($next->value() === ';' || $next->value() === '(') {
-                        break;
-                    }
-
-                    // Reached an invalid token type for inline parentheses
-                    if (
-                        $next->isOfType(
-                            Token::TOKEN_TYPE_RESERVED_TOPLEVEL,
-                            Token::TOKEN_TYPE_RESERVED_NEWLINE,
-                            Token::TOKEN_TYPE_COMMENT,
-                            Token::TOKEN_TYPE_BLOCK_COMMENT
-                        )
-                    ) {
-                        break;
-                    }
-
-                    $length += strlen($next->value());
-                }
-
-                if ($inlineParentheses && $length > 30) {
-                    $increaseBlockIndent = true;
-                    $inlineIndented      = true;
-                    $newline             = true;
-                }
-
-                // Take out the preceding space unless there was whitespace there in the original query
-                $prevToken = $cursor->subCursor()->previous();
-                if ($prevToken && ! $prevToken->isOfType(Token::TOKEN_TYPE_WHITESPACE)) {
-                    $return = rtrim($return, ' ');
-                }
-
-                if (! $inlineParentheses) {
-                    $increaseBlockIndent = true;
-                    // Add a newline after the parentheses
-                    $newline = true;
-                }
-            } elseif ($token->value() === ')') {
-                // Closing parentheses decrease the block indent level
-                // Remove whitespace before the closing parentheses
-                $return = rtrim($return, ' ');
-
-                $indentLevel--;
-
-                // Reset indent level
-                while ($j = array_shift($indentTypes)) {
-                    if ($j !== 'special') {
-                        break;
-                    }
-
-                    $indentLevel--;
-                }
-
-                if ($indentLevel < 0) {
-                    // This is an error
-                    $indentLevel = 0;
-
-                    $return .= $this->highlighter->highlightError($token->value());
-                    continue;
-                }
-
-                // Add a newline before the closing parentheses (if not already added)
-                if (! $addedNewline) {
-                    $return .= "\n" . str_repeat($tab, $indentLevel);
-                }
-            } elseif ($token->isOfType(Token::TOKEN_TYPE_RESERVED_TOPLEVEL)) {
-                // Top level reserved words start a new line and increase the special indent level
-                $increaseSpecialIndent = true;
-
-                // If the last indent type was 'special', decrease the special indent for this round
-                reset($indentTypes);
-                if (current($indentTypes) === 'special') {
-                    $indentLevel--;
-                    array_shift($indentTypes);
-                }
-
-                // Add a newline after the top level reserved word
-                $newline = true;
-                // Add a newline before the top level reserved word (if not already added)
-                if (! $addedNewline) {
-                    $return  = rtrim($return, ' ');
-                    $return .= "\n" . str_repeat($tab, $indentLevel);
-                } else {
-                    // If we already added a newline, redo the indentation since it may be different now
-                    $return = rtrim($return, $tab) . str_repeat($tab, $indentLevel);
-                }
-
-                if ($token->hasExtraWhitespace()) {
-                    $highlighted = preg_replace('/\s+/', ' ', $highlighted);
-                }
-
-                //if SQL 'LIMIT' clause, start variable to reset newline
-                if ($token->value() === 'LIMIT' && ! $inlineParentheses) {
-                    $clauseLimit = true;
-                }
-            } elseif (
-                $clauseLimit &&
-                $token->value() !== ',' &&
-                ! $token->isOfType(Token::TOKEN_TYPE_NUMBER, Token::TOKEN_TYPE_WHITESPACE)
-            ) {
-                // Checks if we are out of the limit clause
-                $clauseLimit = false;
-            } elseif ($token->value() === ',' && ! $inlineParentheses) {
-                // Commas start a new line (unless within inline parentheses or SQL 'LIMIT' clause)
-                //If the previous TOKEN_VALUE is 'LIMIT', resets new line
-                if ($clauseLimit === true) {
-                    $newline     = false;
-                    $clauseLimit = false;
-                } else {
-                    // All other cases of commas
-                    $newline = true;
-                }
-            } elseif ($token->isOfType(Token::TOKEN_TYPE_RESERVED_NEWLINE)) {
-            // Newline reserved words start a new line
-                // Add a newline before the reserved word (if not already added)
-                if (! $addedNewline) {
-                    $return  = rtrim($return, ' ');
-                    $return .= "\n" . str_repeat($tab, $indentLevel);
-                }
-
-                if ($token->hasExtraWhitespace()) {
-                    $highlighted = preg_replace('/\s+/', ' ', $highlighted);
-                }
-            } elseif ($token->isOfType(Token::TOKEN_TYPE_BOUNDARY)) {
-                // Multiple boundary characters in a row should not have spaces between them (not including parentheses)
-                $prevNotWhitespaceToken = $cursor->subCursor()->previous(Token::TOKEN_TYPE_WHITESPACE);
-                if ($prevNotWhitespaceToken && $prevNotWhitespaceToken->isOfType(Token::TOKEN_TYPE_BOUNDARY)) {
-                    $prevToken = $cursor->subCursor()->previous();
-                    if ($prevToken && ! $prevToken->isOfType(Token::TOKEN_TYPE_WHITESPACE)) {
-                        $return = rtrim($return, ' ');
-                    }
-                }
-            }
-
-            // If the token shouldn't have a space before it
-            if (
-                $token->value() === '.' ||
-                $token->value() === ',' ||
-                $token->value() === ';'
-            ) {
-                $return = rtrim($return, ' ');
-            }
-
-            $return .= $highlighted . ' ';
-
-            // If the token shouldn't have a space after it
-            if ($token->value() === '(' || $token->value() === '.') {
-                $return = rtrim($return, ' ');
-            }
-
-            // If this is the "-" of a negative number, it shouldn't have a space after it
-            if ($token->value() !== '-') {
-                continue;
-            }
-
-            $nextNotWhitespace = $cursor->subCursor()->next(Token::TOKEN_TYPE_WHITESPACE);
-            if (! $nextNotWhitespace || ! $nextNotWhitespace->isOfType(Token::TOKEN_TYPE_NUMBER)) {
-                continue;
-            }
-
-            $prev = $cursor->subCursor()->previous(Token::TOKEN_TYPE_WHITESPACE);
-            if (! $prev) {
-                continue;
-            }
-
-            if (
-                $prev->isOfType(
-                    Token::TOKEN_TYPE_QUOTE,
-                    Token::TOKEN_TYPE_BACKTICK_QUOTE,
-                    Token::TOKEN_TYPE_WORD,
-                    Token::TOKEN_TYPE_NUMBER
-                )
-            ) {
-                continue;
-            }
-
-            $return = rtrim($return, ' ');
-        }
-
-        // If there are unmatched parentheses
-        if (array_search('block', $indentTypes) !== false) {
-            $return  = rtrim($return, ' ');
-            $return .= $this->highlighter->highlightErrorMessage(
-                'WARNING: unclosed parentheses or section'
-            );
-        }
-
-        // Replace tab characters with the configuration tab character
-        $return = trim(str_replace("\t", $indentString, $return));
-
-        return $this->highlighter->output($return);
-    }
-
-    /**
-     * Add syntax highlighting to a SQL string
-     *
-     * @param string $string The SQL string
-     *
-     * @return string The SQL string with HTML styles applied
-     */
-    public function highlight(string $string): string
-    {
-        $cursor = $this->tokenizer->tokenize($string);
-
-        $return = '';
-
-        while ($token = $cursor->next()) {
-            $return .= $this->highlighter->highlightToken(
-                $token->type(),
-                $token->value()
-            );
-        }
-
-        return $this->highlighter->output($return);
-    }
-
-    /**
-     * Compress a query by collapsing white space and removing comments
-     *
-     * @param string $string The SQL string
-     *
-     * @return string The SQL string without comments
-     */
-    public function compress(string $string): string
-    {
-        $result = '';
-        $cursor = $this->tokenizer->tokenize($string);
-
-        $whitespace = true;
-        while ($token = $cursor->next()) {
-            // Skip comment tokens
-            if ($token->isOfType(Token::TOKEN_TYPE_COMMENT, Token::TOKEN_TYPE_BLOCK_COMMENT)) {
-                continue;
-            }
-
-            // Remove extra whitespace in reserved words (e.g "OUTER     JOIN" becomes "OUTER JOIN")
-
-            if (
-                $token->isOfType(
-                    Token::TOKEN_TYPE_RESERVED,
-                    Token::TOKEN_TYPE_RESERVED_NEWLINE,
-                    Token::TOKEN_TYPE_RESERVED_TOPLEVEL
-                )
-            ) {
-                $newValue = preg_replace('/\s+/', ' ', $token->value());
-                assert($newValue !== null);
-                $token = $token->withValue($newValue);
-            }
-
-            if ($token->isOfType(Token::TOKEN_TYPE_WHITESPACE)) {
-                // If the last token was whitespace, don't add another one
-                if ($whitespace) {
-                    continue;
-                }
-
-                $whitespace = true;
-                // Convert all whitespace to a single space
-                $token = $token->withValue(' ');
-            } else {
-                $whitespace = false;
-            }
-
-            $result .= $token->value();
-        }
-
-        return rtrim($result);
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Token.php b/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Token.php
deleted file mode 100644
index b3be48bfc..000000000
--- a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Token.php
+++ /dev/null
@@ -1,69 +0,0 @@
-type  = $type;
-        $this->value = $value;
-    }
-
-    public function value(): string
-    {
-        return $this->value;
-    }
-
-    public function type(): int
-    {
-        return $this->type;
-    }
-
-    public function isOfType(int ...$types): bool
-    {
-        return in_array($this->type, $types, true);
-    }
-
-    public function hasExtraWhitespace(): bool
-    {
-        return strpos($this->value(), ' ') !== false ||
-            strpos($this->value(), "\n") !== false ||
-            strpos($this->value(), "\t") !== false;
-    }
-
-    public function withValue(string $value): self
-    {
-        return new self($this->type(), $value);
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Tokenizer.php b/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Tokenizer.php
deleted file mode 100644
index d5e75cd8c..000000000
--- a/fixtures/symfony_5_local_deps/vendor/doctrine/sql-formatter/src/Tokenizer.php
+++ /dev/null
@@ -1,999 +0,0 @@
-',
-        '+',
-        '-',
-        '*',
-        '/',
-        '!',
-        '^',
-        '%',
-        '|',
-        '&',
-        '#',
-    ];
-
-    /**
-     * Stuff that only needs to be done once. Builds regular expressions and
-     * sorts the reserved words.
-     */
-    public function __construct()
-    {
-        // Sort reserved word list from longest word to shortest, 3x faster than usort
-        $reservedMap = array_combine($this->reserved, array_map('strlen', $this->reserved));
-        assert($reservedMap !== false);
-        arsort($reservedMap);
-        $this->reserved = array_keys($reservedMap);
-
-        // Set up regular expressions
-        $this->regexBoundaries       = '(' . implode(
-            '|',
-            $this->quoteRegex($this->boundaries)
-        ) . ')';
-        $this->regexReserved         = '(' . implode(
-            '|',
-            $this->quoteRegex($this->reserved)
-        ) . ')';
-        $this->regexReservedToplevel = str_replace(' ', '\\s+', '(' . implode(
-            '|',
-            $this->quoteRegex($this->reservedToplevel)
-        ) . ')');
-        $this->regexReservedNewline  = str_replace(' ', '\\s+', '(' . implode(
-            '|',
-            $this->quoteRegex($this->reservedNewline)
-        ) . ')');
-
-        $this->regexFunction = '(' . implode('|', $this->quoteRegex($this->functions)) . ')';
-    }
-
-    /**
-     * Takes a SQL string and breaks it into tokens.
-     * Each token is an associative array with type and value.
-     *
-     * @param string $string The SQL string
-     */
-    public function tokenize(string $string): Cursor
-    {
-        $tokens = [];
-
-        // Used to make sure the string keeps shrinking on each iteration
-        $oldStringLen = strlen($string) + 1;
-
-        $token = null;
-
-        $currentLength = strlen($string);
-
-        // Keep processing the string until it is empty
-        while ($currentLength) {
-            // If the string stopped shrinking, there was a problem
-            if ($oldStringLen <= $currentLength) {
-                $tokens[] = new Token(Token::TOKEN_TYPE_ERROR, $string);
-
-                return new Cursor($tokens);
-            }
-
-            $oldStringLen =  $currentLength;
-
-            // Get the next token and the token type
-            $token       = $this->createNextToken($string, $token);
-            $tokenLength = strlen($token->value());
-
-            $tokens[] = $token;
-
-            // Advance the string
-            $string = substr($string, $tokenLength);
-
-            $currentLength -= $tokenLength;
-        }
-
-        return new Cursor($tokens);
-    }
-
-    /**
-     * Return the next token and token type in a SQL string.
-     * Quoted strings, comments, reserved words, whitespace, and punctuation
-     * are all their own tokens.
-     *
-     * @param string     $string   The SQL string
-     * @param Token|null $previous The result of the previous createNextToken() call
-     *
-     * @return Token An associative array containing the type and value of the token.
-     */
-    private function createNextToken(string $string, ?Token $previous = null): Token
-    {
-        $matches = [];
-        // Whitespace
-        if (preg_match('/^\s+/', $string, $matches)) {
-            return new Token(Token::TOKEN_TYPE_WHITESPACE, $matches[0]);
-        }
-
-        // Comment
-        if (
-            $string[0] === '#' ||
-            (isset($string[1]) && ($string[0] === '-' && $string[1] === '-') ||
-            (isset($string[1]) && $string[0] === '/' && $string[1] === '*'))
-        ) {
-            // Comment until end of line
-            if ($string[0] === '-' || $string[0] === '#') {
-                $last = strpos($string, "\n");
-                $type = Token::TOKEN_TYPE_COMMENT;
-            } else { // Comment until closing comment tag
-                $pos = strpos($string, '*/', 2);
-                assert($pos !== false);
-                $last = $pos + 2;
-                $type = Token::TOKEN_TYPE_BLOCK_COMMENT;
-            }
-
-            if ($last === false) {
-                $last = strlen($string);
-            }
-
-            return new Token($type, substr($string, 0, $last));
-        }
-
-        // Quoted String
-        if ($string[0] === '"' || $string[0] === '\'' || $string[0] === '`' || $string[0] === '[') {
-            return new Token(
-                ($string[0] === '`' || $string[0] === '['
-                    ? Token::TOKEN_TYPE_BACKTICK_QUOTE
-                    : Token::TOKEN_TYPE_QUOTE),
-                $this->getQuotedString($string)
-            );
-        }
-
-        // User-defined Variable
-        if (($string[0] === '@' || $string[0] === ':') && isset($string[1])) {
-            $value = null;
-            $type  = Token::TOKEN_TYPE_VARIABLE;
-
-            // If the variable name is quoted
-            if ($string[1] === '"' || $string[1] === '\'' || $string[1] === '`') {
-                $value = $string[0] . $this->getQuotedString(substr($string, 1));
-            } else {
-                // Non-quoted variable name
-                preg_match('/^(' . $string[0] . '[a-zA-Z0-9\._\$]+)/', $string, $matches);
-                if ($matches) {
-                    $value = $matches[1];
-                }
-            }
-
-            if ($value !== null) {
-                return new Token($type, $value);
-            }
-        }
-
-        // Number (decimal, binary, or hex)
-        if (
-            preg_match(
-                '/^([0-9]+(\.[0-9]+)?|0x[0-9a-fA-F]+|0b[01]+)($|\s|"\'`|' . $this->regexBoundaries . ')/',
-                $string,
-                $matches
-            )
-        ) {
-            return new Token(Token::TOKEN_TYPE_NUMBER, $matches[1]);
-        }
-
-        // Boundary Character (punctuation and symbols)
-        if (preg_match('/^(' . $this->regexBoundaries . ')/', $string, $matches)) {
-            return new Token(Token::TOKEN_TYPE_BOUNDARY, $matches[1]);
-        }
-
-        // A reserved word cannot be preceded by a '.'
-        // this makes it so in "mytable.from", "from" is not considered a reserved word
-        if (! $previous || $previous->value() !== '.') {
-            $upper = strtoupper($string);
-            // Top Level Reserved Word
-            if (
-                preg_match(
-                    '/^(' . $this->regexReservedToplevel . ')($|\s|' . $this->regexBoundaries . ')/',
-                    $upper,
-                    $matches
-                )
-            ) {
-                return new Token(
-                    Token::TOKEN_TYPE_RESERVED_TOPLEVEL,
-                    substr($string, 0, strlen($matches[1]))
-                );
-            }
-
-            // Newline Reserved Word
-            if (
-                preg_match(
-                    '/^(' . $this->regexReservedNewline . ')($|\s|' . $this->regexBoundaries . ')/',
-                    $upper,
-                    $matches
-                )
-            ) {
-                return new Token(
-                    Token::TOKEN_TYPE_RESERVED_NEWLINE,
-                    substr($string, 0, strlen($matches[1]))
-                );
-            }
-
-            // Other Reserved Word
-            if (
-                preg_match(
-                    '/^(' . $this->regexReserved . ')($|\s|' . $this->regexBoundaries . ')/',
-                    $upper,
-                    $matches
-                )
-            ) {
-                return new Token(
-                    Token::TOKEN_TYPE_RESERVED,
-                    substr($string, 0, strlen($matches[1]))
-                );
-            }
-        }
-
-        // A function must be succeeded by '('
-        // this makes it so "count(" is considered a function, but "count" alone is not
-        $upper = strtoupper($string);
-        // function
-        if (preg_match('/^(' . $this->regexFunction . '[(]|\s|[)])/', $upper, $matches)) {
-            return new Token(
-                Token::TOKEN_TYPE_RESERVED,
-                substr($string, 0, strlen($matches[1]) - 1)
-            );
-        }
-
-        // Non reserved word
-        preg_match('/^(.*?)($|\s|["\'`]|' . $this->regexBoundaries . ')/', $string, $matches);
-
-        return new Token(Token::TOKEN_TYPE_WORD, $matches[1]);
-    }
-
-    /**
-     * Helper function for building regular expressions for reserved words and boundary characters
-     *
-     * @param string[] $strings The strings to be quoted
-     *
-     * @return string[] The quoted strings
-     */
-    private function quoteRegex(array $strings): array
-    {
-        return array_map(static function (string $string): string {
-            return preg_quote($string, '/');
-        }, $strings);
-    }
-
-    private function getQuotedString(string $string): string
-    {
-        $ret = '';
-
-        // This checks for the following patterns:
-        // 1. backtick quoted string using `` to escape
-        // 2. square bracket quoted string (SQL Server) using ]] to escape
-        // 3. double quoted string using "" or \" to escape
-        // 4. single quoted string using '' or \' to escape
-        if (
-            preg_match(
-                '/^(((`[^`]*($|`))+)|
-            ((\[[^\]]*($|\]))(\][^\]]*($|\]))*)|
-            (("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)|
-            ((\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*(\'|$))+))/sx',
-                $string,
-                $matches
-            )
-        ) {
-            $ret = $matches[1];
-        }
-
-        return $ret;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/CHANGELOG.md b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/CHANGELOG.md
deleted file mode 100644
index 39f5a8a05..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/CHANGELOG.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# EmailValidator Changelog
-
-## New Features
-
-* Access to local part and domain part from EmailParser
-* Validations outside of the scope of the RFC will be considered "extra" validations, thus opening the door for adding new; will live in their own folder "extra" (as requested in #248, #195, #183). 
-
-## Breaking changes
-
-* PHP version upgraded to match Symfony's (as of 12/2020).
-* DNSCheckValidation now fails for missing MX records. While the RFC argues that the existence of only A records to be valid, starting in v3 they will be considered invalid.
-* Emails domain part are now intenteded to be RFC 1035 compliant, rendering previous valid emails (e.g example@examp&) invalid.
-
-## PHP versions upgrade policy
-PHP version upgrade requirement will happen via MINOR (3.x) version upgrades of the library, following the adoption level by major frameworks.
-
-## Changes
-* #235
-* #215
-* #130
-* #258
-* #188
-* #181
-* #217
-* #214
-* #249
-* #236
-* #257
-* #210
-
-## Thanks
-To contributors, be it with PRs, reporting issues or supporting otherwise.
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/CONTRIBUTING.md b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/CONTRIBUTING.md
deleted file mode 100644
index 907bc2c9b..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/CONTRIBUTING.md
+++ /dev/null
@@ -1,153 +0,0 @@
-# Contributing
-
-When contributing to this repository make sure to follow the Pull request process below.
-Reduce to the minimum 3rd party dependencies.
-
-Please note we have a [code of conduct](#Code of Conduct), please follow it in all your interactions with the project.
-
-## Pull Request Process
-
-When doing a PR to v2 remember that you also have to do the PR port to v3, or tests confirming the bug is not reproducible.
-
-1. Supported version is v3. If you are fixing a bug in v2, please port to v3
-2. Use the title as a brief description of the changes
-3. Describe the changes you are proposing
-    1. If adding an extra validation state the benefits of adding it and the problem is solving
-    2. Document in the readme, by adding it to the list
-4. Provide appropriate tests for the code you are submitting: aim to keep the existing coverage percentage.
-5. Add your Twitter handle (if you have) so we can thank you there.
-
-## License
-By contributing, you agree that your contributions will be licensed under its MIT License.
-
-## Code of Conduct
-
-### Our Pledge
-
-We as members, contributors, and leaders pledge to make participation in our
-community a harassment-free experience for everyone, regardless of age, body
-size, visible or invisible disability, ethnicity, sex characteristics, gender
-identity and expression, level of experience, education, socio-economic status,
-nationality, personal appearance, race, religion, or sexual identity
-and orientation.
-
-We pledge to act and interact in ways that contribute to an open, welcoming,
-diverse, inclusive, and healthy community.
-
-### Our Standards
-
-Examples of behavior that contributes to a positive environment for our
-community include:
-
-* Demonstrating empathy and kindness toward other people
-* Being respectful of differing opinions, viewpoints, and experiences
-* Giving and gracefully accepting constructive feedback
-* Accepting responsibility and apologizing to those affected by our mistakes,
-  and learning from the experience
-* Focusing on what is best not just for us as individuals, but for the
-  overall community
-
-Examples of unacceptable behavior include:
-
-* The use of sexualized language or imagery, and sexual attention or
-  advances of any kind
-* Trolling, insulting or derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or email
-  address, without their explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
-  professional setting
-
-### Enforcement Responsibilities
-
-Community leaders are responsible for clarifying and enforcing our standards of
-acceptable behavior and will take appropriate and fair corrective action in
-response to any behavior that they deem inappropriate, threatening, offensive,
-or harmful.
-
-Community leaders have the right and responsibility to remove, edit, or reject
-comments, commits, code, wiki edits, issues, and other contributions that are
-not aligned to this Code of Conduct, and will communicate reasons for moderation
-decisions when appropriate.
-
-### Scope
-
-This Code of Conduct applies within all community spaces, and also applies when
-an individual is officially representing the community in public spaces.
-Examples of representing our community include using an official e-mail address,
-posting via an official social media account, or acting as an appointed
-representative at an online or offline event.
-
-### Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported to the community leaders responsible for enforcement at .
-All complaints will be reviewed and investigated promptly and fairly.
-
-All community leaders are obligated to respect the privacy and security of the
-reporter of any incident.
-
-#### Enforcement Guidelines
-
-Community leaders will follow these Community Impact Guidelines in determining
-the consequences for any action they deem in violation of this Code of Conduct:
-
-#### 1. Correction
-
-**Community Impact**: Use of inappropriate language or other behavior deemed
-unprofessional or unwelcome in the community.
-
-**Consequence**: A private, written warning from community leaders, providing
-clarity around the nature of the violation and an explanation of why the
-behavior was inappropriate. A public apology may be requested.
-
-#### 2. Warning
-
-**Community Impact**: A violation through a single incident or series
-of actions.
-
-**Consequence**: A warning with consequences for continued behavior. No
-interaction with the people involved, including unsolicited interaction with
-those enforcing the Code of Conduct, for a specified period of time. This
-includes avoiding interactions in community spaces as well as external channels
-like social media. Violating these terms may lead to a temporary or
-permanent ban.
-
-#### 3. Temporary Ban
-
-**Community Impact**: A serious violation of community standards, including
-sustained inappropriate behavior.
-
-**Consequence**: A temporary ban from any sort of interaction or public
-communication with the community for a specified period of time. No public or
-private interaction with the people involved, including unsolicited interaction
-with those enforcing the Code of Conduct, is allowed during this period.
-Violating these terms may lead to a permanent ban.
-
-#### 4. Permanent Ban
-
-**Community Impact**: Demonstrating a pattern of violation of community
-standards, including sustained inappropriate behavior,  harassment of an
-individual, or aggression toward or disparagement of classes of individuals.
-
-**Consequence**: A permanent ban from any sort of public interaction within
-the community.
-
-### Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage],
-version 2.0, available at
-[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
-
-Community Impact Guidelines were inspired by
-[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
-
-For answers to common questions about this code of conduct, see the FAQ at
-[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
-at [https://www.contributor-covenant.org/translations][translations].
-
-[homepage]: https://www.contributor-covenant.org
-[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
-[Mozilla CoC]: https://github.com/mozilla/diversity
-[FAQ]: https://www.contributor-covenant.org/faq
-[translations]: https://www.contributor-covenant.org/translations
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/LICENSE b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/LICENSE
deleted file mode 100644
index b1902a4e9..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2013-2023 Eduardo Gulias Davis
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/composer.json b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/composer.json
deleted file mode 100644
index bf1b3f4c9..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/composer.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
-  "name":        "egulias/email-validator",
-  "description": "A library for validating emails against several RFCs",
-  "homepage":    "https://github.com/egulias/EmailValidator",
-  "keywords":    ["email", "validation", "validator", "emailvalidation", "emailvalidator"],
-  "license":     "MIT",
-  "authors": [
-    {"name": "Eduardo Gulias Davis"}
-  ],
-  "extra": {
-    "branch-alias": {
-      "dev-master": "4.0.x-dev"
-    }
-  },
-  "require": {
-    "php": ">=8.1",
-    "doctrine/lexer": "^2.0 || ^3.0",
-    "symfony/polyfill-intl-idn": "^1.26"
-  },
-  "require-dev": {
-    "phpunit/phpunit": "^10.2",
-    "vimeo/psalm": "^5.12"
-  },
-  "suggest": {
-    "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
-  },
-  "autoload": {
-    "psr-4": {
-      "Egulias\\EmailValidator\\": "src"
-    }
-  },
-  "autoload-dev": {
-    "psr-4": {
-      "Egulias\\EmailValidator\\Tests\\": "tests"
-    }
-  }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/EmailLexer.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/EmailLexer.php
deleted file mode 100644
index 969c049f8..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/EmailLexer.php
+++ /dev/null
@@ -1,330 +0,0 @@
- */
-class EmailLexer extends AbstractLexer
-{
-    //ASCII values
-    public const S_EMPTY            = -1;
-    public const C_NUL              = 0;
-    public const S_HTAB             = 9;
-    public const S_LF               = 10;
-    public const S_CR               = 13;
-    public const S_SP               = 32;
-    public const EXCLAMATION        = 33;
-    public const S_DQUOTE           = 34;
-    public const NUMBER_SIGN        = 35;
-    public const DOLLAR             = 36;
-    public const PERCENTAGE         = 37;
-    public const AMPERSAND          = 38;
-    public const S_SQUOTE           = 39;
-    public const S_OPENPARENTHESIS  = 40;
-    public const S_CLOSEPARENTHESIS = 41;
-    public const ASTERISK           = 42;
-    public const S_PLUS             = 43;
-    public const S_COMMA            = 44;
-    public const S_HYPHEN           = 45;
-    public const S_DOT              = 46;
-    public const S_SLASH            = 47;
-    public const S_COLON            = 58;
-    public const S_SEMICOLON        = 59;
-    public const S_LOWERTHAN        = 60;
-    public const S_EQUAL            = 61;
-    public const S_GREATERTHAN      = 62;
-    public const QUESTIONMARK       = 63;
-    public const S_AT               = 64;
-    public const S_OPENBRACKET      = 91;
-    public const S_BACKSLASH        = 92;
-    public const S_CLOSEBRACKET     = 93;
-    public const CARET              = 94;
-    public const S_UNDERSCORE       = 95;
-    public const S_BACKTICK         = 96;
-    public const S_OPENCURLYBRACES  = 123;
-    public const S_PIPE             = 124;
-    public const S_CLOSECURLYBRACES = 125;
-    public const S_TILDE            = 126;
-    public const C_DEL              = 127;
-    public const INVERT_QUESTIONMARK = 168;
-    public const INVERT_EXCLAMATION = 173;
-    public const GENERIC            = 300;
-    public const S_IPV6TAG          = 301;
-    public const INVALID            = 302;
-    public const CRLF               = 1310;
-    public const S_DOUBLECOLON      = 5858;
-    public const ASCII_INVALID_FROM = 127;
-    public const ASCII_INVALID_TO   = 199;
-
-    /**
-     * US-ASCII visible characters not valid for atext (@link http://tools.ietf.org/html/rfc5322#section-3.2.3)
-     *
-     * @var array
-     */
-    protected $charValue = [
-        '{'    => self::S_OPENCURLYBRACES,
-        '}'    => self::S_CLOSECURLYBRACES,
-        '('    => self::S_OPENPARENTHESIS,
-        ')'    => self::S_CLOSEPARENTHESIS,
-        '<'    => self::S_LOWERTHAN,
-        '>'    => self::S_GREATERTHAN,
-        '['    => self::S_OPENBRACKET,
-        ']'    => self::S_CLOSEBRACKET,
-        ':'    => self::S_COLON,
-        ';'    => self::S_SEMICOLON,
-        '@'    => self::S_AT,
-        '\\'   => self::S_BACKSLASH,
-        '/'    => self::S_SLASH,
-        ','    => self::S_COMMA,
-        '.'    => self::S_DOT,
-        "'"    => self::S_SQUOTE,
-        "`"    => self::S_BACKTICK,
-        '"'    => self::S_DQUOTE,
-        '-'    => self::S_HYPHEN,
-        '::'   => self::S_DOUBLECOLON,
-        ' '    => self::S_SP,
-        "\t"   => self::S_HTAB,
-        "\r"   => self::S_CR,
-        "\n"   => self::S_LF,
-        "\r\n" => self::CRLF,
-        'IPv6' => self::S_IPV6TAG,
-        ''     => self::S_EMPTY,
-        '\0'   => self::C_NUL,
-        '*'    => self::ASTERISK,
-        '!'    => self::EXCLAMATION,
-        '&'    => self::AMPERSAND,
-        '^'    => self::CARET,
-        '$'    => self::DOLLAR,
-        '%'    => self::PERCENTAGE,
-        '~'    => self::S_TILDE,
-        '|'    => self::S_PIPE,
-        '_'    => self::S_UNDERSCORE,
-        '='    => self::S_EQUAL,
-        '+'    => self::S_PLUS,
-        '¿'    => self::INVERT_QUESTIONMARK,
-        '?'    => self::QUESTIONMARK,
-        '#'    => self::NUMBER_SIGN,
-        '¡'    => self::INVERT_EXCLAMATION,
-    ];
-
-    public const INVALID_CHARS_REGEX = "/[^\p{S}\p{C}\p{Cc}]+/iu";
-
-    public const VALID_UTF8_REGEX = '/\p{Cc}+/u';
-
-    public const CATCHABLE_PATTERNS = [
-        '[a-zA-Z]+[46]?', //ASCII and domain literal
-        '[^\x00-\x7F]',  //UTF-8
-        '[0-9]+',
-        '\r\n',
-        '::',
-        '\s+?',
-        '.',
-    ];
-
-    public const NON_CATCHABLE_PATTERNS = [
-        '[\xA0-\xff]+',
-    ];
-
-    public const MODIFIERS = 'iu';
-
-    /** @var bool */
-    protected $hasInvalidTokens = false;
-
-    /**
-     * @var Token
-     */
-    protected Token $previous;
-
-    /**
-     * The last matched/seen token.
-     *
-     * @var Token
-     */
-    public Token $current;
-
-    /**
-     * @var Token
-     */
-    private Token $nullToken;
-
-    /** @var string */
-    private $accumulator = '';
-
-    /** @var bool */
-    private $hasToRecord = false;
-
-    public function __construct()
-    {
-        /** @var Token $nullToken */
-        $nullToken = new Token('', self::S_EMPTY, 0);
-        $this->nullToken = $nullToken;
-
-        $this->current = $this->previous = $this->nullToken;
-        $this->lookahead = null;
-    }
-
-    public function reset(): void
-    {
-        $this->hasInvalidTokens = false;
-        parent::reset();
-        $this->current = $this->previous = $this->nullToken;
-    }
-
-    /**
-     * @param int $type
-     * @throws \UnexpectedValueException
-     * @return boolean
-     *
-     * @psalm-suppress InvalidScalarArgument
-     */
-    public function find($type): bool
-    {
-        $search = clone $this;
-        $search->skipUntil($type);
-
-        if (!$search->lookahead) {
-            throw new \UnexpectedValueException($type . ' not found');
-        }
-        return true;
-    }
-
-    /**
-     * moveNext
-     *
-     * @return boolean
-     */
-    public function moveNext(): bool
-    {
-        if ($this->hasToRecord && $this->previous === $this->nullToken) {
-            $this->accumulator .= $this->current->value;
-        }
-
-        $this->previous = $this->current;
-
-        if ($this->lookahead === null) {
-            $this->lookahead = $this->nullToken;
-        }
-
-        $hasNext = parent::moveNext();
-        $this->current = $this->token ?? $this->nullToken;
-
-        if ($this->hasToRecord) {
-            $this->accumulator .= $this->current->value;
-        }
-
-        return $hasNext;
-    }
-
-    /**
-     * Retrieve token type. Also processes the token value if necessary.
-     *
-     * @param string $value
-     * @throws \InvalidArgumentException
-     * @return integer
-     */
-    protected function getType(&$value): int
-    {
-        $encoded = $value;
-
-        if (mb_detect_encoding($value, 'auto', true) !== 'UTF-8') {
-            $encoded = mb_convert_encoding($value, 'UTF-8', 'Windows-1252');
-        }
-
-        if ($this->isValid($encoded)) {
-            return $this->charValue[$encoded];
-        }
-
-        if ($this->isNullType($encoded)) {
-            return self::C_NUL;
-        }
-
-        if ($this->isInvalidChar($encoded)) {
-            $this->hasInvalidTokens = true;
-            return self::INVALID;
-        }
-
-        return self::GENERIC;
-    }
-
-    protected function isValid(string $value): bool
-    {
-        return isset($this->charValue[$value]);
-    }
-
-    protected function isNullType(string $value): bool
-    {
-        return $value === "\0";
-    }
-
-    protected function isInvalidChar(string $value): bool
-    {
-        return !preg_match(self::INVALID_CHARS_REGEX, $value);
-    }
-
-    protected function isUTF8Invalid(string $value): bool
-    {
-        return preg_match(self::VALID_UTF8_REGEX, $value) !== false;
-    }
-
-    public function hasInvalidTokens(): bool
-    {
-        return $this->hasInvalidTokens;
-    }
-
-    /**
-     * getPrevious
-     *
-     * @return Token
-     */
-    public function getPrevious(): Token
-    {
-        return $this->previous;
-    }
-
-    /**
-     * Lexical catchable patterns.
-     *
-     * @return string[]
-     */
-    protected function getCatchablePatterns(): array
-    {
-        return self::CATCHABLE_PATTERNS;
-    }
-
-    /**
-     * Lexical non-catchable patterns.
-     *
-     * @return string[]
-     */
-    protected function getNonCatchablePatterns(): array
-    {
-        return self::NON_CATCHABLE_PATTERNS;
-    }
-
-    protected function getModifiers(): string
-    {
-        return self::MODIFIERS;
-    }
-
-    public function getAccumulatedValues(): string
-    {
-        return $this->accumulator;
-    }
-
-    public function startRecording(): void
-    {
-        $this->hasToRecord = true;
-    }
-
-    public function stopRecording(): void
-    {
-        $this->hasToRecord = false;
-    }
-
-    public function clearRecorded(): void
-    {
-        $this->accumulator = '';
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/EmailParser.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/EmailParser.php
deleted file mode 100644
index fc449c76f..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/EmailParser.php
+++ /dev/null
@@ -1,90 +0,0 @@
-addLongEmailWarning($this->localPart, $this->domainPart);
-
-        return $result;
-    }
-
-    protected function preLeftParsing(): Result
-    {
-        if (!$this->hasAtToken()) {
-            return new InvalidEmail(new NoLocalPart(), $this->lexer->current->value);
-        }
-        return new ValidEmail();
-    }
-
-    protected function parseLeftFromAt(): Result
-    {
-        return $this->processLocalPart();
-    }
-
-    protected function parseRightFromAt(): Result
-    {
-        return $this->processDomainPart();
-    }
-
-    private function processLocalPart(): Result
-    {
-        $localPartParser = new LocalPart($this->lexer);
-        $localPartResult = $localPartParser->parse();
-        $this->localPart = $localPartParser->localPart();
-        $this->warnings = [...$localPartParser->getWarnings(), ...$this->warnings];
-
-        return $localPartResult;
-    }
-
-    private function processDomainPart(): Result
-    {
-        $domainPartParser = new DomainPart($this->lexer);
-        $domainPartResult = $domainPartParser->parse();
-        $this->domainPart = $domainPartParser->domainPart();
-        $this->warnings = [...$domainPartParser->getWarnings(), ...$this->warnings];
-
-        return $domainPartResult;
-    }
-
-    public function getDomainPart(): string
-    {
-        return $this->domainPart;
-    }
-
-    public function getLocalPart(): string
-    {
-        return $this->localPart;
-    }
-
-    private function addLongEmailWarning(string $localPart, string $parsedDomainPart): void
-    {
-        if (strlen($localPart . '@' . $parsedDomainPart) > self::EMAIL_MAX_LENGTH) {
-            $this->warnings[EmailTooLong::CODE] = new EmailTooLong();
-        }
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/EmailValidator.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/EmailValidator.php
deleted file mode 100644
index 5a2e5c822..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/EmailValidator.php
+++ /dev/null
@@ -1,67 +0,0 @@
-lexer = new EmailLexer();
-    }
-
-    /**
-     * @param string          $email
-     * @param EmailValidation $emailValidation
-     * @return bool
-     */
-    public function isValid(string $email, EmailValidation $emailValidation)
-    {
-        $isValid = $emailValidation->isValid($email, $this->lexer);
-        $this->warnings = $emailValidation->getWarnings();
-        $this->error = $emailValidation->getError();
-
-        return $isValid;
-    }
-
-    /**
-     * @return boolean
-     */
-    public function hasWarnings()
-    {
-        return !empty($this->warnings);
-    }
-
-    /**
-     * @return array
-     */
-    public function getWarnings()
-    {
-        return $this->warnings;
-    }
-
-    /**
-     * @return InvalidEmail|null
-     */
-    public function getError()
-    {
-        return $this->error;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/MessageIDParser.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/MessageIDParser.php
deleted file mode 100644
index 35bd0a7f1..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/MessageIDParser.php
+++ /dev/null
@@ -1,91 +0,0 @@
-addLongEmailWarning($this->idLeft, $this->idRight);
-
-        return $result;
-    }
-
-    protected function preLeftParsing(): Result
-    {
-        if (!$this->hasAtToken()) {
-            return new InvalidEmail(new NoLocalPart(), $this->lexer->current->value);
-        }
-        return new ValidEmail();
-    }
-
-    protected function parseLeftFromAt(): Result
-    {
-        return $this->processIDLeft();
-    }
-
-    protected function parseRightFromAt(): Result
-    {
-        return $this->processIDRight();
-    }
-
-    private function processIDLeft(): Result
-    {
-        $localPartParser = new IDLeftPart($this->lexer);
-        $localPartResult = $localPartParser->parse();
-        $this->idLeft = $localPartParser->localPart();
-        $this->warnings = [...$localPartParser->getWarnings(), ...$this->warnings];
-
-        return $localPartResult;
-    }
-
-    private function processIDRight(): Result
-    {
-        $domainPartParser = new IDRightPart($this->lexer);
-        $domainPartResult = $domainPartParser->parse();
-        $this->idRight = $domainPartParser->domainPart();
-        $this->warnings = [...$domainPartParser->getWarnings(), ...$this->warnings];
-
-        return $domainPartResult;
-    }
-
-    public function getLeftPart(): string
-    {
-        return $this->idLeft;
-    }
-
-    public function getRightPart(): string
-    {
-        return $this->idRight;
-    }
-
-    private function addLongEmailWarning(string $localPart, string $parsedDomainPart): void
-    {
-        if (strlen($localPart . '@' . $parsedDomainPart) > self::EMAILID_MAX_LENGTH) {
-            $this->warnings[EmailTooLong::CODE] = new EmailTooLong();
-        }
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser.php
deleted file mode 100644
index d577e3eae..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser.php
+++ /dev/null
@@ -1,78 +0,0 @@
-lexer = $lexer;
-    }
-
-    public function parse(string $str): Result
-    {
-        $this->lexer->setInput($str);
-
-        if ($this->lexer->hasInvalidTokens()) {
-            return new InvalidEmail(new ExpectingATEXT("Invalid tokens found"), $this->lexer->current->value);
-        }
-
-        $preParsingResult = $this->preLeftParsing();
-        if ($preParsingResult->isInvalid()) {
-            return $preParsingResult;
-        }
-
-        $localPartResult = $this->parseLeftFromAt();
-
-        if ($localPartResult->isInvalid()) {
-            return $localPartResult;
-        }
-
-        $domainPartResult = $this->parseRightFromAt();
-
-        if ($domainPartResult->isInvalid()) {
-            return $domainPartResult;
-        }
-
-        return new ValidEmail();
-    }
-
-    /**
-     * @return Warning\Warning[]
-     */
-    public function getWarnings(): array
-    {
-        return $this->warnings;
-    }
-
-    protected function hasAtToken(): bool
-    {
-        $this->lexer->moveNext();
-        $this->lexer->moveNext();
-
-        return !$this->lexer->current->isA(EmailLexer::S_AT);
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/Comment.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/Comment.php
deleted file mode 100644
index 7b5b47e29..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/Comment.php
+++ /dev/null
@@ -1,102 +0,0 @@
-lexer = $lexer;
-        $this->commentStrategy = $commentStrategy;
-    }
-
-    public function parse(): Result
-    {
-        if ($this->lexer->current->isA(EmailLexer::S_OPENPARENTHESIS)) {
-            $this->openedParenthesis++;
-            if ($this->noClosingParenthesis()) {
-                return new InvalidEmail(new UnclosedComment(), $this->lexer->current->value);
-            }
-        }
-
-        if ($this->lexer->current->isA(EmailLexer::S_CLOSEPARENTHESIS)) {
-            return new InvalidEmail(new UnOpenedComment(), $this->lexer->current->value);
-        }
-
-        $this->warnings[WarningComment::CODE] = new WarningComment();
-
-        $moreTokens = true;
-        while ($this->commentStrategy->exitCondition($this->lexer, $this->openedParenthesis) && $moreTokens) {
-
-            if ($this->lexer->isNextToken(EmailLexer::S_OPENPARENTHESIS)) {
-                $this->openedParenthesis++;
-            }
-            $this->warnEscaping();
-            if ($this->lexer->isNextToken(EmailLexer::S_CLOSEPARENTHESIS)) {
-                $this->openedParenthesis--;
-            }
-            $moreTokens = $this->lexer->moveNext();
-        }
-
-        if ($this->openedParenthesis >= 1) {
-            return new InvalidEmail(new UnclosedComment(), $this->lexer->current->value);
-        }
-        if ($this->openedParenthesis < 0) {
-            return new InvalidEmail(new UnOpenedComment(), $this->lexer->current->value);
-        }
-
-        $finalValidations = $this->commentStrategy->endOfLoopValidations($this->lexer);
-
-        $this->warnings = [...$this->warnings, ...$this->commentStrategy->getWarnings()];
-
-        return $finalValidations;
-    }
-
-
-    /**
-     * @return void
-     */
-    private function warnEscaping(): void
-    {
-        //Backslash found
-        if (!$this->lexer->current->isA(EmailLexer::S_BACKSLASH)) {
-            return;
-        }
-
-        if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB, EmailLexer::C_DEL))) {
-            return;
-        }
-
-        $this->warnings[QuotedPart::CODE] =
-            new QuotedPart($this->lexer->getPrevious()->type, $this->lexer->current->type);
-    }
-
-    private function noClosingParenthesis(): bool
-    {
-        try {
-            $this->lexer->find(EmailLexer::S_CLOSEPARENTHESIS);
-            return false;
-        } catch (\RuntimeException $e) {
-            return true;
-        }
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/CommentStrategy/CommentStrategy.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/CommentStrategy/CommentStrategy.php
deleted file mode 100644
index 8834db04c..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/CommentStrategy/CommentStrategy.php
+++ /dev/null
@@ -1,22 +0,0 @@
-isNextToken(EmailLexer::S_DOT));
-    }
-
-    public function endOfLoopValidations(EmailLexer $lexer): Result
-    {
-        //test for end of string
-        if (!$lexer->isNextToken(EmailLexer::S_DOT)) {
-            return new InvalidEmail(new ExpectingATEXT('DOT not found near CLOSEPARENTHESIS'), $lexer->current->value);
-        }
-        //add warning
-        //Address is valid within the message but cannot be used unmodified for the envelope
-        return new ValidEmail();
-    }
-
-    public function getWarnings(): array
-    {
-        return [];
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php
deleted file mode 100644
index 5c18b440b..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php
+++ /dev/null
@@ -1,37 +0,0 @@
-isNextToken(EmailLexer::S_AT);
-    }
-
-    public function endOfLoopValidations(EmailLexer $lexer): Result
-    {
-        if (!$lexer->isNextToken(EmailLexer::S_AT)) {
-            return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), $lexer->current->value);
-        }
-        $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt();
-        return new ValidEmail();
-    }
-
-    public function getWarnings(): array
-    {
-        return $this->warnings;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/DomainLiteral.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/DomainLiteral.php
deleted file mode 100644
index 5093e5083..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/DomainLiteral.php
+++ /dev/null
@@ -1,210 +0,0 @@
-addTagWarnings();
-
-        $IPv6TAG = false;
-        $addressLiteral = '';
-
-        do {
-            if ($this->lexer->current->isA(EmailLexer::C_NUL)) {
-                return new InvalidEmail(new ExpectingDTEXT(), $this->lexer->current->value);
-            }
-
-            $this->addObsoleteWarnings();
-
-            if ($this->lexer->isNextTokenAny(array(EmailLexer::S_OPENBRACKET, EmailLexer::S_OPENBRACKET))) {
-                return new InvalidEmail(new ExpectingDTEXT(), $this->lexer->current->value);
-            }
-
-            if ($this->lexer->isNextTokenAny(
-                array(EmailLexer::S_HTAB, EmailLexer::S_SP, EmailLexer::CRLF)
-            )) {
-                $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS();
-                $this->parseFWS();
-            }
-
-            if ($this->lexer->isNextToken(EmailLexer::S_CR)) {
-                return new InvalidEmail(new CRNoLF(), $this->lexer->current->value);
-            }
-
-            if ($this->lexer->current->isA(EmailLexer::S_BACKSLASH)) {
-                return new InvalidEmail(new UnusualElements($this->lexer->current->value), $this->lexer->current->value);
-            }
-            if ($this->lexer->current->isA(EmailLexer::S_IPV6TAG)) {
-                $IPv6TAG = true;
-            }
-
-            if ($this->lexer->current->isA(EmailLexer::S_CLOSEBRACKET)) {
-                break;
-            }
-
-            $addressLiteral .= $this->lexer->current->value;
-        } while ($this->lexer->moveNext());
-
-
-        //Encapsulate
-        $addressLiteral = str_replace('[', '', $addressLiteral);
-        $isAddressLiteralIPv4 = $this->checkIPV4Tag($addressLiteral);
-
-        if (!$isAddressLiteralIPv4) {
-            return new ValidEmail();
-        }
-
-        $addressLiteral = $this->convertIPv4ToIPv6($addressLiteral);
-
-        if (!$IPv6TAG) {
-            $this->warnings[WarningDomainLiteral::CODE] = new WarningDomainLiteral();
-            return new ValidEmail();
-        }
-
-        $this->warnings[AddressLiteral::CODE] = new AddressLiteral();
-
-        $this->checkIPV6Tag($addressLiteral);
-
-        return new ValidEmail();
-    }
-
-    /**
-     * @param string $addressLiteral
-     * @param int $maxGroups
-     */
-    public function checkIPV6Tag($addressLiteral, $maxGroups = 8): void
-    {
-        $prev = $this->lexer->getPrevious();
-        if ($prev->isA(EmailLexer::S_COLON)) {
-            $this->warnings[IPV6ColonEnd::CODE] = new IPV6ColonEnd();
-        }
-
-        $IPv6       = substr($addressLiteral, 5);
-        //Daniel Marschall's new IPv6 testing strategy
-        $matchesIP  = explode(':', $IPv6);
-        $groupCount = count($matchesIP);
-        $colons     = strpos($IPv6, '::');
-
-        if (count(preg_grep('/^[0-9A-Fa-f]{0,4}$/', $matchesIP, PREG_GREP_INVERT)) !== 0) {
-            $this->warnings[IPV6BadChar::CODE] = new IPV6BadChar();
-        }
-
-        if ($colons === false) {
-            // We need exactly the right number of groups
-            if ($groupCount !== $maxGroups) {
-                $this->warnings[IPV6GroupCount::CODE] = new IPV6GroupCount();
-            }
-            return;
-        }
-
-        if ($colons !== strrpos($IPv6, '::')) {
-            $this->warnings[IPV6DoubleColon::CODE] = new IPV6DoubleColon();
-            return;
-        }
-
-        if ($colons === 0 || $colons === (strlen($IPv6) - 2)) {
-            // RFC 4291 allows :: at the start or end of an address
-            //with 7 other groups in addition
-            ++$maxGroups;
-        }
-
-        if ($groupCount > $maxGroups) {
-            $this->warnings[IPV6MaxGroups::CODE] = new IPV6MaxGroups();
-        } elseif ($groupCount === $maxGroups) {
-            $this->warnings[IPV6Deprecated::CODE] = new IPV6Deprecated();
-        }
-    }
-
-    public function convertIPv4ToIPv6(string $addressLiteralIPv4): string
-    {
-        $matchesIP  = [];
-        $IPv4Match = preg_match(self::IPV4_REGEX, $addressLiteralIPv4, $matchesIP);
-
-        // Extract IPv4 part from the end of the address-literal (if there is one)
-        if ($IPv4Match > 0) {
-            $index = (int) strrpos($addressLiteralIPv4, $matchesIP[0]);
-            //There's a match but it is at the start
-            if ($index > 0) {
-                // Convert IPv4 part to IPv6 format for further testing
-                return substr($addressLiteralIPv4, 0, $index) . '0:0';
-            }
-        }
-
-        return $addressLiteralIPv4;
-    }
-
-    /**
-     * @param string $addressLiteral
-     *
-     * @return bool
-     */
-    protected function checkIPV4Tag($addressLiteral): bool
-    {
-        $matchesIP  = [];
-        $IPv4Match = preg_match(self::IPV4_REGEX, $addressLiteral, $matchesIP);
-
-        // Extract IPv4 part from the end of the address-literal (if there is one)
-
-        if ($IPv4Match > 0) {
-            $index = strrpos($addressLiteral, $matchesIP[0]);
-            //There's a match but it is at the start
-            if ($index === 0) {
-                $this->warnings[AddressLiteral::CODE] = new AddressLiteral();
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    private function addObsoleteWarnings(): void
-    {
-        if (in_array($this->lexer->current->type, self::OBSOLETE_WARNINGS)) {
-            $this->warnings[ObsoleteDTEXT::CODE] = new ObsoleteDTEXT();
-        }
-    }
-
-    private function addTagWarnings(): void
-    {
-        if ($this->lexer->isNextToken(EmailLexer::S_COLON)) {
-            $this->warnings[IPV6ColonStart::CODE] = new IPV6ColonStart();
-        }
-        if ($this->lexer->isNextToken(EmailLexer::S_IPV6TAG)) {
-            $lexer = clone $this->lexer;
-            $lexer->moveNext();
-            if ($lexer->isNextToken(EmailLexer::S_DOUBLECOLON)) {
-                $this->warnings[IPV6ColonStart::CODE] = new IPV6ColonStart();
-            }
-        }
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/DomainPart.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/DomainPart.php
deleted file mode 100644
index a1a56cf3d..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/DomainPart.php
+++ /dev/null
@@ -1,326 +0,0 @@
-lexer->clearRecorded();
-        $this->lexer->startRecording();
-
-        $this->lexer->moveNext();
-
-        $domainChecks = $this->performDomainStartChecks();
-        if ($domainChecks->isInvalid()) {
-            return $domainChecks;
-        }
-
-        if ($this->lexer->current->isA(EmailLexer::S_AT)) {
-            return new InvalidEmail(new ConsecutiveAt(), $this->lexer->current->value);
-        }
-
-        $result = $this->doParseDomainPart();
-        if ($result->isInvalid()) {
-            return $result;
-        }
-
-        $end = $this->checkEndOfDomain();
-        if ($end->isInvalid()) {
-            return $end;
-        }
-
-        $this->lexer->stopRecording();
-        $this->domainPart = $this->lexer->getAccumulatedValues();
-
-        $length = strlen($this->domainPart);
-        if ($length > self::DOMAIN_MAX_LENGTH) {
-            return new InvalidEmail(new DomainTooLong(), $this->lexer->current->value);
-        }
-
-        return new ValidEmail();
-    }
-
-    private function checkEndOfDomain(): Result
-    {
-        $prev = $this->lexer->getPrevious();
-        if ($prev->isA(EmailLexer::S_DOT)) {
-            return new InvalidEmail(new DotAtEnd(), $this->lexer->current->value);
-        }
-        if ($prev->isA(EmailLexer::S_HYPHEN)) {
-            return new InvalidEmail(new DomainHyphened('Hypen found at the end of the domain'), $prev->value);
-        }
-
-        if ($this->lexer->current->isA(EmailLexer::S_SP)) {
-            return new InvalidEmail(new CRLFAtTheEnd(), $prev->value);
-        }
-        return new ValidEmail();
-    }
-
-    private function performDomainStartChecks(): Result
-    {
-        $invalidTokens = $this->checkInvalidTokensAfterAT();
-        if ($invalidTokens->isInvalid()) {
-            return $invalidTokens;
-        }
-
-        $missingDomain = $this->checkEmptyDomain();
-        if ($missingDomain->isInvalid()) {
-            return $missingDomain;
-        }
-
-        if ($this->lexer->current->isA(EmailLexer::S_OPENPARENTHESIS)) {
-            $this->warnings[DeprecatedComment::CODE] = new DeprecatedComment();
-        }
-        return new ValidEmail();
-    }
-
-    private function checkEmptyDomain(): Result
-    {
-        $thereIsNoDomain = $this->lexer->current->isA(EmailLexer::S_EMPTY) ||
-            ($this->lexer->current->isA(EmailLexer::S_SP) &&
-                !$this->lexer->isNextToken(EmailLexer::GENERIC));
-
-        if ($thereIsNoDomain) {
-            return new InvalidEmail(new NoDomainPart(), $this->lexer->current->value);
-        }
-
-        return new ValidEmail();
-    }
-
-    private function checkInvalidTokensAfterAT(): Result
-    {
-        if ($this->lexer->current->isA(EmailLexer::S_DOT)) {
-            return new InvalidEmail(new DotAtStart(), $this->lexer->current->value);
-        }
-        if ($this->lexer->current->isA(EmailLexer::S_HYPHEN)) {
-            return new InvalidEmail(new DomainHyphened('After AT'), $this->lexer->current->value);
-        }
-        return new ValidEmail();
-    }
-
-    protected function parseComments(): Result
-    {
-        $commentParser = new Comment($this->lexer, new DomainComment());
-        $result = $commentParser->parse();
-        $this->warnings = [...$this->warnings, ...$commentParser->getWarnings()];
-
-        return $result;
-    }
-
-    protected function doParseDomainPart(): Result
-    {
-        $tldMissing = true;
-        $hasComments = false;
-        $domain = '';
-        do {
-            $prev = $this->lexer->getPrevious();
-
-            $notAllowedChars = $this->checkNotAllowedChars($this->lexer->current);
-            if ($notAllowedChars->isInvalid()) {
-                return $notAllowedChars;
-            }
-
-            if (
-                $this->lexer->current->isA(EmailLexer::S_OPENPARENTHESIS) ||
-                $this->lexer->current->isA(EmailLexer::S_CLOSEPARENTHESIS)
-            ) {
-                $hasComments = true;
-                $commentsResult = $this->parseComments();
-
-                //Invalid comment parsing
-                if ($commentsResult->isInvalid()) {
-                    return $commentsResult;
-                }
-            }
-
-            $dotsResult = $this->checkConsecutiveDots();
-            if ($dotsResult->isInvalid()) {
-                return $dotsResult;
-            }
-
-            if ($this->lexer->current->isA(EmailLexer::S_OPENBRACKET)) {
-                $literalResult = $this->parseDomainLiteral();
-
-                $this->addTLDWarnings($tldMissing);
-                return $literalResult;
-            }
-
-            $labelCheck = $this->checkLabelLength();
-            if ($labelCheck->isInvalid()) {
-                return $labelCheck;
-            }
-
-            $FwsResult = $this->parseFWS();
-            if ($FwsResult->isInvalid()) {
-                return $FwsResult;
-            }
-
-            $domain .= $this->lexer->current->value;
-
-            if ($this->lexer->current->isA(EmailLexer::S_DOT) && $this->lexer->isNextToken(EmailLexer::GENERIC)) {
-                $tldMissing = false;
-            }
-
-            $exceptionsResult = $this->checkDomainPartExceptions($prev, $hasComments);
-            if ($exceptionsResult->isInvalid()) {
-                return $exceptionsResult;
-            }
-            $this->lexer->moveNext();
-        } while (!$this->lexer->current->isA(EmailLexer::S_EMPTY));
-
-        $labelCheck = $this->checkLabelLength(true);
-        if ($labelCheck->isInvalid()) {
-            return $labelCheck;
-        }
-        $this->addTLDWarnings($tldMissing);
-
-        $this->domainPart = $domain;
-        return new ValidEmail();
-    }
-
-     /**
-     * @param Token $token
-     *
-     * @return Result
-     */
-    private function checkNotAllowedChars(Token $token): Result
-    {
-        $notAllowed = [EmailLexer::S_BACKSLASH => true, EmailLexer::S_SLASH => true];
-        if (isset($notAllowed[$token->type])) {
-            return new InvalidEmail(new CharNotAllowed(), $token->value);
-        }
-        return new ValidEmail();
-    }
-
-    /**
-     * @return Result
-     */
-    protected function parseDomainLiteral(): Result
-    {
-        try {
-            $this->lexer->find(EmailLexer::S_CLOSEBRACKET);
-        } catch (\RuntimeException $e) {
-            return new InvalidEmail(new ExpectingDomainLiteralClose(), $this->lexer->current->value);
-        }
-
-        $domainLiteralParser = new DomainLiteralParser($this->lexer);
-        $result = $domainLiteralParser->parse();
-        $this->warnings = [...$this->warnings, ...$domainLiteralParser->getWarnings()];
-        return $result;
-    }
-
-    /**
-     * @param Token $prev
-     * @param bool $hasComments
-     *
-     * @return Result
-     */
-    protected function checkDomainPartExceptions(Token $prev, bool $hasComments): Result
-    {
-        if ($this->lexer->current->isA(EmailLexer::S_OPENBRACKET) && $prev->type !== EmailLexer::S_AT) {
-            return new InvalidEmail(new ExpectingATEXT('OPENBRACKET not after AT'), $this->lexer->current->value);
-        }
-
-        if ($this->lexer->current->isA(EmailLexer::S_HYPHEN) && $this->lexer->isNextToken(EmailLexer::S_DOT)) {
-            return new InvalidEmail(new DomainHyphened('Hypen found near DOT'), $this->lexer->current->value);
-        }
-
-        if (
-            $this->lexer->current->isA(EmailLexer::S_BACKSLASH)
-            && $this->lexer->isNextToken(EmailLexer::GENERIC)
-        ) {
-            return new InvalidEmail(new ExpectingATEXT('Escaping following "ATOM"'), $this->lexer->current->value);
-        }
-
-        return $this->validateTokens($hasComments);
-    }
-
-    protected function validateTokens(bool $hasComments): Result
-    {
-        $validDomainTokens = array(
-            EmailLexer::GENERIC => true,
-            EmailLexer::S_HYPHEN => true,
-            EmailLexer::S_DOT => true,
-        );
-
-        if ($hasComments) {
-            $validDomainTokens[EmailLexer::S_OPENPARENTHESIS] = true;
-            $validDomainTokens[EmailLexer::S_CLOSEPARENTHESIS] = true;
-        }
-
-        if (!isset($validDomainTokens[$this->lexer->current->type])) {
-            return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->current->value), $this->lexer->current->value);
-        }
-
-        return new ValidEmail();
-    }
-
-    private function checkLabelLength(bool $isEndOfDomain = false): Result
-    {
-        if ($this->lexer->current->isA(EmailLexer::S_DOT) || $isEndOfDomain) {
-            if ($this->isLabelTooLong($this->label)) {
-                return new InvalidEmail(new LabelTooLong(), $this->lexer->current->value);
-            }
-            $this->label = '';
-        }
-        $this->label .= $this->lexer->current->value;
-        return new ValidEmail();
-    }
-
-
-    private function isLabelTooLong(string $label): bool
-    {
-        if (preg_match('/[^\x00-\x7F]/', $label)) {
-            idn_to_ascii($label, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46, $idnaInfo);
-            return (bool) ($idnaInfo['errors'] & IDNA_ERROR_LABEL_TOO_LONG);
-        }
-        return strlen($label) > self::LABEL_MAX_LENGTH;
-    }
-
-    private function addTLDWarnings(bool $isTLDMissing): void
-    {
-        if ($isTLDMissing) {
-            $this->warnings[TLD::CODE] = new TLD();
-        }
-    }
-
-    public function domainPart(): string
-    {
-        return $this->domainPart;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/DoubleQuote.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/DoubleQuote.php
deleted file mode 100644
index b5335d300..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/DoubleQuote.php
+++ /dev/null
@@ -1,91 +0,0 @@
-checkDQUOTE();
-        if ($validQuotedString->isInvalid()) {
-            return $validQuotedString;
-        }
-
-        $special = [
-            EmailLexer::S_CR => true,
-            EmailLexer::S_HTAB => true,
-            EmailLexer::S_LF => true
-        ];
-
-        $invalid = [
-            EmailLexer::C_NUL => true,
-            EmailLexer::S_HTAB => true,
-            EmailLexer::S_CR => true,
-            EmailLexer::S_LF => true
-        ];
-
-        $setSpecialsWarning = true;
-
-        $this->lexer->moveNext();
-
-        while (!$this->lexer->current->isA(EmailLexer::S_DQUOTE) && !$this->lexer->current->isA(EmailLexer::S_EMPTY)) {
-            if (isset($special[$this->lexer->current->type]) && $setSpecialsWarning) {
-                $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS();
-                $setSpecialsWarning = false;
-            }
-            if ($this->lexer->current->isA(EmailLexer::S_BACKSLASH) && $this->lexer->isNextToken(EmailLexer::S_DQUOTE)) {
-                $this->lexer->moveNext();
-            }
-
-            $this->lexer->moveNext();
-
-            if (!$this->escaped() && isset($invalid[$this->lexer->current->type])) {
-                return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->current->value);
-            }
-        }
-
-        $prev = $this->lexer->getPrevious();
-
-        if ($prev->isA(EmailLexer::S_BACKSLASH)) {
-            $validQuotedString = $this->checkDQUOTE();
-            if ($validQuotedString->isInvalid()) {
-                return $validQuotedString;
-            }
-        }
-
-        if (!$this->lexer->isNextToken(EmailLexer::S_AT) && !$prev->isA(EmailLexer::S_BACKSLASH)) {
-            return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->current->value);
-        }
-
-        return new ValidEmail();
-    }
-
-    protected function checkDQUOTE(): Result
-    {
-        $previous = $this->lexer->getPrevious();
-
-        if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous->isA(EmailLexer::GENERIC)) {
-            $description = 'https://tools.ietf.org/html/rfc5322#section-3.2.4 - quoted string should be a unit';
-            return new InvalidEmail(new ExpectingATEXT($description), $this->lexer->current->value);
-        }
-
-        try {
-            $this->lexer->find(EmailLexer::S_DQUOTE);
-        } catch (\Exception $e) {
-            return new InvalidEmail(new UnclosedQuotedString(), $this->lexer->current->value);
-        }
-        $this->warnings[QuotedString::CODE] = new QuotedString($previous->value, $this->lexer->current->value);
-
-        return new ValidEmail();
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/FoldingWhiteSpace.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/FoldingWhiteSpace.php
deleted file mode 100644
index 348a7af44..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/FoldingWhiteSpace.php
+++ /dev/null
@@ -1,87 +0,0 @@
-isFWS()) {
-            return new ValidEmail();
-        }
-
-        $previous = $this->lexer->getPrevious();
-
-        $resultCRLF = $this->checkCRLFInFWS();
-        if ($resultCRLF->isInvalid()) {
-            return $resultCRLF;
-        }
-
-        if ($this->lexer->current->isA(EmailLexer::S_CR)) {
-            return new InvalidEmail(new CRNoLF(), $this->lexer->current->value);
-        }
-
-        if ($this->lexer->isNextToken(EmailLexer::GENERIC) && !$previous->isA(EmailLexer::S_AT)) {
-            return new InvalidEmail(new AtextAfterCFWS(), $this->lexer->current->value);
-        }
-
-        if ($this->lexer->current->isA(EmailLexer::S_LF) || $this->lexer->current->isA(EmailLexer::C_NUL)) {
-            return new InvalidEmail(new ExpectingCTEXT(), $this->lexer->current->value);
-        }
-
-        if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous->isA(EmailLexer::S_AT)) {
-            $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt();
-        } else {
-            $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS();
-        }
-
-        return new ValidEmail();
-    }
-
-    protected function checkCRLFInFWS(): Result
-    {
-        if (!$this->lexer->current->isA(EmailLexer::CRLF)) {
-            return new ValidEmail();
-        }
-
-        if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) {
-            return new InvalidEmail(new CRLFX2(), $this->lexer->current->value);
-        }
-
-        //this has no coverage. Condition is repeated from above one
-        if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) {
-            return new InvalidEmail(new CRLFAtTheEnd(), $this->lexer->current->value);
-        }
-
-        return new ValidEmail();
-    }
-
-    protected function isFWS(): bool
-    {
-        if ($this->escaped()) {
-            return false;
-        }
-
-        return in_array($this->lexer->current->type, self::FWS_TYPES);
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/IDLeftPart.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/IDLeftPart.php
deleted file mode 100644
index bedcf7b20..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/IDLeftPart.php
+++ /dev/null
@@ -1,15 +0,0 @@
-lexer->current->value);
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/IDRightPart.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/IDRightPart.php
deleted file mode 100644
index d2fc1d748..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/IDRightPart.php
+++ /dev/null
@@ -1,29 +0,0 @@
- true,
-            EmailLexer::S_SQUOTE => true,
-            EmailLexer::S_BACKTICK => true,
-            EmailLexer::S_SEMICOLON => true,
-            EmailLexer::S_GREATERTHAN => true,
-            EmailLexer::S_LOWERTHAN => true,
-        ];
-
-        if (isset($invalidDomainTokens[$this->lexer->current->type])) {
-            return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->current->value), $this->lexer->current->value);
-        }
-        return new ValidEmail();
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/LocalPart.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/LocalPart.php
deleted file mode 100644
index 5ed29d606..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/LocalPart.php
+++ /dev/null
@@ -1,162 +0,0 @@
- EmailLexer::S_COMMA,
-        EmailLexer::S_CLOSEBRACKET => EmailLexer::S_CLOSEBRACKET,
-        EmailLexer::S_OPENBRACKET => EmailLexer::S_OPENBRACKET,
-        EmailLexer::S_GREATERTHAN => EmailLexer::S_GREATERTHAN,
-        EmailLexer::S_LOWERTHAN => EmailLexer::S_LOWERTHAN,
-        EmailLexer::S_COLON => EmailLexer::S_COLON,
-        EmailLexer::S_SEMICOLON => EmailLexer::S_SEMICOLON,
-        EmailLexer::INVALID => EmailLexer::INVALID
-    ];
-
-    /**
-     * @var string
-     */
-    private $localPart = '';
-
-
-    public function parse(): Result
-    {
-        $this->lexer->startRecording();
-
-        while (!$this->lexer->current->isA(EmailLexer::S_AT) && !$this->lexer->current->isA(EmailLexer::S_EMPTY)) {
-            if ($this->hasDotAtStart()) {
-                return new InvalidEmail(new DotAtStart(), $this->lexer->current->value);
-            }
-
-            if ($this->lexer->current->isA(EmailLexer::S_DQUOTE)) {
-                $dquoteParsingResult = $this->parseDoubleQuote();
-
-                //Invalid double quote parsing
-                if ($dquoteParsingResult->isInvalid()) {
-                    return $dquoteParsingResult;
-                }
-            }
-
-            if (
-                $this->lexer->current->isA(EmailLexer::S_OPENPARENTHESIS) ||
-                $this->lexer->current->isA(EmailLexer::S_CLOSEPARENTHESIS)
-            ) {
-                $commentsResult = $this->parseComments();
-
-                //Invalid comment parsing
-                if ($commentsResult->isInvalid()) {
-                    return $commentsResult;
-                }
-            }
-
-            if ($this->lexer->current->isA(EmailLexer::S_DOT) && $this->lexer->isNextToken(EmailLexer::S_DOT)) {
-                return new InvalidEmail(new ConsecutiveDot(), $this->lexer->current->value);
-            }
-
-            if (
-                $this->lexer->current->isA(EmailLexer::S_DOT) &&
-                $this->lexer->isNextToken(EmailLexer::S_AT)
-            ) {
-                return new InvalidEmail(new DotAtEnd(), $this->lexer->current->value);
-            }
-
-            $resultEscaping = $this->validateEscaping();
-            if ($resultEscaping->isInvalid()) {
-                return $resultEscaping;
-            }
-
-            $resultToken = $this->validateTokens(false);
-            if ($resultToken->isInvalid()) {
-                return $resultToken;
-            }
-
-            $resultFWS = $this->parseLocalFWS();
-            if ($resultFWS->isInvalid()) {
-                return $resultFWS;
-            }
-
-            $this->lexer->moveNext();
-        }
-
-        $this->lexer->stopRecording();
-        $this->localPart = rtrim($this->lexer->getAccumulatedValues(), '@');
-        if (strlen($this->localPart) > LocalTooLong::LOCAL_PART_LENGTH) {
-            $this->warnings[LocalTooLong::CODE] = new LocalTooLong();
-        }
-
-        return new ValidEmail();
-    }
-
-    protected function validateTokens(bool $hasComments): Result
-    {
-        if (isset(self::INVALID_TOKENS[$this->lexer->current->type])) {
-            return new InvalidEmail(new ExpectingATEXT('Invalid token found'), $this->lexer->current->value);
-        }
-        return new ValidEmail();
-    }
-
-    public function localPart(): string
-    {
-        return $this->localPart;
-    }
-
-    private function parseLocalFWS(): Result
-    {
-        $foldingWS = new FoldingWhiteSpace($this->lexer);
-        $resultFWS = $foldingWS->parse();
-        if ($resultFWS->isValid()) {
-            $this->warnings = [...$this->warnings, ...$foldingWS->getWarnings()];
-        }
-        return $resultFWS;
-    }
-
-    private function hasDotAtStart(): bool
-    {
-        return $this->lexer->current->isA(EmailLexer::S_DOT) && $this->lexer->getPrevious()->isA(EmailLexer::S_EMPTY);
-    }
-
-    private function parseDoubleQuote(): Result
-    {
-        $dquoteParser = new DoubleQuote($this->lexer);
-        $parseAgain = $dquoteParser->parse();
-        $this->warnings = [...$this->warnings, ...$dquoteParser->getWarnings()];
-
-        return $parseAgain;
-    }
-
-    protected function parseComments(): Result
-    {
-        $commentParser = new Comment($this->lexer, new LocalComment());
-        $result = $commentParser->parse();
-        $this->warnings = [...$this->warnings, ...$commentParser->getWarnings()];
-
-        return $result;
-    }
-
-    private function validateEscaping(): Result
-    {
-        //Backslash found
-        if (!$this->lexer->current->isA(EmailLexer::S_BACKSLASH)) {
-            return new ValidEmail();
-        }
-
-        if ($this->lexer->isNextToken(EmailLexer::GENERIC)) {
-            return new InvalidEmail(new ExpectingATEXT('Found ATOM after escaping'), $this->lexer->current->value);
-        }
-
-        return new ValidEmail();
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/PartParser.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/PartParser.php
deleted file mode 100644
index 53afb2575..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Parser/PartParser.php
+++ /dev/null
@@ -1,63 +0,0 @@
-lexer = $lexer;
-    }
-
-    abstract public function parse(): Result;
-
-    /**
-     * @return Warning[]
-     */
-    public function getWarnings()
-    {
-        return $this->warnings;
-    }
-
-    protected function parseFWS(): Result
-    {
-        $foldingWS = new FoldingWhiteSpace($this->lexer);
-        $resultFWS = $foldingWS->parse();
-        $this->warnings = [...$this->warnings, ...$foldingWS->getWarnings()];
-        return $resultFWS;
-    }
-
-    protected function checkConsecutiveDots(): Result
-    {
-        if ($this->lexer->current->isA(EmailLexer::S_DOT) && $this->lexer->isNextToken(EmailLexer::S_DOT)) {
-            return new InvalidEmail(new ConsecutiveDot(), $this->lexer->current->value);
-        }
-
-        return new ValidEmail();
-    }
-
-    protected function escaped(): bool
-    {
-        $previous = $this->lexer->getPrevious();
-
-        return $previous->isA(EmailLexer::S_BACKSLASH)
-            && !$this->lexer->current->isA(EmailLexer::GENERIC);
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/InvalidEmail.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/InvalidEmail.php
deleted file mode 100644
index 82699acc6..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/InvalidEmail.php
+++ /dev/null
@@ -1,49 +0,0 @@
-token = $token;
-        $this->reason = $reason;
-    }
-
-    public function isValid(): bool
-    {
-        return false;
-    }
-
-    public function isInvalid(): bool
-    {
-        return true;
-    }
-
-    public function description(): string
-    {
-        return $this->reason->description() . " in char " . $this->token;
-    }
-
-    public function code(): int
-    {
-        return $this->reason->code();
-    }
-
-    public function reason(): Reason
-    {
-        return $this->reason;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/MultipleErrors.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/MultipleErrors.php
deleted file mode 100644
index 5fa85afc9..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/MultipleErrors.php
+++ /dev/null
@@ -1,56 +0,0 @@
-reasons[$reason->code()] = $reason;
-    }
-
-    /**
-     * @return Reason[]
-     */
-    public function getReasons() : array
-    {
-        return $this->reasons;
-    }
-
-    public function reason() : Reason
-    {
-        return 0 !== count($this->reasons)
-            ? current($this->reasons)
-            : new EmptyReason();
-    }
-
-    public function description() : string
-    {
-        $description = '';
-        foreach($this->reasons as $reason) {
-            $description .= $reason->description() . PHP_EOL;
-        }
-
-        return $description;
-    }
-
-    public function code() : int
-    {
-        return 0;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/AtextAfterCFWS.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/AtextAfterCFWS.php
deleted file mode 100644
index 96e22842f..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/AtextAfterCFWS.php
+++ /dev/null
@@ -1,16 +0,0 @@
-detailedDescription = $details;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/DomainAcceptsNoMail.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/DomainAcceptsNoMail.php
deleted file mode 100644
index bcaefb68a..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/DomainAcceptsNoMail.php
+++ /dev/null
@@ -1,16 +0,0 @@
-exception = $exception;
-        
-    }
-    public function code() : int
-    {
-        return 999;
-    }
-
-    public function description() : string
-    {
-        return $this->exception->getMessage();
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/ExpectingATEXT.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/ExpectingATEXT.php
deleted file mode 100644
index 07ea8d238..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/ExpectingATEXT.php
+++ /dev/null
@@ -1,16 +0,0 @@
-detailedDescription;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/ExpectingCTEXT.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/ExpectingCTEXT.php
deleted file mode 100644
index 64f5f7c3e..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Reason/ExpectingCTEXT.php
+++ /dev/null
@@ -1,16 +0,0 @@
-element = $element;
-    }
-
-    public function code() : int
-    {
-        return 201;
-    }
-
-    public function description() : string
-    {
-        return 'Unusual element found, wourld render invalid in majority of cases. Element found: ' . $this->element;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Result.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Result.php
deleted file mode 100644
index fd13e6c68..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/Result.php
+++ /dev/null
@@ -1,27 +0,0 @@
-reason = new ReasonSpoofEmail();
-        parent::__construct($this->reason, '');
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/ValidEmail.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/ValidEmail.php
deleted file mode 100644
index fdc882fac..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Result/ValidEmail.php
+++ /dev/null
@@ -1,27 +0,0 @@
-dnsGetRecord = $dnsGetRecord;
-    }
-
-    public function isValid(string $email, EmailLexer $emailLexer): bool
-    {
-        // use the input to check DNS if we cannot extract something similar to a domain
-        $host = $email;
-
-        // Arguable pattern to extract the domain. Not aiming to validate the domain nor the email
-        if (false !== $lastAtPos = strrpos($email, '@')) {
-            $host = substr($email, $lastAtPos + 1);
-        }
-
-        // Get the domain parts
-        $hostParts = explode('.', $host);
-
-        $isLocalDomain = count($hostParts) <= 1;
-        $isReservedTopLevel = in_array($hostParts[(count($hostParts) - 1)], self::RESERVED_DNS_TOP_LEVEL_NAMES, true);
-
-        // Exclude reserved top level DNS names
-        if ($isLocalDomain || $isReservedTopLevel) {
-            $this->error = new InvalidEmail(new LocalOrReservedDomain(), $host);
-            return false;
-        }
-
-        return $this->checkDns($host);
-    }
-
-    public function getError(): ?InvalidEmail
-    {
-        return $this->error;
-    }
-
-    /**
-     * @return Warning[]
-     */
-    public function getWarnings(): array
-    {
-        return $this->warnings;
-    }
-
-    /**
-     * @param string $host
-     *
-     * @return bool
-     */
-    protected function checkDns($host)
-    {
-        $variant = INTL_IDNA_VARIANT_UTS46;
-
-        $host = rtrim(idn_to_ascii($host, IDNA_DEFAULT, $variant), '.');
-
-        $hostParts = explode('.', $host);
-        $host = array_pop($hostParts);
-
-        while (count($hostParts) > 0) {
-            $host = array_pop($hostParts) . '.' . $host;
-
-            if ($this->validateDnsRecords($host)) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-
-    /**
-     * Validate the DNS records for given host.
-     *
-     * @param string $host A set of DNS records in the format returned by dns_get_record.
-     *
-     * @return bool True on success.
-     */
-    private function validateDnsRecords($host): bool
-    {
-        $dnsRecordsResult = $this->dnsGetRecord->getRecords($host, DNS_A + DNS_MX);
-
-        if ($dnsRecordsResult->withError()) {
-            $this->error = new InvalidEmail(new UnableToGetDNSRecord(), '');
-            return false;
-        }
-
-        $dnsRecords = $dnsRecordsResult->getRecords();
-
-        // Combined check for A+MX+AAAA can fail with SERVFAIL, even in the presence of valid A/MX records
-        $aaaaRecordsResult = $this->dnsGetRecord->getRecords($host, DNS_AAAA);
-
-        if (! $aaaaRecordsResult->withError()) {
-            $dnsRecords = array_merge($dnsRecords, $aaaaRecordsResult->getRecords());
-        }
-
-        // No MX, A or AAAA DNS records
-        if ($dnsRecords === []) {
-            $this->error = new InvalidEmail(new ReasonNoDNSRecord(), '');
-            return false;
-        }
-
-        // For each DNS record
-        foreach ($dnsRecords as $dnsRecord) {
-            if (!$this->validateMXRecord($dnsRecord)) {
-                // No MX records (fallback to A or AAAA records)
-                if (empty($this->mxRecords)) {
-                    $this->warnings[NoDNSMXRecord::CODE] = new NoDNSMXRecord();
-                }
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Validate an MX record
-     *
-     * @param array $dnsRecord Given DNS record.
-     *
-     * @return bool True if valid.
-     */
-    private function validateMxRecord($dnsRecord): bool
-    {
-        if (!isset($dnsRecord['type'])) {
-            $this->error = new InvalidEmail(new ReasonNoDNSRecord(), '');
-            return false;
-        }
-
-        if ($dnsRecord['type'] !== 'MX') {
-            return true;
-        }
-
-        // "Null MX" record indicates the domain accepts no mail (https://tools.ietf.org/html/rfc7505)
-        if (empty($dnsRecord['target']) || $dnsRecord['target'] === '.') {
-            $this->error = new InvalidEmail(new DomainAcceptsNoMail(), "");
-            return false;
-        }
-
-        $this->mxRecords[] = $dnsRecord;
-
-        return true;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/EmailValidation.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/EmailValidation.php
deleted file mode 100644
index 1bcc0a70b..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/EmailValidation.php
+++ /dev/null
@@ -1,34 +0,0 @@
-setChecks(Spoofchecker::SINGLE_SCRIPT);
-
-        if ($checker->isSuspicious($email)) {
-            $this->error = new SpoofEmail();
-        }
-
-        return $this->error === null;
-    }
-
-    public function getError() : ?InvalidEmail
-    {
-        return $this->error;
-    }
-
-    public function getWarnings() : array
-    {
-        return [];
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/MessageIDValidation.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/MessageIDValidation.php
deleted file mode 100644
index 97d1ea7a7..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/MessageIDValidation.php
+++ /dev/null
@@ -1,55 +0,0 @@
-parse($email);
-            $this->warnings = $parser->getWarnings();
-            if ($result->isInvalid()) {
-                /** @psalm-suppress PropertyTypeCoercion */
-                $this->error = $result;
-                return false;
-            }
-        } catch (\Exception $invalid) {
-            $this->error = new InvalidEmail(new ExceptionFound($invalid), '');
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * @return Warning[]
-     */
-    public function getWarnings(): array
-    {
-        return $this->warnings;
-    }
-
-    public function getError(): ?InvalidEmail
-    {
-        return $this->error;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/MultipleValidationWithAnd.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/MultipleValidationWithAnd.php
deleted file mode 100644
index c908053f3..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/MultipleValidationWithAnd.php
+++ /dev/null
@@ -1,105 +0,0 @@
-validations as $validation) {
-            $emailLexer->reset();
-            $validationResult = $validation->isValid($email, $emailLexer);
-            $result = $result && $validationResult;
-            $this->warnings = [...$this->warnings, ...$validation->getWarnings()];
-            if (!$validationResult) {
-                $this->processError($validation);
-            }
-
-            if ($this->shouldStop($result)) {
-                break;
-            }
-        }
-
-        return $result;
-    }
-
-    private function initErrorStorage(): void
-    {
-        if (null === $this->error) {
-            $this->error = new MultipleErrors();
-        }
-    }
-
-    private function processError(EmailValidation $validation): void
-    {
-        if (null !== $validation->getError()) {
-            $this->initErrorStorage();
-            /** @psalm-suppress PossiblyNullReference */
-            $this->error->addReason($validation->getError()->reason());
-        }
-    }
-
-    private function shouldStop(bool $result): bool
-    {
-        return !$result && $this->mode === self::STOP_ON_ERROR;
-    }
-
-    /**
-     * Returns the validation errors.
-     */
-    public function getError(): ?InvalidEmail
-    {
-        return $this->error;
-    }
-
-    /**
-     * @return Warning[]
-     */
-    public function getWarnings(): array
-    {
-        return $this->warnings;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/NoRFCWarningsValidation.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/NoRFCWarningsValidation.php
deleted file mode 100644
index 06885ed71..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/NoRFCWarningsValidation.php
+++ /dev/null
@@ -1,41 +0,0 @@
-getWarnings())) {
-            return true;
-        }
-
-        $this->error = new InvalidEmail(new RFCWarnings(), '');
-
-        return false;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getError() : ?InvalidEmail
-    {
-        return $this->error ?: parent::getError();
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/RFCValidation.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/RFCValidation.php
deleted file mode 100644
index f59cbfc80..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Validation/RFCValidation.php
+++ /dev/null
@@ -1,54 +0,0 @@
-parse($email);
-            $this->warnings = $parser->getWarnings();
-            if ($result->isInvalid()) {
-                /** @psalm-suppress PropertyTypeCoercion */
-                $this->error = $result;
-                return false;
-            }
-        } catch (\Exception $invalid) {
-            $this->error = new InvalidEmail(new ExceptionFound($invalid), '');
-            return false;
-        }
-
-        return true;
-    }
-
-    public function getError(): ?InvalidEmail
-    {
-        return $this->error;
-    }
-
-    /**
-     * @return Warning[]
-     */
-    public function getWarnings(): array
-    {
-        return $this->warnings;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/AddressLiteral.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/AddressLiteral.php
deleted file mode 100644
index 474ff0e75..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/AddressLiteral.php
+++ /dev/null
@@ -1,14 +0,0 @@
-message = 'Address literal in domain part';
-        $this->rfcNumber = 5321;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/CFWSNearAt.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/CFWSNearAt.php
deleted file mode 100644
index 8bac12b1e..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/CFWSNearAt.php
+++ /dev/null
@@ -1,13 +0,0 @@
-message = "Deprecated folding white space near @";
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/CFWSWithFWS.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/CFWSWithFWS.php
deleted file mode 100644
index ba57601c8..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/CFWSWithFWS.php
+++ /dev/null
@@ -1,13 +0,0 @@
-message = 'Folding whites space followed by folding white space';
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/Comment.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/Comment.php
deleted file mode 100644
index 6508295e3..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/Comment.php
+++ /dev/null
@@ -1,13 +0,0 @@
-message = "Comments found in this email";
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/DeprecatedComment.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/DeprecatedComment.php
deleted file mode 100644
index a2578076e..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/DeprecatedComment.php
+++ /dev/null
@@ -1,13 +0,0 @@
-message = 'Deprecated comments';
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/DomainLiteral.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/DomainLiteral.php
deleted file mode 100644
index 034388c47..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/DomainLiteral.php
+++ /dev/null
@@ -1,14 +0,0 @@
-message = 'Domain Literal';
-        $this->rfcNumber = 5322;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/EmailTooLong.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/EmailTooLong.php
deleted file mode 100644
index d25ad1234..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/EmailTooLong.php
+++ /dev/null
@@ -1,15 +0,0 @@
-message = 'Email is too long, exceeds ' . EmailParser::EMAIL_MAX_LENGTH;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6BadChar.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6BadChar.php
deleted file mode 100644
index 3ecd5bcca..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6BadChar.php
+++ /dev/null
@@ -1,14 +0,0 @@
-message = 'Bad char in IPV6 domain literal';
-        $this->rfcNumber = 5322;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6ColonEnd.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6ColonEnd.php
deleted file mode 100644
index 3f0c2f2df..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6ColonEnd.php
+++ /dev/null
@@ -1,14 +0,0 @@
-message = ':: found at the end of the domain literal';
-        $this->rfcNumber = 5322;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6ColonStart.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6ColonStart.php
deleted file mode 100644
index 742fb3bd1..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6ColonStart.php
+++ /dev/null
@@ -1,14 +0,0 @@
-message = ':: found at the start of the domain literal';
-        $this->rfcNumber = 5322;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6Deprecated.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6Deprecated.php
deleted file mode 100644
index 59c3037a5..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6Deprecated.php
+++ /dev/null
@@ -1,14 +0,0 @@
-message = 'Deprecated form of IPV6';
-        $this->rfcNumber = 5321;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6DoubleColon.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6DoubleColon.php
deleted file mode 100644
index d40660264..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6DoubleColon.php
+++ /dev/null
@@ -1,14 +0,0 @@
-message = 'Double colon found after IPV6 tag';
-        $this->rfcNumber = 5322;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6GroupCount.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6GroupCount.php
deleted file mode 100644
index 551bc3af1..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6GroupCount.php
+++ /dev/null
@@ -1,14 +0,0 @@
-message = 'Group count is not IPV6 valid';
-        $this->rfcNumber = 5322;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6MaxGroups.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6MaxGroups.php
deleted file mode 100644
index 7f8a410a8..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/IPV6MaxGroups.php
+++ /dev/null
@@ -1,14 +0,0 @@
-message = 'Reached the maximum number of IPV6 groups allowed';
-        $this->rfcNumber = 5321;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/LocalTooLong.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/LocalTooLong.php
deleted file mode 100644
index b46b874c0..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/LocalTooLong.php
+++ /dev/null
@@ -1,15 +0,0 @@
-message = 'Local part is too long, exceeds 64 chars (octets)';
-        $this->rfcNumber = 5322;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/NoDNSMXRecord.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/NoDNSMXRecord.php
deleted file mode 100644
index bddb96be7..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/NoDNSMXRecord.php
+++ /dev/null
@@ -1,14 +0,0 @@
-message = 'No MX DSN record was found for this email';
-        $this->rfcNumber = 5321;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/ObsoleteDTEXT.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/ObsoleteDTEXT.php
deleted file mode 100644
index 412fd499e..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/ObsoleteDTEXT.php
+++ /dev/null
@@ -1,14 +0,0 @@
-rfcNumber = 5322;
-        $this->message = 'Obsolete DTEXT in domain literal';
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/QuotedPart.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/QuotedPart.php
deleted file mode 100644
index c3e017d94..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/QuotedPart.php
+++ /dev/null
@@ -1,17 +0,0 @@
-message = "Deprecated Quoted String found between $prevToken and $postToken";
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/QuotedString.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/QuotedString.php
deleted file mode 100644
index c152ec2e2..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/QuotedString.php
+++ /dev/null
@@ -1,17 +0,0 @@
-message = "Quoted String found between $prevToken and $postToken";
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/TLD.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/TLD.php
deleted file mode 100644
index 10cec2816..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/TLD.php
+++ /dev/null
@@ -1,13 +0,0 @@
-message = "RFC5321, TLD";
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/Warning.php b/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/Warning.php
deleted file mode 100644
index 7adb3b85c..000000000
--- a/fixtures/symfony_5_local_deps/vendor/egulias/email-validator/src/Warning/Warning.php
+++ /dev/null
@@ -1,53 +0,0 @@
-message;
-    }
-
-    /**
-     * @return int
-     */
-    public function code()
-    {
-        return self::CODE;
-    }
-
-    /**
-     * @return int
-     */
-    public function RFCNumber()
-    {
-        return $this->rfcNumber;
-    }
-
-    /**
-     * @return string
-     */
-    public function __toString(): string
-    {
-        return $this->message() . " rfc: " .  $this->rfcNumber . "internal code: " . static::CODE;
-    }
-}
diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/CREDITS b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/CREDITS
deleted file mode 100644
index c2dbc4b64..000000000
--- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/CREDITS
+++ /dev/null
@@ -1,11 +0,0 @@
-Matt Butcher [technosophos]  (lead)
-Matt Farina  [mattfarina]  (lead)
-Asmir Mustafic [goetas]  (contributor)
-Edward Z. Yang [ezyang]  (contributor)
-Geoffrey Sneddon [gsnedders]  (contributor)
-Kukhar Vasily [ngreduce]  (contributor)
-Rune Christensen [MrElectronic]  (contributor)
-Mišo Belica [miso-belica]  (contributor)
-Asmir Mustafic [goetas]  (contributor)
-KITAITI Makoto [KitaitiMakoto]  (contributor) 
-Jacob Floyd [cognifloyd]  (contributor)
diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/LICENSE.txt b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/LICENSE.txt
deleted file mode 100644
index 3c275b54a..000000000
--- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/LICENSE.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-## HTML5-PHP License
-
-Copyright (c) 2013 The Authors of HTML5-PHP
-
-Matt Butcher - mattbutcher@google.com
-Matt Farina - matt@mattfarina.com
-Asmir Mustafic - goetas@gmail.com
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in 
-the Software without restriction, including without limitation the rights to 
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-## HTML5Lib License
-
-Portions of this are based on html5lib's PHP version, which was a
-sub-project of html5lib. The following is the list of contributors from
-html5lib:
-
-html5lib:
-
-Copyright (c) 2006-2009 The Authors
-
-Contributors:
-James Graham - jg307@cam.ac.uk
-Anne van Kesteren - annevankesteren@gmail.com
-Lachlan Hunt - lachlan.hunt@lachy.id.au
-Matt McDonald - kanashii@kanashii.ca
-Sam Ruby - rubys@intertwingly.net
-Ian Hickson (Google) - ian@hixie.ch
-Thomas Broyer - t.broyer@ltgt.net
-Jacques Distler - distler@golem.ph.utexas.edu
-Henri Sivonen - hsivonen@iki.fi
-Adam Barth - abarth@webkit.org
-Eric Seidel - eric@webkit.org
-The Mozilla Foundation (contributions from Henri Sivonen since 2008)
-David Flanagan (Mozilla) - dflanagan@mozilla.com
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in 
-the Software without restriction, including without limitation the rights to 
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/README.md b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/README.md
deleted file mode 100644
index e80dec507..000000000
--- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/README.md
+++ /dev/null
@@ -1,270 +0,0 @@
-> # UKRAINE NEEDS YOUR HELP NOW!
->
-> On 24 February 2022, Russian [President Vladimir Putin ordered an invasion of Ukraine by Russian Armed Forces](https://www.bbc.com/news/world-europe-60504334).
->
-> Your support is urgently needed.
->
-> - Donate to the volunteers. Here is the volunteer fund helping the Ukrainian army to provide all the necessary equipment:
->  https://bank.gov.ua/en/news/all/natsionalniy-bank-vidkriv-spetsrahunok-dlya-zboru-koshtiv-na-potrebi-armiyi or https://savelife.in.ua/en/donate/
-> - Triple-check social media sources. Russian disinformation is attempting to coverup and distort the reality in Ukraine.
-> - Help Ukrainian refugees who are fleeing Russian attacks and shellings: https://www.globalcitizen.org/en/content/ways-to-help-ukraine-conflict/
-> -  Put pressure on your political representatives to provide help to Ukraine.
-> -  Believe in the Ukrainian people, they will not surrender, they don't have another Ukraine.
->
-> THANK YOU!
-----
-
-# HTML5-PHP
-
-HTML5 is a standards-compliant HTML5 parser and writer written entirely in PHP.
-It is stable and used in many production websites, and has
-well over [five million downloads](https://packagist.org/packages/masterminds/html5).
-
-HTML5 provides the following features.
-
-- An HTML5 serializer
-- Support for PHP namespaces
-- Composer support
-- Event-based (SAX-like) parser
-- A DOM tree builder
-- Interoperability with [QueryPath](https://github.com/technosophos/querypath)
-- Runs on **PHP** 5.3.0 or newer
-
-[![Build Status](https://travis-ci.org/Masterminds/html5-php.png?branch=master)](https://travis-ci.org/Masterminds/html5-php)
-[![Latest Stable Version](https://poser.pugx.org/masterminds/html5/v/stable.png)](https://packagist.org/packages/masterminds/html5)
-[![Code Coverage](https://scrutinizer-ci.com/g/Masterminds/html5-php/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Masterminds/html5-php/?branch=master)
-[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Masterminds/html5-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Masterminds/html5-php/?branch=master)
-[![Stability: Sustained](https://masterminds.github.io/stability/sustained.svg)](https://masterminds.github.io/stability/sustained.html)
-
-## Installation
-
-Install HTML5-PHP using [composer](http://getcomposer.org/).
-
-By adding the `masterminds/html5` dependency to your `composer.json` file:
-
-```json
-{
-  "require" : {
-    "masterminds/html5": "^2.0"
-  },
-}
-```
-
-By invoking require command via composer executable:
-
-```bash
-composer require masterminds/html5
-```
-
-## Basic Usage
-
-HTML5-PHP has a high-level API and a low-level API.
-
-Here is how you use the high-level `HTML5` library API:
-
-```php
-
-  
-    TEST
-  
-  
-    

Hello World

-

This is a test of the HTML5 parser.

- - -HERE; - -// Parse the document. $dom is a DOMDocument. -$html5 = new HTML5(); -$dom = $html5->loadHTML($html); - -// Render it as HTML5: -print $html5->saveHTML($dom); - -// Or save it to a file: -$html5->save($dom, 'out.html'); -``` - -The `$dom` created by the parser is a full `DOMDocument` object. And the -`save()` and `saveHTML()` methods will take any DOMDocument. - -### Options - -It is possible to pass in an array of configuration options when loading -an HTML5 document. - -```php -// An associative array of options -$options = array( - 'option_name' => 'option_value', -); - -// Provide the options to the constructor -$html5 = new HTML5($options); - -$dom = $html5->loadHTML($html); -``` - -The following options are supported: - -* `encode_entities` (boolean): Indicates that the serializer should aggressively - encode characters as entities. Without this, it only encodes the bare - minimum. -* `disable_html_ns` (boolean): Prevents the parser from automatically - assigning the HTML5 namespace to the DOM document. This is for - non-namespace aware DOM tools. -* `target_document` (\DOMDocument): A DOM document that will be used as the - destination for the parsed nodes. -* `implicit_namespaces` (array): An assoc array of namespaces that should be - used by the parser. Name is tag prefix, value is NS URI. - -## The Low-Level API - -This library provides the following low-level APIs that you can use to -create more customized HTML5 tools: - -- A SAX-like event-based parser that you can hook into for special kinds -of parsing. -- A flexible error-reporting mechanism that can be tuned to document -syntax checking. -- A DOM implementation that uses PHP's built-in DOM library. - -The unit tests exercise each piece of the API, and every public function -is well-documented. - -### Parser Design - -The parser is designed as follows: - -- The `Scanner` handles scanning on behalf of the parser. -- The `Tokenizer` requests data off of the scanner, parses it, clasifies -it, and sends it to an `EventHandler`. It is a *recursive descent parser.* -- The `EventHandler` receives notifications and data for each specific -semantic event that occurs during tokenization. -- The `DOMBuilder` is an `EventHandler` that listens for tokenizing -events and builds a document tree (`DOMDocument`) based on the events. - -### Serializer Design - -The serializer takes a data structure (the `DOMDocument`) and transforms -it into a character representation -- an HTML5 document. - -The serializer is broken into three parts: - -- The `OutputRules` contain the rules to turn DOM elements into strings. The -rules are an implementation of the interface `RulesInterface` allowing for -different rule sets to be used. -- The `Traverser`, which is a special-purpose tree walker. It visits -each node node in the tree and uses the `OutputRules` to transform the node -into a string. -- `HTML5` manages the `Traverser` and stores the resultant data -in the correct place. - -The serializer (`save()`, `saveHTML()`) follows the -[section 8.9 of the HTML 5.0 spec](http://www.w3.org/TR/2012/CR-html5-20121217/syntax.html#serializing-html-fragments). -So tags are serialized according to these rules: - -- A tag with children: <foo>CHILDREN</foo> -- A tag that cannot have content: <foo> (no closing tag) -- A tag that could have content, but doesn't: <foo></foo> - -## Known Issues (Or, Things We Designed Against the Spec) - -Please check the issue queue for a full list, but the following are -issues known issues that are not presently on the roadmap: - -- Namespaces: HTML5 only [supports a selected list of namespaces](http://www.w3.org/TR/html5/infrastructure.html#namespaces) - and they do not operate in the same way as XML namespaces. A `:` has no special - meaning. - By default the parser does not support XML style namespaces via `:`; - to enable the XML namespaces see the [XML Namespaces section](#xml-namespaces) -- Scripts: This parser does not contain a JavaScript or a CSS - interpreter. While one may be supplied, not all features will be - supported. -- Reentrance: The current parser is not re-entrant. (Thus you can't pause - the parser to modify the HTML string mid-parse.) -- Validation: The current tree builder is **not** a validating parser. - While it will correct some HTML, it does not check that the HTML - conforms to the standard. (Should you wish, you can build a validating - parser by extending DOMTree or building your own EventHandler - implementation.) - * There is limited support for insertion modes. - * Some autocorrection is done automatically. - * Per the spec, many legacy tags are admitted and correctly handled, - even though they are technically not part of HTML5. -- Attribute names and values: Due to the implementation details of the - PHP implementation of DOM, attribute names that do not follow the - XML 1.0 standard are not inserted into the DOM. (Effectively, they - are ignored.) If you've got a clever fix for this, jump in! -- Processor Instructions: The HTML5 spec does not allow processor - instructions. We do. Since this is a server-side library, we think - this is useful. And that means, dear reader, that in some cases you - can parse the HTML from a mixed PHP/HTML document. This, however, - is an incidental feature, not a core feature. -- HTML manifests: Unsupported. -- PLAINTEXT: Unsupported. -- Adoption Agency Algorithm: Not yet implemented. (8.2.5.4.7) - -## XML Namespaces - -To use XML style namespaces you have to configure well the main `HTML5` instance. - -```php -use Masterminds\HTML5; -$html = new HTML5(array( - "xmlNamespaces" => true -)); - -$dom = $html->loadHTML(''); - -$dom->documentElement->namespaceURI; // http://www.example.com - -``` - -You can also add some default prefixes that will not require the namespace declaration, -but its elements will be namespaced. - -```php -use Masterminds\HTML5; -$html = new HTML5(array( - "implicitNamespaces"=>array( - "t"=>"http://www.example.com" - ) -)); - -$dom = $html->loadHTML(''); - -$dom->documentElement->namespaceURI; // http://www.example.com - -``` - -## Thanks to... - -The dedicated (and patient) contributors of patches small and large, -who have already made this library better.See the CREDITS file for -a list of contributors. - -We owe a huge debt of gratitude to the original authors of html5lib. - -While not much of the original parser remains, we learned a lot from -reading the html5lib library. And some pieces remain here. In -particular, much of the UTF-8 and Unicode handling is derived from the -html5lib project. - -## License - -This software is released under the MIT license. The original html5lib -library was also released under the MIT license. - -See LICENSE.txt - -Certain files contain copyright assertions by specific individuals -involved with html5lib. Those have been retained where appropriate. diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/RELEASE.md b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/RELEASE.md deleted file mode 100644 index 33007ed69..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/RELEASE.md +++ /dev/null @@ -1,157 +0,0 @@ -# Release Notes - -2.7.6 (2021-08-18) - -- #218: Address comment handling issues - -2.7.5 (2021-07-01) - -- #204: Travis: Enable tests on PHP 8.0 -- #207: Fix PHP 8.1 deprecations - -2.7.4 (2020-10-01) - -- #191: Fix travisci build -- #195: Add .gitattributes file with export-ignore rules -- #194: Fix query parameter parsed as character entity - -2.7.3 (2020-07-05) - -- #190: mitigate cyclic reference between output rules and the traverser objects - -2.7.2 (2020-07-01) - -- #187: Fixed memory leak in HTML5::saveHTML() -- #186: Add special case for end tag
- -2.7.1 (2020-06-14) - -- #171: add PHP 7.4 job -- #178: Prevent infinite loop on un-terminated entity declaration at EOF - -2.7.0 (2019-07-25) - -- #164: Drop HHVM support -- #168: Set default encoding in the DOMDocument object - -2.6.0 (2019-03-10) - -- #163: Allow to pass a charset to the Scanner - -2.5.0 (2018-12-27) - -- #162, #161, #155, #154, #153, #151: big performance improvements -- #156: fixed typos -- #160: adopt and enforce code style -- #159: remove deprecated php unit base test case -- #150: backport changes from old master branch - -2.4.0 (2018-11-17) - -- #148: Improve performance by moving sequence matching -- #147: Improve the Tokenizer performance -- #146: Improve performance by relying on a native string instead of InputStream -- #144: Add DOM extension in composer.json -- #145: Add more extensions on composer.json, improve phpdocs and remove dead code -- #143: Remove experimental comment - -2.3.1 (2018-10-18) - -- #121: Audio is not a block tag (fixed by #141) -- #136: Handle illegal self-closing according to spec (fixed by #137) -- #141: Minor fixes in the README - -2.3.0 (2017-09-04) - -- #129: image within inline svg breaks system (fixed by #133) -- #131: ² does not work (fixed by #132) -- #134: Improve tokenizer performance by 20% (alternative version of #130 thanks to @MichaelHeerklotz) -- #135: Raw & in attributes - -2.2.2 (2016-09-22) - -- #116: In XML mode, tags are case sensitive -- #115: Fix PHP Notice in OutputRules -- #112: fix parsing of options of an optgroup -- #111: Adding test for the address tag - -2.2.1 (2016-05-10) - -- #109: Fixed issue where address tag could be written without closing tag (thanks sylus) - -2.2.0 (2016-04-11) - -- #105: Enable composer cache (for CI/CD) -- #100: Use mb_substitute_character inset of ini_set for environments where ini_set is disable (e.g., shared hosting) -- #98: Allow link, meta, style tags in noscript tags -- #96: Fixed xml:href on svgs that use the "use" breaking -- #94: Counting UTF8 characters performance improvement -- #93: Use newer version of coveralls package -- #90: Remove duplicate test -- #87: Allow multiple root nodes - -2.1.2 (2015-06-07) -- #82: Support for PHP7 -- #84: Improved boolean attribute handling - -2.1.1 (2015-03-23) -- #78: Fixes bug where unmatched entity like string drops everything after &. - -2.1.0 (2015-02-01) -- #74: Added `disable_html_ns` and `target_doc` dom parsing options -- Unified option names -- #73: Fixed alphabet, ß now can be detected -- #75 and #76: Allow whitespace in RCDATA tags -- #77: Fixed parsing blunder for json embeds -- #72: Add options to HTML methods - -2.0.2 (2014-12-17) -- #50: empty document handling -- #63: tags with strange capitalization -- #65: dashes and underscores as allowed characters in tag names -- #68: Fixed issue with non-inline elements inside inline containers - -2.0.1 (2014-09-23) -- #59: Fixed issue parsing some fragments. -- #56: Incorrectly saw 0 as empty string -- Sami as new documentation generator - -2.0.0 (2014-07-28) -- #53: Improved boolean attributes handling -- #52: Facebook HHVM compatibility -- #48: Adopted PSR-2 as coding standard -- #47: Moved everything to Masterminds namespace -- #45: Added custom namespaces -- #44: Added support to XML-style namespaces -- #37: Refactored HTML5 class removing static methods - -1.0.5 (2014-06-10) -- #38: Set the dev-master branch as the 1.0.x branch for composer (goetas) -- #34: Tests use PSR-4 for autoloading. (goetas) -- #40, #41: Fix entity handling in RCDATA sections. (KitaitiMakoto) -- #32: Fixed issue where wharacter references were being incorrectly encoded in style tags. - -1.0.4 (2014-04-29) -- #30/#31 Don't throw an exception for invalid tag names. - -1.0.3 (2014-02-28) -- #23 and #29: Ignore attributes with illegal chars in name for the PHP DOM. - -1.0.2 (2014-02-12) -- #23: Handle missing tag close in attribute list. -- #25: Fixed text escaping in the serializer (HTML% 8.3). -- #27: Fixed tests on Windows: changed "\n" -> PHP_EOL. -- #28: Fixed infinite loop for char "&" in unquoted attribute in parser. -- #26: Updated tag name case handling to deal with uppercase usage. -- #24: Newlines and tabs are allowed inside quoted attributes (HTML5 8.2.4). -- Fixed Travis CI testing. - -1.0.1 (2013-11-07) -- CDATA encoding is improved. (Non-standard; Issue #19) -- Some parser rules were not returning the new current element. (Issue #20) -- Added, to the README, details on code test coverage and to packagist version. -- Fixed processor instructions. -- Improved test coverage and documentation coverage. - -1.0.0 (2013-10-02) -- Initial release. diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/UPGRADING.md b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/UPGRADING.md deleted file mode 100644 index 76e3a19bc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/UPGRADING.md +++ /dev/null @@ -1,21 +0,0 @@ -From 1.x to 2.x -================= - -- All classes uses `Masterminds` namespace. -- All public static methods has been removed from `HTML5` class and the general API to access the HTML5 functionalities has changed. - - Before: - - $dom = \HTML5::loadHTML('....'); - \HTML5::saveHTML($dom); - - After: - - use Masterminds\HTML5; - - $html5 = new HTML5(); - - $dom = $html5->loadHTML('....'); - echo $html5->saveHTML($dom); - - diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/bin/entities.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/bin/entities.php deleted file mode 100644 index 56323a341..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/bin/entities.php +++ /dev/null @@ -1,26 +0,0 @@ - $obj) { - $sname = substr($name, 1, -1); - $table[$sname] = $obj->characters; -} - -echo '=5.3.0" - }, - "require-dev": { - "phpunit/phpunit" : "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" - }, - "autoload": { - "psr-4": {"Masterminds\\": "src"} - }, - "autoload-dev": { - "psr-4": {"Masterminds\\HTML5\\Tests\\": "test/HTML5"} - }, - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5.php deleted file mode 100644 index c857145fb..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5.php +++ /dev/null @@ -1,246 +0,0 @@ - false, - - // Prevents the parser from automatically assigning the HTML5 namespace to the DOM document. - 'disable_html_ns' => false, - ); - - protected $errors = array(); - - public function __construct(array $defaultOptions = array()) - { - $this->defaultOptions = array_merge($this->defaultOptions, $defaultOptions); - } - - /** - * Get the current default options. - * - * @return array - */ - public function getOptions() - { - return $this->defaultOptions; - } - - /** - * Load and parse an HTML file. - * - * This will apply the HTML5 parser, which is tolerant of many - * varieties of HTML, including XHTML 1, HTML 4, and well-formed HTML - * 3. Note that in these cases, not all of the old data will be - * preserved. For example, XHTML's XML declaration will be removed. - * - * The rules governing parsing are set out in the HTML 5 spec. - * - * @param string|resource $file The path to the file to parse. If this is a resource, it is - * assumed to be an open stream whose pointer is set to the first - * byte of input. - * @param array $options Configuration options when parsing the HTML. - * - * @return \DOMDocument A DOM document. These object type is defined by the libxml - * library, and should have been included with your version of PHP. - */ - public function load($file, array $options = array()) - { - // Handle the case where file is a resource. - if (is_resource($file)) { - return $this->parse(stream_get_contents($file), $options); - } - - return $this->parse(file_get_contents($file), $options); - } - - /** - * Parse a HTML Document from a string. - * - * Take a string of HTML 5 (or earlier) and parse it into a - * DOMDocument. - * - * @param string $string A html5 document as a string. - * @param array $options Configuration options when parsing the HTML. - * - * @return \DOMDocument A DOM document. DOM is part of libxml, which is included with - * almost all distribtions of PHP. - */ - public function loadHTML($string, array $options = array()) - { - return $this->parse($string, $options); - } - - /** - * Convenience function to load an HTML file. - * - * This is here to provide backwards compatibility with the - * PHP DOM implementation. It simply calls load(). - * - * @param string $file The path to the file to parse. If this is a resource, it is - * assumed to be an open stream whose pointer is set to the first - * byte of input. - * @param array $options Configuration options when parsing the HTML. - * - * @return \DOMDocument A DOM document. These object type is defined by the libxml - * library, and should have been included with your version of PHP. - */ - public function loadHTMLFile($file, array $options = array()) - { - return $this->load($file, $options); - } - - /** - * Parse a HTML fragment from a string. - * - * @param string $string the HTML5 fragment as a string - * @param array $options Configuration options when parsing the HTML - * - * @return \DOMDocumentFragment A DOM fragment. The DOM is part of libxml, which is included with - * almost all distributions of PHP. - */ - public function loadHTMLFragment($string, array $options = array()) - { - return $this->parseFragment($string, $options); - } - - /** - * Return all errors encountered into parsing phase. - * - * @return array - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Return true it some errors were encountered into parsing phase. - * - * @return bool - */ - public function hasErrors() - { - return count($this->errors) > 0; - } - - /** - * Parse an input string. - * - * @param string $input - * @param array $options - * - * @return \DOMDocument - */ - public function parse($input, array $options = array()) - { - $this->errors = array(); - $options = array_merge($this->defaultOptions, $options); - $events = new DOMTreeBuilder(false, $options); - $scanner = new Scanner($input, !empty($options['encoding']) ? $options['encoding'] : 'UTF-8'); - $parser = new Tokenizer($scanner, $events, !empty($options['xmlNamespaces']) ? Tokenizer::CONFORMANT_XML : Tokenizer::CONFORMANT_HTML); - - $parser->parse(); - $this->errors = $events->getErrors(); - - return $events->document(); - } - - /** - * Parse an input stream where the stream is a fragment. - * - * Lower-level loading function. This requires an input stream instead - * of a string, file, or resource. - * - * @param string $input The input data to parse in the form of a string. - * @param array $options An array of options. - * - * @return \DOMDocumentFragment - */ - public function parseFragment($input, array $options = array()) - { - $options = array_merge($this->defaultOptions, $options); - $events = new DOMTreeBuilder(true, $options); - $scanner = new Scanner($input, !empty($options['encoding']) ? $options['encoding'] : 'UTF-8'); - $parser = new Tokenizer($scanner, $events, !empty($options['xmlNamespaces']) ? Tokenizer::CONFORMANT_XML : Tokenizer::CONFORMANT_HTML); - - $parser->parse(); - $this->errors = $events->getErrors(); - - return $events->fragment(); - } - - /** - * Save a DOM into a given file as HTML5. - * - * @param mixed $dom The DOM to be serialized. - * @param string|resource $file The filename to be written or resource to write to. - * @param array $options Configuration options when serializing the DOM. These include: - * - encode_entities: Text written to the output is escaped by default and not all - * entities are encoded. If this is set to true all entities will be encoded. - * Defaults to false. - */ - public function save($dom, $file, $options = array()) - { - $close = true; - if (is_resource($file)) { - $stream = $file; - $close = false; - } else { - $stream = fopen($file, 'wb'); - } - $options = array_merge($this->defaultOptions, $options); - $rules = new OutputRules($stream, $options); - $trav = new Traverser($dom, $stream, $rules, $options); - - $trav->walk(); - /* - * release the traverser to avoid cyclic references and allow PHP to free memory without waiting for gc_collect_cycles - */ - $rules->unsetTraverser(); - if ($close) { - fclose($stream); - } - } - - /** - * Convert a DOM into an HTML5 string. - * - * @param mixed $dom The DOM to be serialized. - * @param array $options Configuration options when serializing the DOM. These include: - * - encode_entities: Text written to the output is escaped by default and not all - * entities are encoded. If this is set to true all entities will be encoded. - * Defaults to false. - * - * @return string A HTML5 documented generated from the DOM. - */ - public function saveHTML($dom, $options = array()) - { - $stream = fopen('php://temp', 'wb'); - $this->save($dom, $stream, array_merge($this->defaultOptions, $options)); - - $html = stream_get_contents($stream, -1, 0); - - fclose($stream); - - return $html; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Elements.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Elements.php deleted file mode 100644 index 1632dcfec..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Elements.php +++ /dev/null @@ -1,619 +0,0 @@ - 1, - 'abbr' => 1, - 'address' => 65, // NORMAL | BLOCK_TAG - 'area' => 9, // NORMAL | VOID_TAG - 'article' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'aside' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'audio' => 1, // NORMAL - 'b' => 1, - 'base' => 9, // NORMAL | VOID_TAG - 'bdi' => 1, - 'bdo' => 1, - 'blockquote' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'body' => 1, - 'br' => 9, // NORMAL | VOID_TAG - 'button' => 1, - 'canvas' => 65, // NORMAL | BLOCK_TAG - 'caption' => 1, - 'cite' => 1, - 'code' => 1, - 'col' => 9, // NORMAL | VOID_TAG - 'colgroup' => 1, - 'command' => 9, // NORMAL | VOID_TAG - // "data" => 1, // This is highly experimental and only part of the whatwg spec (not w3c). See https://developer.mozilla.org/en-US/docs/HTML/Element/data - 'datalist' => 1, - 'dd' => 65, // NORMAL | BLOCK_TAG - 'del' => 1, - 'details' => 17, // NORMAL | AUTOCLOSE_P, - 'dfn' => 1, - 'dialog' => 17, // NORMAL | AUTOCLOSE_P, - 'div' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'dl' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'dt' => 1, - 'em' => 1, - 'embed' => 9, // NORMAL | VOID_TAG - 'fieldset' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'figcaption' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'figure' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'footer' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'form' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'h1' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'h2' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'h3' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'h4' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'h5' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'h6' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'head' => 1, - 'header' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'hgroup' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'hr' => 73, // NORMAL | VOID_TAG - 'html' => 1, - 'i' => 1, - 'iframe' => 3, // NORMAL | TEXT_RAW - 'img' => 9, // NORMAL | VOID_TAG - 'input' => 9, // NORMAL | VOID_TAG - 'kbd' => 1, - 'ins' => 1, - 'keygen' => 9, // NORMAL | VOID_TAG - 'label' => 1, - 'legend' => 1, - 'li' => 1, - 'link' => 9, // NORMAL | VOID_TAG - 'map' => 1, - 'mark' => 1, - 'menu' => 17, // NORMAL | AUTOCLOSE_P, - 'meta' => 9, // NORMAL | VOID_TAG - 'meter' => 1, - 'nav' => 17, // NORMAL | AUTOCLOSE_P, - 'noscript' => 65, // NORMAL | BLOCK_TAG - 'object' => 1, - 'ol' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'optgroup' => 1, - 'option' => 1, - 'output' => 65, // NORMAL | BLOCK_TAG - 'p' => 209, // NORMAL | AUTOCLOSE_P | BLOCK_TAG | BLOCK_ONLY_INLINE - 'param' => 9, // NORMAL | VOID_TAG - 'pre' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'progress' => 1, - 'q' => 1, - 'rp' => 1, - 'rt' => 1, - 'ruby' => 1, - 's' => 1, - 'samp' => 1, - 'script' => 3, // NORMAL | TEXT_RAW - 'section' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'select' => 1, - 'small' => 1, - 'source' => 9, // NORMAL | VOID_TAG - 'span' => 1, - 'strong' => 1, - 'style' => 3, // NORMAL | TEXT_RAW - 'sub' => 1, - 'summary' => 17, // NORMAL | AUTOCLOSE_P, - 'sup' => 1, - 'table' => 65, // NORMAL | BLOCK_TAG - 'tbody' => 1, - 'td' => 1, - 'textarea' => 5, // NORMAL | TEXT_RCDATA - 'tfoot' => 65, // NORMAL | BLOCK_TAG - 'th' => 1, - 'thead' => 1, - 'time' => 1, - 'title' => 5, // NORMAL | TEXT_RCDATA - 'tr' => 1, - 'track' => 9, // NORMAL | VOID_TAG - 'u' => 1, - 'ul' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - 'var' => 1, - 'video' => 1, - 'wbr' => 9, // NORMAL | VOID_TAG - - // Legacy? - 'basefont' => 8, // VOID_TAG - 'bgsound' => 8, // VOID_TAG - 'noframes' => 2, // RAW_TEXT - 'frame' => 9, // NORMAL | VOID_TAG - 'frameset' => 1, - 'center' => 16, - 'dir' => 16, - 'listing' => 16, // AUTOCLOSE_P - 'plaintext' => 48, // AUTOCLOSE_P | TEXT_PLAINTEXT - 'applet' => 0, - 'marquee' => 0, - 'isindex' => 8, // VOID_TAG - 'xmp' => 20, // AUTOCLOSE_P | VOID_TAG | RAW_TEXT - 'noembed' => 2, // RAW_TEXT - ); - - /** - * The MathML elements. - * See http://www.w3.org/wiki/MathML/Elements. - * - * In our case we are only concerned with presentation MathML and not content - * MathML. There is a nice list of this subset at https://developer.mozilla.org/en-US/docs/MathML/Element. - * - * @var array - */ - public static $mathml = array( - 'maction' => 1, - 'maligngroup' => 1, - 'malignmark' => 1, - 'math' => 1, - 'menclose' => 1, - 'merror' => 1, - 'mfenced' => 1, - 'mfrac' => 1, - 'mglyph' => 1, - 'mi' => 1, - 'mlabeledtr' => 1, - 'mlongdiv' => 1, - 'mmultiscripts' => 1, - 'mn' => 1, - 'mo' => 1, - 'mover' => 1, - 'mpadded' => 1, - 'mphantom' => 1, - 'mroot' => 1, - 'mrow' => 1, - 'ms' => 1, - 'mscarries' => 1, - 'mscarry' => 1, - 'msgroup' => 1, - 'msline' => 1, - 'mspace' => 1, - 'msqrt' => 1, - 'msrow' => 1, - 'mstack' => 1, - 'mstyle' => 1, - 'msub' => 1, - 'msup' => 1, - 'msubsup' => 1, - 'mtable' => 1, - 'mtd' => 1, - 'mtext' => 1, - 'mtr' => 1, - 'munder' => 1, - 'munderover' => 1, - ); - - /** - * The svg elements. - * - * The Mozilla documentation has a good list at https://developer.mozilla.org/en-US/docs/SVG/Element. - * The w3c list appears to be lacking in some areas like filter effect elements. - * That list can be found at http://www.w3.org/wiki/SVG/Elements. - * - * Note, FireFox appears to do a better job rendering filter effects than chrome. - * While they are in the spec I'm not sure how widely implemented they are. - * - * @var array - */ - public static $svg = array( - 'a' => 1, - 'altGlyph' => 1, - 'altGlyphDef' => 1, - 'altGlyphItem' => 1, - 'animate' => 1, - 'animateColor' => 1, - 'animateMotion' => 1, - 'animateTransform' => 1, - 'circle' => 1, - 'clipPath' => 1, - 'color-profile' => 1, - 'cursor' => 1, - 'defs' => 1, - 'desc' => 1, - 'ellipse' => 1, - 'feBlend' => 1, - 'feColorMatrix' => 1, - 'feComponentTransfer' => 1, - 'feComposite' => 1, - 'feConvolveMatrix' => 1, - 'feDiffuseLighting' => 1, - 'feDisplacementMap' => 1, - 'feDistantLight' => 1, - 'feFlood' => 1, - 'feFuncA' => 1, - 'feFuncB' => 1, - 'feFuncG' => 1, - 'feFuncR' => 1, - 'feGaussianBlur' => 1, - 'feImage' => 1, - 'feMerge' => 1, - 'feMergeNode' => 1, - 'feMorphology' => 1, - 'feOffset' => 1, - 'fePointLight' => 1, - 'feSpecularLighting' => 1, - 'feSpotLight' => 1, - 'feTile' => 1, - 'feTurbulence' => 1, - 'filter' => 1, - 'font' => 1, - 'font-face' => 1, - 'font-face-format' => 1, - 'font-face-name' => 1, - 'font-face-src' => 1, - 'font-face-uri' => 1, - 'foreignObject' => 1, - 'g' => 1, - 'glyph' => 1, - 'glyphRef' => 1, - 'hkern' => 1, - 'image' => 1, - 'line' => 1, - 'linearGradient' => 1, - 'marker' => 1, - 'mask' => 1, - 'metadata' => 1, - 'missing-glyph' => 1, - 'mpath' => 1, - 'path' => 1, - 'pattern' => 1, - 'polygon' => 1, - 'polyline' => 1, - 'radialGradient' => 1, - 'rect' => 1, - 'script' => 3, // NORMAL | RAW_TEXT - 'set' => 1, - 'stop' => 1, - 'style' => 3, // NORMAL | RAW_TEXT - 'svg' => 1, - 'switch' => 1, - 'symbol' => 1, - 'text' => 1, - 'textPath' => 1, - 'title' => 1, - 'tref' => 1, - 'tspan' => 1, - 'use' => 1, - 'view' => 1, - 'vkern' => 1, - ); - - /** - * Some attributes in SVG are case sensitive. - * - * This map contains key/value pairs with the key as the lowercase attribute - * name and the value with the correct casing. - */ - public static $svgCaseSensitiveAttributeMap = array( - 'attributename' => 'attributeName', - 'attributetype' => 'attributeType', - 'basefrequency' => 'baseFrequency', - 'baseprofile' => 'baseProfile', - 'calcmode' => 'calcMode', - 'clippathunits' => 'clipPathUnits', - 'contentscripttype' => 'contentScriptType', - 'contentstyletype' => 'contentStyleType', - 'diffuseconstant' => 'diffuseConstant', - 'edgemode' => 'edgeMode', - 'externalresourcesrequired' => 'externalResourcesRequired', - 'filterres' => 'filterRes', - 'filterunits' => 'filterUnits', - 'glyphref' => 'glyphRef', - 'gradienttransform' => 'gradientTransform', - 'gradientunits' => 'gradientUnits', - 'kernelmatrix' => 'kernelMatrix', - 'kernelunitlength' => 'kernelUnitLength', - 'keypoints' => 'keyPoints', - 'keysplines' => 'keySplines', - 'keytimes' => 'keyTimes', - 'lengthadjust' => 'lengthAdjust', - 'limitingconeangle' => 'limitingConeAngle', - 'markerheight' => 'markerHeight', - 'markerunits' => 'markerUnits', - 'markerwidth' => 'markerWidth', - 'maskcontentunits' => 'maskContentUnits', - 'maskunits' => 'maskUnits', - 'numoctaves' => 'numOctaves', - 'pathlength' => 'pathLength', - 'patterncontentunits' => 'patternContentUnits', - 'patterntransform' => 'patternTransform', - 'patternunits' => 'patternUnits', - 'pointsatx' => 'pointsAtX', - 'pointsaty' => 'pointsAtY', - 'pointsatz' => 'pointsAtZ', - 'preservealpha' => 'preserveAlpha', - 'preserveaspectratio' => 'preserveAspectRatio', - 'primitiveunits' => 'primitiveUnits', - 'refx' => 'refX', - 'refy' => 'refY', - 'repeatcount' => 'repeatCount', - 'repeatdur' => 'repeatDur', - 'requiredextensions' => 'requiredExtensions', - 'requiredfeatures' => 'requiredFeatures', - 'specularconstant' => 'specularConstant', - 'specularexponent' => 'specularExponent', - 'spreadmethod' => 'spreadMethod', - 'startoffset' => 'startOffset', - 'stddeviation' => 'stdDeviation', - 'stitchtiles' => 'stitchTiles', - 'surfacescale' => 'surfaceScale', - 'systemlanguage' => 'systemLanguage', - 'tablevalues' => 'tableValues', - 'targetx' => 'targetX', - 'targety' => 'targetY', - 'textlength' => 'textLength', - 'viewbox' => 'viewBox', - 'viewtarget' => 'viewTarget', - 'xchannelselector' => 'xChannelSelector', - 'ychannelselector' => 'yChannelSelector', - 'zoomandpan' => 'zoomAndPan', - ); - - /** - * Some SVG elements are case sensitive. - * This map contains these. - * - * The map contains key/value store of the name is lowercase as the keys and - * the correct casing as the value. - */ - public static $svgCaseSensitiveElementMap = array( - 'altglyph' => 'altGlyph', - 'altglyphdef' => 'altGlyphDef', - 'altglyphitem' => 'altGlyphItem', - 'animatecolor' => 'animateColor', - 'animatemotion' => 'animateMotion', - 'animatetransform' => 'animateTransform', - 'clippath' => 'clipPath', - 'feblend' => 'feBlend', - 'fecolormatrix' => 'feColorMatrix', - 'fecomponenttransfer' => 'feComponentTransfer', - 'fecomposite' => 'feComposite', - 'feconvolvematrix' => 'feConvolveMatrix', - 'fediffuselighting' => 'feDiffuseLighting', - 'fedisplacementmap' => 'feDisplacementMap', - 'fedistantlight' => 'feDistantLight', - 'feflood' => 'feFlood', - 'fefunca' => 'feFuncA', - 'fefuncb' => 'feFuncB', - 'fefuncg' => 'feFuncG', - 'fefuncr' => 'feFuncR', - 'fegaussianblur' => 'feGaussianBlur', - 'feimage' => 'feImage', - 'femerge' => 'feMerge', - 'femergenode' => 'feMergeNode', - 'femorphology' => 'feMorphology', - 'feoffset' => 'feOffset', - 'fepointlight' => 'fePointLight', - 'fespecularlighting' => 'feSpecularLighting', - 'fespotlight' => 'feSpotLight', - 'fetile' => 'feTile', - 'feturbulence' => 'feTurbulence', - 'foreignobject' => 'foreignObject', - 'glyphref' => 'glyphRef', - 'lineargradient' => 'linearGradient', - 'radialgradient' => 'radialGradient', - 'textpath' => 'textPath', - ); - - /** - * Check whether the given element meets the given criterion. - * - * Example: - * - * Elements::isA('script', Elements::TEXT_RAW); // Returns true. - * - * Elements::isA('script', Elements::TEXT_RCDATA); // Returns false. - * - * @param string $name The element name. - * @param int $mask One of the constants on this class. - * - * @return bool true if the element matches the mask, false otherwise. - */ - public static function isA($name, $mask) - { - return (static::element($name) & $mask) === $mask; - } - - /** - * Test if an element is a valid html5 element. - * - * @param string $name The name of the element. - * - * @return bool true if a html5 element and false otherwise. - */ - public static function isHtml5Element($name) - { - // html5 element names are case insensitive. Forcing lowercase for the check. - // Do we need this check or will all data passed here already be lowercase? - return isset(static::$html5[strtolower($name)]); - } - - /** - * Test if an element name is a valid MathML presentation element. - * - * @param string $name The name of the element. - * - * @return bool true if a MathML name and false otherwise. - */ - public static function isMathMLElement($name) - { - // MathML is case-sensitive unlike html5 elements. - return isset(static::$mathml[$name]); - } - - /** - * Test if an element is a valid SVG element. - * - * @param string $name The name of the element. - * - * @return bool true if a SVG element and false otherise. - */ - public static function isSvgElement($name) - { - // SVG is case-sensitive unlike html5 elements. - return isset(static::$svg[$name]); - } - - /** - * Is an element name valid in an html5 document. - * This includes html5 elements along with other allowed embedded content - * such as svg and mathml. - * - * @param string $name The name of the element. - * - * @return bool true if valid and false otherwise. - */ - public static function isElement($name) - { - return static::isHtml5Element($name) || static::isMathMLElement($name) || static::isSvgElement($name); - } - - /** - * Get the element mask for the given element name. - * - * @param string $name The name of the element. - * - * @return int the element mask. - */ - public static function element($name) - { - if (isset(static::$html5[$name])) { - return static::$html5[$name]; - } - if (isset(static::$svg[$name])) { - return static::$svg[$name]; - } - if (isset(static::$mathml[$name])) { - return static::$mathml[$name]; - } - - return 0; - } - - /** - * Normalize a SVG element name to its proper case and form. - * - * @param string $name The name of the element. - * - * @return string the normalized form of the element name. - */ - public static function normalizeSvgElement($name) - { - $name = strtolower($name); - if (isset(static::$svgCaseSensitiveElementMap[$name])) { - $name = static::$svgCaseSensitiveElementMap[$name]; - } - - return $name; - } - - /** - * Normalize a SVG attribute name to its proper case and form. - * - * @param string $name The name of the attribute. - * - * @return string The normalized form of the attribute name. - */ - public static function normalizeSvgAttribute($name) - { - $name = strtolower($name); - if (isset(static::$svgCaseSensitiveAttributeMap[$name])) { - $name = static::$svgCaseSensitiveAttributeMap[$name]; - } - - return $name; - } - - /** - * Normalize a MathML attribute name to its proper case and form. - * Note, all MathML element names are lowercase. - * - * @param string $name The name of the attribute. - * - * @return string The normalized form of the attribute name. - */ - public static function normalizeMathMlAttribute($name) - { - $name = strtolower($name); - - // Only one attribute has a mixed case form for MathML. - if ('definitionurl' === $name) { - $name = 'definitionURL'; - } - - return $name; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Entities.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Entities.php deleted file mode 100644 index 0e7227dc1..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Entities.php +++ /dev/null @@ -1,2236 +0,0 @@ - 'Ã', - 'Aacut' => 'Ã', - 'aacute' => 'á', - 'aacut' => 'á', - 'Abreve' => 'Ä‚', - 'abreve' => 'ă', - 'ac' => '∾', - 'acd' => '∿', - 'acE' => '∾̳', - 'Acirc' => 'Â', - 'Acir' => 'Â', - 'acirc' => 'â', - 'acir' => 'â', - 'acute' => '´', - 'acut' => '´', - 'Acy' => 'Ð', - 'acy' => 'а', - 'AElig' => 'Æ', - 'AEli' => 'Æ', - 'aelig' => 'æ', - 'aeli' => 'æ', - 'af' => 'â¡', - 'Afr' => 'ð”„', - 'afr' => 'ð”ž', - 'Agrave' => 'À', - 'Agrav' => 'À', - 'agrave' => 'à', - 'agrav' => 'à', - 'alefsym' => 'ℵ', - 'aleph' => 'ℵ', - 'Alpha' => 'Α', - 'alpha' => 'α', - 'Amacr' => 'Ä€', - 'amacr' => 'Ä', - 'amalg' => '⨿', - 'AMP' => '&', - 'AM' => '&', - 'amp' => '&', - 'am' => '&', - 'And' => 'â©“', - 'and' => '∧', - 'andand' => 'â©•', - 'andd' => '⩜', - 'andslope' => '⩘', - 'andv' => '⩚', - 'ang' => '∠', - 'ange' => '⦤', - 'angle' => '∠', - 'angmsd' => '∡', - 'angmsdaa' => '⦨', - 'angmsdab' => '⦩', - 'angmsdac' => '⦪', - 'angmsdad' => '⦫', - 'angmsdae' => '⦬', - 'angmsdaf' => '⦭', - 'angmsdag' => '⦮', - 'angmsdah' => '⦯', - 'angrt' => '∟', - 'angrtvb' => '⊾', - 'angrtvbd' => 'â¦', - 'angsph' => '∢', - 'angst' => 'Ã…', - 'angzarr' => 'â¼', - 'Aogon' => 'Ä„', - 'aogon' => 'Ä…', - 'Aopf' => 'ð”¸', - 'aopf' => 'ð•’', - 'ap' => '≈', - 'apacir' => '⩯', - 'apE' => 'â©°', - 'ape' => '≊', - 'apid' => '≋', - 'apos' => '\'', - 'ApplyFunction' => 'â¡', - 'approx' => '≈', - 'approxeq' => '≊', - 'Aring' => 'Ã…', - 'Arin' => 'Ã…', - 'aring' => 'Ã¥', - 'arin' => 'Ã¥', - 'Ascr' => 'ð’œ', - 'ascr' => 'ð’¶', - 'Assign' => '≔', - 'ast' => '*', - 'asymp' => '≈', - 'asympeq' => 'â‰', - 'Atilde' => 'Ã', - 'Atild' => 'Ã', - 'atilde' => 'ã', - 'atild' => 'ã', - 'Auml' => 'Ä', - 'Aum' => 'Ä', - 'auml' => 'ä', - 'aum' => 'ä', - 'awconint' => '∳', - 'awint' => '⨑', - 'backcong' => '≌', - 'backepsilon' => '϶', - 'backprime' => '‵', - 'backsim' => '∽', - 'backsimeq' => 'â‹', - 'Backslash' => '∖', - 'Barv' => 'â«§', - 'barvee' => '⊽', - 'Barwed' => '⌆', - 'barwed' => '⌅', - 'barwedge' => '⌅', - 'bbrk' => '⎵', - 'bbrktbrk' => '⎶', - 'bcong' => '≌', - 'Bcy' => 'Б', - 'bcy' => 'б', - 'bdquo' => '„', - 'becaus' => '∵', - 'Because' => '∵', - 'because' => '∵', - 'bemptyv' => '⦰', - 'bepsi' => '϶', - 'bernou' => 'ℬ', - 'Bernoullis' => 'ℬ', - 'Beta' => 'Î’', - 'beta' => 'β', - 'beth' => 'â„¶', - 'between' => '≬', - 'Bfr' => 'ð”…', - 'bfr' => 'ð”Ÿ', - 'bigcap' => 'â‹‚', - 'bigcirc' => 'â—¯', - 'bigcup' => '⋃', - 'bigodot' => '⨀', - 'bigoplus' => 'â¨', - 'bigotimes' => '⨂', - 'bigsqcup' => '⨆', - 'bigstar' => '★', - 'bigtriangledown' => 'â–½', - 'bigtriangleup' => 'â–³', - 'biguplus' => '⨄', - 'bigvee' => 'â‹', - 'bigwedge' => 'â‹€', - 'bkarow' => 'â¤', - 'blacklozenge' => 'â§«', - 'blacksquare' => 'â–ª', - 'blacktriangle' => 'â–´', - 'blacktriangledown' => 'â–¾', - 'blacktriangleleft' => 'â—‚', - 'blacktriangleright' => 'â–¸', - 'blank' => 'â£', - 'blk12' => 'â–’', - 'blk14' => 'â–‘', - 'blk34' => 'â–“', - 'block' => 'â–ˆ', - 'bne' => '=⃥', - 'bnequiv' => '≡⃥', - 'bNot' => 'â«­', - 'bnot' => 'âŒ', - 'Bopf' => 'ð”¹', - 'bopf' => 'ð•“', - 'bot' => '⊥', - 'bottom' => '⊥', - 'bowtie' => '⋈', - 'boxbox' => '⧉', - 'boxDL' => 'â•—', - 'boxDl' => 'â•–', - 'boxdL' => 'â••', - 'boxdl' => 'â”', - 'boxDR' => 'â•”', - 'boxDr' => 'â•“', - 'boxdR' => 'â•’', - 'boxdr' => '┌', - 'boxH' => 'â•', - 'boxh' => '─', - 'boxHD' => '╦', - 'boxHd' => '╤', - 'boxhD' => 'â•¥', - 'boxhd' => '┬', - 'boxHU' => 'â•©', - 'boxHu' => 'â•§', - 'boxhU' => '╨', - 'boxhu' => 'â”´', - 'boxminus' => '⊟', - 'boxplus' => '⊞', - 'boxtimes' => '⊠', - 'boxUL' => 'â•', - 'boxUl' => '╜', - 'boxuL' => 'â•›', - 'boxul' => '┘', - 'boxUR' => '╚', - 'boxUr' => 'â•™', - 'boxuR' => '╘', - 'boxur' => 'â””', - 'boxV' => 'â•‘', - 'boxv' => '│', - 'boxVH' => '╬', - 'boxVh' => 'â•«', - 'boxvH' => '╪', - 'boxvh' => '┼', - 'boxVL' => 'â•£', - 'boxVl' => 'â•¢', - 'boxvL' => 'â•¡', - 'boxvl' => '┤', - 'boxVR' => 'â• ', - 'boxVr' => '╟', - 'boxvR' => '╞', - 'boxvr' => '├', - 'bprime' => '‵', - 'Breve' => '˘', - 'breve' => '˘', - 'brvbar' => '¦', - 'brvba' => '¦', - 'Bscr' => 'ℬ', - 'bscr' => 'ð’·', - 'bsemi' => 'â', - 'bsim' => '∽', - 'bsime' => 'â‹', - 'bsol' => '\\', - 'bsolb' => 'â§…', - 'bsolhsub' => '⟈', - 'bull' => '•', - 'bullet' => '•', - 'bump' => '≎', - 'bumpE' => '⪮', - 'bumpe' => 'â‰', - 'Bumpeq' => '≎', - 'bumpeq' => 'â‰', - 'Cacute' => 'Ć', - 'cacute' => 'ć', - 'Cap' => 'â‹’', - 'cap' => '∩', - 'capand' => 'â©„', - 'capbrcup' => '⩉', - 'capcap' => 'â©‹', - 'capcup' => '⩇', - 'capdot' => 'â©€', - 'CapitalDifferentialD' => 'â……', - 'caps' => '∩︀', - 'caret' => 'â', - 'caron' => 'ˇ', - 'Cayleys' => 'â„­', - 'ccaps' => 'â©', - 'Ccaron' => 'ÄŒ', - 'ccaron' => 'Ä', - 'Ccedil' => 'Ç', - 'Ccedi' => 'Ç', - 'ccedil' => 'ç', - 'ccedi' => 'ç', - 'Ccirc' => 'Ĉ', - 'ccirc' => 'ĉ', - 'Cconint' => '∰', - 'ccups' => '⩌', - 'ccupssm' => 'â©', - 'Cdot' => 'ÄŠ', - 'cdot' => 'Ä‹', - 'cedil' => '¸', - 'cedi' => '¸', - 'Cedilla' => '¸', - 'cemptyv' => '⦲', - 'cent' => '¢', - 'cen' => '¢', - 'CenterDot' => '·', - 'centerdot' => '·', - 'Cfr' => 'â„­', - 'cfr' => 'ð” ', - 'CHcy' => 'Ч', - 'chcy' => 'ч', - 'check' => '✓', - 'checkmark' => '✓', - 'Chi' => 'Χ', - 'chi' => 'χ', - 'cir' => 'â—‹', - 'circ' => 'ˆ', - 'circeq' => '≗', - 'circlearrowleft' => '↺', - 'circlearrowright' => '↻', - 'circledast' => '⊛', - 'circledcirc' => '⊚', - 'circleddash' => 'âŠ', - 'CircleDot' => '⊙', - 'circledR' => '®', - 'circledS' => 'Ⓢ', - 'CircleMinus' => '⊖', - 'CirclePlus' => '⊕', - 'CircleTimes' => '⊗', - 'cirE' => '⧃', - 'cire' => '≗', - 'cirfnint' => 'â¨', - 'cirmid' => '⫯', - 'cirscir' => 'â§‚', - 'ClockwiseContourIntegral' => '∲', - 'CloseCurlyDoubleQuote' => 'â€', - 'CloseCurlyQuote' => '’', - 'clubs' => '♣', - 'clubsuit' => '♣', - 'Colon' => '∷', - 'colon' => ':', - 'Colone' => 'â©´', - 'colone' => '≔', - 'coloneq' => '≔', - 'comma' => ',', - 'commat' => '@', - 'comp' => 'âˆ', - 'compfn' => '∘', - 'complement' => 'âˆ', - 'complexes' => 'â„‚', - 'cong' => '≅', - 'congdot' => 'â©­', - 'Congruent' => '≡', - 'Conint' => '∯', - 'conint' => '∮', - 'ContourIntegral' => '∮', - 'Copf' => 'â„‚', - 'copf' => 'ð•”', - 'coprod' => 'âˆ', - 'Coproduct' => 'âˆ', - 'COPY' => '©', - 'COP' => '©', - 'copy' => '©', - 'cop' => '©', - 'copysr' => 'â„—', - 'CounterClockwiseContourIntegral' => '∳', - 'crarr' => '↵', - 'Cross' => '⨯', - 'cross' => '✗', - 'Cscr' => 'ð’ž', - 'cscr' => 'ð’¸', - 'csub' => 'â«', - 'csube' => 'â«‘', - 'csup' => 'â«', - 'csupe' => 'â«’', - 'ctdot' => '⋯', - 'cudarrl' => '⤸', - 'cudarrr' => '⤵', - 'cuepr' => '⋞', - 'cuesc' => '⋟', - 'cularr' => '↶', - 'cularrp' => '⤽', - 'Cup' => 'â‹“', - 'cup' => '∪', - 'cupbrcap' => '⩈', - 'CupCap' => 'â‰', - 'cupcap' => '⩆', - 'cupcup' => '⩊', - 'cupdot' => 'âŠ', - 'cupor' => 'â©…', - 'cups' => '∪︀', - 'curarr' => '↷', - 'curarrm' => '⤼', - 'curlyeqprec' => '⋞', - 'curlyeqsucc' => '⋟', - 'curlyvee' => '⋎', - 'curlywedge' => 'â‹', - 'curren' => '¤', - 'curre' => '¤', - 'curvearrowleft' => '↶', - 'curvearrowright' => '↷', - 'cuvee' => '⋎', - 'cuwed' => 'â‹', - 'cwconint' => '∲', - 'cwint' => '∱', - 'cylcty' => '⌭', - 'Dagger' => '‡', - 'dagger' => '†', - 'daleth' => 'ℸ', - 'Darr' => '↡', - 'dArr' => '⇓', - 'darr' => '↓', - 'dash' => 'â€', - 'Dashv' => '⫤', - 'dashv' => '⊣', - 'dbkarow' => 'â¤', - 'dblac' => 'Ë', - 'Dcaron' => 'ÄŽ', - 'dcaron' => 'Ä', - 'Dcy' => 'Д', - 'dcy' => 'д', - 'DD' => 'â……', - 'dd' => 'â…†', - 'ddagger' => '‡', - 'ddarr' => '⇊', - 'DDotrahd' => '⤑', - 'ddotseq' => 'â©·', - 'deg' => '°', - 'de' => '°', - 'Del' => '∇', - 'Delta' => 'Δ', - 'delta' => 'δ', - 'demptyv' => '⦱', - 'dfisht' => '⥿', - 'Dfr' => 'ð”‡', - 'dfr' => 'ð”¡', - 'dHar' => '⥥', - 'dharl' => '⇃', - 'dharr' => '⇂', - 'DiacriticalAcute' => '´', - 'DiacriticalDot' => 'Ë™', - 'DiacriticalDoubleAcute' => 'Ë', - 'DiacriticalGrave' => '`', - 'DiacriticalTilde' => 'Ëœ', - 'diam' => 'â‹„', - 'Diamond' => 'â‹„', - 'diamond' => 'â‹„', - 'diamondsuit' => '♦', - 'diams' => '♦', - 'die' => '¨', - 'DifferentialD' => 'â…†', - 'digamma' => 'Ï', - 'disin' => '⋲', - 'div' => '÷', - 'divide' => '÷', - 'divid' => '÷', - 'divideontimes' => '⋇', - 'divonx' => '⋇', - 'DJcy' => 'Ђ', - 'djcy' => 'Ñ’', - 'dlcorn' => '⌞', - 'dlcrop' => 'âŒ', - 'dollar' => '$', - 'Dopf' => 'ð”»', - 'dopf' => 'ð••', - 'Dot' => '¨', - 'dot' => 'Ë™', - 'DotDot' => '⃜', - 'doteq' => 'â‰', - 'doteqdot' => '≑', - 'DotEqual' => 'â‰', - 'dotminus' => '∸', - 'dotplus' => '∔', - 'dotsquare' => '⊡', - 'doublebarwedge' => '⌆', - 'DoubleContourIntegral' => '∯', - 'DoubleDot' => '¨', - 'DoubleDownArrow' => '⇓', - 'DoubleLeftArrow' => 'â‡', - 'DoubleLeftRightArrow' => '⇔', - 'DoubleLeftTee' => '⫤', - 'DoubleLongLeftArrow' => '⟸', - 'DoubleLongLeftRightArrow' => '⟺', - 'DoubleLongRightArrow' => '⟹', - 'DoubleRightArrow' => '⇒', - 'DoubleRightTee' => '⊨', - 'DoubleUpArrow' => '⇑', - 'DoubleUpDownArrow' => '⇕', - 'DoubleVerticalBar' => '∥', - 'DownArrow' => '↓', - 'Downarrow' => '⇓', - 'downarrow' => '↓', - 'DownArrowBar' => '⤓', - 'DownArrowUpArrow' => '⇵', - 'DownBreve' => 'Ì‘', - 'downdownarrows' => '⇊', - 'downharpoonleft' => '⇃', - 'downharpoonright' => '⇂', - 'DownLeftRightVector' => 'â¥', - 'DownLeftTeeVector' => '⥞', - 'DownLeftVector' => '↽', - 'DownLeftVectorBar' => '⥖', - 'DownRightTeeVector' => '⥟', - 'DownRightVector' => 'â‡', - 'DownRightVectorBar' => '⥗', - 'DownTee' => '⊤', - 'DownTeeArrow' => '↧', - 'drbkarow' => 'â¤', - 'drcorn' => '⌟', - 'drcrop' => '⌌', - 'Dscr' => 'ð’Ÿ', - 'dscr' => 'ð’¹', - 'DScy' => 'Ð…', - 'dscy' => 'Ñ•', - 'dsol' => 'â§¶', - 'Dstrok' => 'Ä', - 'dstrok' => 'Ä‘', - 'dtdot' => '⋱', - 'dtri' => 'â–¿', - 'dtrif' => 'â–¾', - 'duarr' => '⇵', - 'duhar' => '⥯', - 'dwangle' => '⦦', - 'DZcy' => 'Ð', - 'dzcy' => 'ÑŸ', - 'dzigrarr' => '⟿', - 'Eacute' => 'É', - 'Eacut' => 'É', - 'eacute' => 'é', - 'eacut' => 'é', - 'easter' => 'â©®', - 'Ecaron' => 'Äš', - 'ecaron' => 'Ä›', - 'ecir' => 'ê', - 'Ecirc' => 'Ê', - 'Ecir' => 'Ê', - 'ecirc' => 'ê', - 'ecolon' => '≕', - 'Ecy' => 'Э', - 'ecy' => 'Ñ', - 'eDDot' => 'â©·', - 'Edot' => 'Ä–', - 'eDot' => '≑', - 'edot' => 'Ä—', - 'ee' => 'â…‡', - 'efDot' => '≒', - 'Efr' => 'ð”ˆ', - 'efr' => 'ð”¢', - 'eg' => '⪚', - 'Egrave' => 'È', - 'Egrav' => 'È', - 'egrave' => 'è', - 'egrav' => 'è', - 'egs' => '⪖', - 'egsdot' => '⪘', - 'el' => '⪙', - 'Element' => '∈', - 'elinters' => 'â§', - 'ell' => 'â„“', - 'els' => '⪕', - 'elsdot' => '⪗', - 'Emacr' => 'Ä’', - 'emacr' => 'Ä“', - 'empty' => '∅', - 'emptyset' => '∅', - 'EmptySmallSquare' => 'â—»', - 'emptyv' => '∅', - 'EmptyVerySmallSquare' => 'â–«', - 'emsp' => ' ', - 'emsp13' => ' ', - 'emsp14' => ' ', - 'ENG' => 'ÅŠ', - 'eng' => 'Å‹', - 'ensp' => ' ', - 'Eogon' => 'Ę', - 'eogon' => 'Ä™', - 'Eopf' => 'ð”¼', - 'eopf' => 'ð•–', - 'epar' => 'â‹•', - 'eparsl' => 'â§£', - 'eplus' => '⩱', - 'epsi' => 'ε', - 'Epsilon' => 'Ε', - 'epsilon' => 'ε', - 'epsiv' => 'ϵ', - 'eqcirc' => '≖', - 'eqcolon' => '≕', - 'eqsim' => '≂', - 'eqslantgtr' => '⪖', - 'eqslantless' => '⪕', - 'Equal' => '⩵', - 'equals' => '=', - 'EqualTilde' => '≂', - 'equest' => '≟', - 'Equilibrium' => '⇌', - 'equiv' => '≡', - 'equivDD' => '⩸', - 'eqvparsl' => 'â§¥', - 'erarr' => '⥱', - 'erDot' => '≓', - 'Escr' => 'â„°', - 'escr' => 'ℯ', - 'esdot' => 'â‰', - 'Esim' => '⩳', - 'esim' => '≂', - 'Eta' => 'Η', - 'eta' => 'η', - 'ETH' => 'Ã', - 'ET' => 'Ã', - 'eth' => 'ð', - 'et' => 'ð', - 'Euml' => 'Ë', - 'Eum' => 'Ë', - 'euml' => 'ë', - 'eum' => 'ë', - 'euro' => '€', - 'excl' => '!', - 'exist' => '∃', - 'Exists' => '∃', - 'expectation' => 'â„°', - 'ExponentialE' => 'â…‡', - 'exponentiale' => 'â…‡', - 'fallingdotseq' => '≒', - 'Fcy' => 'Ф', - 'fcy' => 'Ñ„', - 'female' => '♀', - 'ffilig' => 'ffi', - 'fflig' => 'ff', - 'ffllig' => 'ffl', - 'Ffr' => 'ð”‰', - 'ffr' => 'ð”£', - 'filig' => 'ï¬', - 'FilledSmallSquare' => 'â—¼', - 'FilledVerySmallSquare' => 'â–ª', - 'fjlig' => 'fj', - 'flat' => 'â™­', - 'fllig' => 'fl', - 'fltns' => 'â–±', - 'fnof' => 'Æ’', - 'Fopf' => 'ð”½', - 'fopf' => 'ð•—', - 'ForAll' => '∀', - 'forall' => '∀', - 'fork' => 'â‹”', - 'forkv' => 'â«™', - 'Fouriertrf' => 'ℱ', - 'fpartint' => 'â¨', - 'frac12' => '½', - 'frac1' => '¼', - 'frac13' => 'â…“', - 'frac14' => '¼', - 'frac15' => 'â…•', - 'frac16' => 'â…™', - 'frac18' => 'â…›', - 'frac23' => 'â…”', - 'frac25' => 'â…–', - 'frac34' => '¾', - 'frac3' => '¾', - 'frac35' => 'â…—', - 'frac38' => 'â…œ', - 'frac45' => 'â…˜', - 'frac56' => 'â…š', - 'frac58' => 'â…', - 'frac78' => 'â…ž', - 'frasl' => 'â„', - 'frown' => '⌢', - 'Fscr' => 'ℱ', - 'fscr' => 'ð’»', - 'gacute' => 'ǵ', - 'Gamma' => 'Γ', - 'gamma' => 'γ', - 'Gammad' => 'Ïœ', - 'gammad' => 'Ï', - 'gap' => '⪆', - 'Gbreve' => 'Äž', - 'gbreve' => 'ÄŸ', - 'Gcedil' => 'Ä¢', - 'Gcirc' => 'Äœ', - 'gcirc' => 'Ä', - 'Gcy' => 'Г', - 'gcy' => 'г', - 'Gdot' => 'Ä ', - 'gdot' => 'Ä¡', - 'gE' => '≧', - 'ge' => '≥', - 'gEl' => '⪌', - 'gel' => 'â‹›', - 'geq' => '≥', - 'geqq' => '≧', - 'geqslant' => '⩾', - 'ges' => '⩾', - 'gescc' => '⪩', - 'gesdot' => '⪀', - 'gesdoto' => '⪂', - 'gesdotol' => '⪄', - 'gesl' => '⋛︀', - 'gesles' => '⪔', - 'Gfr' => 'ð”Š', - 'gfr' => 'ð”¤', - 'Gg' => 'â‹™', - 'gg' => '≫', - 'ggg' => 'â‹™', - 'gimel' => 'â„·', - 'GJcy' => 'Ѓ', - 'gjcy' => 'Ñ“', - 'gl' => '≷', - 'gla' => '⪥', - 'glE' => '⪒', - 'glj' => '⪤', - 'gnap' => '⪊', - 'gnapprox' => '⪊', - 'gnE' => '≩', - 'gne' => '⪈', - 'gneq' => '⪈', - 'gneqq' => '≩', - 'gnsim' => 'â‹§', - 'Gopf' => 'ð”¾', - 'gopf' => 'ð•˜', - 'grave' => '`', - 'GreaterEqual' => '≥', - 'GreaterEqualLess' => 'â‹›', - 'GreaterFullEqual' => '≧', - 'GreaterGreater' => '⪢', - 'GreaterLess' => '≷', - 'GreaterSlantEqual' => '⩾', - 'GreaterTilde' => '≳', - 'Gscr' => 'ð’¢', - 'gscr' => 'ℊ', - 'gsim' => '≳', - 'gsime' => '⪎', - 'gsiml' => 'âª', - 'GT' => '>', - 'G' => '>', - 'Gt' => '≫', - 'gt' => '>', - 'g' => '>', - 'gtcc' => '⪧', - 'gtcir' => '⩺', - 'gtdot' => 'â‹—', - 'gtlPar' => '⦕', - 'gtquest' => '⩼', - 'gtrapprox' => '⪆', - 'gtrarr' => '⥸', - 'gtrdot' => 'â‹—', - 'gtreqless' => 'â‹›', - 'gtreqqless' => '⪌', - 'gtrless' => '≷', - 'gtrsim' => '≳', - 'gvertneqq' => '≩︀', - 'gvnE' => '≩︀', - 'Hacek' => 'ˇ', - 'hairsp' => ' ', - 'half' => '½', - 'hamilt' => 'â„‹', - 'HARDcy' => 'Ъ', - 'hardcy' => 'ÑŠ', - 'hArr' => '⇔', - 'harr' => '↔', - 'harrcir' => '⥈', - 'harrw' => '↭', - 'Hat' => '^', - 'hbar' => 'â„', - 'Hcirc' => 'Ĥ', - 'hcirc' => 'Ä¥', - 'hearts' => '♥', - 'heartsuit' => '♥', - 'hellip' => '…', - 'hercon' => '⊹', - 'Hfr' => 'ℌ', - 'hfr' => 'ð”¥', - 'HilbertSpace' => 'â„‹', - 'hksearow' => '⤥', - 'hkswarow' => '⤦', - 'hoarr' => '⇿', - 'homtht' => '∻', - 'hookleftarrow' => '↩', - 'hookrightarrow' => '↪', - 'Hopf' => 'â„', - 'hopf' => 'ð•™', - 'horbar' => '―', - 'HorizontalLine' => '─', - 'Hscr' => 'â„‹', - 'hscr' => 'ð’½', - 'hslash' => 'â„', - 'Hstrok' => 'Ħ', - 'hstrok' => 'ħ', - 'HumpDownHump' => '≎', - 'HumpEqual' => 'â‰', - 'hybull' => 'âƒ', - 'hyphen' => 'â€', - 'Iacute' => 'Ã', - 'Iacut' => 'Ã', - 'iacute' => 'í', - 'iacut' => 'í', - 'ic' => 'â£', - 'Icirc' => 'ÃŽ', - 'Icir' => 'ÃŽ', - 'icirc' => 'î', - 'icir' => 'î', - 'Icy' => 'И', - 'icy' => 'и', - 'Idot' => 'İ', - 'IEcy' => 'Е', - 'iecy' => 'е', - 'iexcl' => '¡', - 'iexc' => '¡', - 'iff' => '⇔', - 'Ifr' => 'â„‘', - 'ifr' => 'ð”¦', - 'Igrave' => 'ÃŒ', - 'Igrav' => 'ÃŒ', - 'igrave' => 'ì', - 'igrav' => 'ì', - 'ii' => 'â…ˆ', - 'iiiint' => '⨌', - 'iiint' => '∭', - 'iinfin' => 'â§œ', - 'iiota' => 'â„©', - 'IJlig' => 'IJ', - 'ijlig' => 'ij', - 'Im' => 'â„‘', - 'Imacr' => 'Ī', - 'imacr' => 'Ä«', - 'image' => 'â„‘', - 'ImaginaryI' => 'â…ˆ', - 'imagline' => 'â„', - 'imagpart' => 'â„‘', - 'imath' => 'ı', - 'imof' => '⊷', - 'imped' => 'Ƶ', - 'Implies' => '⇒', - 'in' => '∈', - 'incare' => 'â„…', - 'infin' => '∞', - 'infintie' => 'â§', - 'inodot' => 'ı', - 'Int' => '∬', - 'int' => '∫', - 'intcal' => '⊺', - 'integers' => 'ℤ', - 'Integral' => '∫', - 'intercal' => '⊺', - 'Intersection' => 'â‹‚', - 'intlarhk' => '⨗', - 'intprod' => '⨼', - 'InvisibleComma' => 'â£', - 'InvisibleTimes' => 'â¢', - 'IOcy' => 'Ð', - 'iocy' => 'Ñ‘', - 'Iogon' => 'Ä®', - 'iogon' => 'į', - 'Iopf' => 'ð•€', - 'iopf' => 'ð•š', - 'Iota' => 'Ι', - 'iota' => 'ι', - 'iprod' => '⨼', - 'iquest' => '¿', - 'iques' => '¿', - 'Iscr' => 'â„', - 'iscr' => 'ð’¾', - 'isin' => '∈', - 'isindot' => '⋵', - 'isinE' => '⋹', - 'isins' => 'â‹´', - 'isinsv' => '⋳', - 'isinv' => '∈', - 'it' => 'â¢', - 'Itilde' => 'Ĩ', - 'itilde' => 'Ä©', - 'Iukcy' => 'І', - 'iukcy' => 'Ñ–', - 'Iuml' => 'Ã', - 'Ium' => 'Ã', - 'iuml' => 'ï', - 'ium' => 'ï', - 'Jcirc' => 'Ä´', - 'jcirc' => 'ĵ', - 'Jcy' => 'Й', - 'jcy' => 'й', - 'Jfr' => 'ð”', - 'jfr' => 'ð”§', - 'jmath' => 'È·', - 'Jopf' => 'ð•', - 'jopf' => 'ð•›', - 'Jscr' => 'ð’¥', - 'jscr' => 'ð’¿', - 'Jsercy' => 'Ј', - 'jsercy' => 'ј', - 'Jukcy' => 'Є', - 'jukcy' => 'Ñ”', - 'Kappa' => 'Κ', - 'kappa' => 'κ', - 'kappav' => 'ϰ', - 'Kcedil' => 'Ķ', - 'kcedil' => 'Ä·', - 'Kcy' => 'К', - 'kcy' => 'к', - 'Kfr' => 'ð”Ž', - 'kfr' => 'ð”¨', - 'kgreen' => 'ĸ', - 'KHcy' => 'Ð¥', - 'khcy' => 'Ñ…', - 'KJcy' => 'ÐŒ', - 'kjcy' => 'Ñœ', - 'Kopf' => 'ð•‚', - 'kopf' => 'ð•œ', - 'Kscr' => 'ð’¦', - 'kscr' => 'ð“€', - 'lAarr' => '⇚', - 'Lacute' => 'Ĺ', - 'lacute' => 'ĺ', - 'laemptyv' => '⦴', - 'lagran' => 'â„’', - 'Lambda' => 'Λ', - 'lambda' => 'λ', - 'Lang' => '⟪', - 'lang' => '⟨', - 'langd' => '⦑', - 'langle' => '⟨', - 'lap' => '⪅', - 'Laplacetrf' => 'â„’', - 'laquo' => '«', - 'laqu' => '«', - 'Larr' => '↞', - 'lArr' => 'â‡', - 'larr' => 'â†', - 'larrb' => '⇤', - 'larrbfs' => '⤟', - 'larrfs' => 'â¤', - 'larrhk' => '↩', - 'larrlp' => '↫', - 'larrpl' => '⤹', - 'larrsim' => '⥳', - 'larrtl' => '↢', - 'lat' => '⪫', - 'lAtail' => '⤛', - 'latail' => '⤙', - 'late' => '⪭', - 'lates' => '⪭︀', - 'lBarr' => '⤎', - 'lbarr' => '⤌', - 'lbbrk' => 'â²', - 'lbrace' => '{', - 'lbrack' => '[', - 'lbrke' => '⦋', - 'lbrksld' => 'â¦', - 'lbrkslu' => 'â¦', - 'Lcaron' => 'Ľ', - 'lcaron' => 'ľ', - 'Lcedil' => 'Ä»', - 'lcedil' => 'ļ', - 'lceil' => '⌈', - 'lcub' => '{', - 'Lcy' => 'Л', - 'lcy' => 'л', - 'ldca' => '⤶', - 'ldquo' => '“', - 'ldquor' => '„', - 'ldrdhar' => '⥧', - 'ldrushar' => '⥋', - 'ldsh' => '↲', - 'lE' => '≦', - 'le' => '≤', - 'LeftAngleBracket' => '⟨', - 'LeftArrow' => 'â†', - 'Leftarrow' => 'â‡', - 'leftarrow' => 'â†', - 'LeftArrowBar' => '⇤', - 'LeftArrowRightArrow' => '⇆', - 'leftarrowtail' => '↢', - 'LeftCeiling' => '⌈', - 'LeftDoubleBracket' => '⟦', - 'LeftDownTeeVector' => '⥡', - 'LeftDownVector' => '⇃', - 'LeftDownVectorBar' => '⥙', - 'LeftFloor' => '⌊', - 'leftharpoondown' => '↽', - 'leftharpoonup' => '↼', - 'leftleftarrows' => '⇇', - 'LeftRightArrow' => '↔', - 'Leftrightarrow' => '⇔', - 'leftrightarrow' => '↔', - 'leftrightarrows' => '⇆', - 'leftrightharpoons' => '⇋', - 'leftrightsquigarrow' => '↭', - 'LeftRightVector' => '⥎', - 'LeftTee' => '⊣', - 'LeftTeeArrow' => '↤', - 'LeftTeeVector' => '⥚', - 'leftthreetimes' => 'â‹‹', - 'LeftTriangle' => '⊲', - 'LeftTriangleBar' => 'â§', - 'LeftTriangleEqual' => '⊴', - 'LeftUpDownVector' => '⥑', - 'LeftUpTeeVector' => '⥠', - 'LeftUpVector' => '↿', - 'LeftUpVectorBar' => '⥘', - 'LeftVector' => '↼', - 'LeftVectorBar' => '⥒', - 'lEg' => '⪋', - 'leg' => '⋚', - 'leq' => '≤', - 'leqq' => '≦', - 'leqslant' => '⩽', - 'les' => '⩽', - 'lescc' => '⪨', - 'lesdot' => 'â©¿', - 'lesdoto' => 'âª', - 'lesdotor' => '⪃', - 'lesg' => '⋚︀', - 'lesges' => '⪓', - 'lessapprox' => '⪅', - 'lessdot' => 'â‹–', - 'lesseqgtr' => '⋚', - 'lesseqqgtr' => '⪋', - 'LessEqualGreater' => '⋚', - 'LessFullEqual' => '≦', - 'LessGreater' => '≶', - 'lessgtr' => '≶', - 'LessLess' => '⪡', - 'lesssim' => '≲', - 'LessSlantEqual' => '⩽', - 'LessTilde' => '≲', - 'lfisht' => '⥼', - 'lfloor' => '⌊', - 'Lfr' => 'ð”', - 'lfr' => 'ð”©', - 'lg' => '≶', - 'lgE' => '⪑', - 'lHar' => '⥢', - 'lhard' => '↽', - 'lharu' => '↼', - 'lharul' => '⥪', - 'lhblk' => 'â–„', - 'LJcy' => 'Љ', - 'ljcy' => 'Ñ™', - 'Ll' => '⋘', - 'll' => '≪', - 'llarr' => '⇇', - 'llcorner' => '⌞', - 'Lleftarrow' => '⇚', - 'llhard' => '⥫', - 'lltri' => 'â—º', - 'Lmidot' => 'Ä¿', - 'lmidot' => 'Å€', - 'lmoust' => '⎰', - 'lmoustache' => '⎰', - 'lnap' => '⪉', - 'lnapprox' => '⪉', - 'lnE' => '≨', - 'lne' => '⪇', - 'lneq' => '⪇', - 'lneqq' => '≨', - 'lnsim' => '⋦', - 'loang' => '⟬', - 'loarr' => '⇽', - 'lobrk' => '⟦', - 'LongLeftArrow' => '⟵', - 'Longleftarrow' => '⟸', - 'longleftarrow' => '⟵', - 'LongLeftRightArrow' => '⟷', - 'Longleftrightarrow' => '⟺', - 'longleftrightarrow' => '⟷', - 'longmapsto' => '⟼', - 'LongRightArrow' => '⟶', - 'Longrightarrow' => '⟹', - 'longrightarrow' => '⟶', - 'looparrowleft' => '↫', - 'looparrowright' => '↬', - 'lopar' => '⦅', - 'Lopf' => 'ð•ƒ', - 'lopf' => 'ð•', - 'loplus' => '⨭', - 'lotimes' => '⨴', - 'lowast' => '∗', - 'lowbar' => '_', - 'LowerLeftArrow' => '↙', - 'LowerRightArrow' => '↘', - 'loz' => 'â—Š', - 'lozenge' => 'â—Š', - 'lozf' => 'â§«', - 'lpar' => '(', - 'lparlt' => '⦓', - 'lrarr' => '⇆', - 'lrcorner' => '⌟', - 'lrhar' => '⇋', - 'lrhard' => '⥭', - 'lrm' => '‎', - 'lrtri' => '⊿', - 'lsaquo' => '‹', - 'Lscr' => 'â„’', - 'lscr' => 'ð“', - 'Lsh' => '↰', - 'lsh' => '↰', - 'lsim' => '≲', - 'lsime' => 'âª', - 'lsimg' => 'âª', - 'lsqb' => '[', - 'lsquo' => '‘', - 'lsquor' => '‚', - 'Lstrok' => 'Å', - 'lstrok' => 'Å‚', - 'LT' => '<', - 'L' => '<', - 'Lt' => '≪', - 'lt' => '<', - 'l' => '<', - 'ltcc' => '⪦', - 'ltcir' => '⩹', - 'ltdot' => 'â‹–', - 'lthree' => 'â‹‹', - 'ltimes' => '⋉', - 'ltlarr' => '⥶', - 'ltquest' => 'â©»', - 'ltri' => 'â—ƒ', - 'ltrie' => '⊴', - 'ltrif' => 'â—‚', - 'ltrPar' => '⦖', - 'lurdshar' => '⥊', - 'luruhar' => '⥦', - 'lvertneqq' => '≨︀', - 'lvnE' => '≨︀', - 'macr' => '¯', - 'mac' => '¯', - 'male' => '♂', - 'malt' => '✠', - 'maltese' => '✠', - 'Map' => '⤅', - 'map' => '↦', - 'mapsto' => '↦', - 'mapstodown' => '↧', - 'mapstoleft' => '↤', - 'mapstoup' => '↥', - 'marker' => 'â–®', - 'mcomma' => '⨩', - 'Mcy' => 'М', - 'mcy' => 'м', - 'mdash' => '—', - 'mDDot' => '∺', - 'measuredangle' => '∡', - 'MediumSpace' => 'âŸ', - 'Mellintrf' => 'ℳ', - 'Mfr' => 'ð”', - 'mfr' => 'ð”ª', - 'mho' => 'â„§', - 'micro' => 'µ', - 'micr' => 'µ', - 'mid' => '∣', - 'midast' => '*', - 'midcir' => 'â«°', - 'middot' => '·', - 'middo' => '·', - 'minus' => '−', - 'minusb' => '⊟', - 'minusd' => '∸', - 'minusdu' => '⨪', - 'MinusPlus' => '∓', - 'mlcp' => 'â«›', - 'mldr' => '…', - 'mnplus' => '∓', - 'models' => '⊧', - 'Mopf' => 'ð•„', - 'mopf' => 'ð•ž', - 'mp' => '∓', - 'Mscr' => 'ℳ', - 'mscr' => 'ð“‚', - 'mstpos' => '∾', - 'Mu' => 'Μ', - 'mu' => 'μ', - 'multimap' => '⊸', - 'mumap' => '⊸', - 'nabla' => '∇', - 'Nacute' => 'Ń', - 'nacute' => 'Å„', - 'nang' => '∠⃒', - 'nap' => '≉', - 'napE' => '⩰̸', - 'napid' => '≋̸', - 'napos' => 'ʼn', - 'napprox' => '≉', - 'natur' => 'â™®', - 'natural' => 'â™®', - 'naturals' => 'â„•', - 'nbsp' => ' ', - 'nbs' => ' ', - 'nbump' => '≎̸', - 'nbumpe' => 'â‰Ì¸', - 'ncap' => '⩃', - 'Ncaron' => 'Ň', - 'ncaron' => 'ň', - 'Ncedil' => 'Å…', - 'ncedil' => 'ņ', - 'ncong' => '≇', - 'ncongdot' => '⩭̸', - 'ncup' => 'â©‚', - 'Ncy' => 'Ð', - 'ncy' => 'н', - 'ndash' => '–', - 'ne' => '≠', - 'nearhk' => '⤤', - 'neArr' => '⇗', - 'nearr' => '↗', - 'nearrow' => '↗', - 'nedot' => 'â‰Ì¸', - 'NegativeMediumSpace' => '​', - 'NegativeThickSpace' => '​', - 'NegativeThinSpace' => '​', - 'NegativeVeryThinSpace' => '​', - 'nequiv' => '≢', - 'nesear' => '⤨', - 'nesim' => '≂̸', - 'NestedGreaterGreater' => '≫', - 'NestedLessLess' => '≪', - 'NewLine' => ' -', - 'nexist' => '∄', - 'nexists' => '∄', - 'Nfr' => 'ð”‘', - 'nfr' => 'ð”«', - 'ngE' => '≧̸', - 'nge' => '≱', - 'ngeq' => '≱', - 'ngeqq' => '≧̸', - 'ngeqslant' => '⩾̸', - 'nges' => '⩾̸', - 'nGg' => '⋙̸', - 'ngsim' => '≵', - 'nGt' => '≫⃒', - 'ngt' => '≯', - 'ngtr' => '≯', - 'nGtv' => '≫̸', - 'nhArr' => '⇎', - 'nharr' => '↮', - 'nhpar' => '⫲', - 'ni' => '∋', - 'nis' => '⋼', - 'nisd' => '⋺', - 'niv' => '∋', - 'NJcy' => 'Њ', - 'njcy' => 'Ñš', - 'nlArr' => 'â‡', - 'nlarr' => '↚', - 'nldr' => '‥', - 'nlE' => '≦̸', - 'nle' => '≰', - 'nLeftarrow' => 'â‡', - 'nleftarrow' => '↚', - 'nLeftrightarrow' => '⇎', - 'nleftrightarrow' => '↮', - 'nleq' => '≰', - 'nleqq' => '≦̸', - 'nleqslant' => '⩽̸', - 'nles' => '⩽̸', - 'nless' => '≮', - 'nLl' => '⋘̸', - 'nlsim' => '≴', - 'nLt' => '≪⃒', - 'nlt' => '≮', - 'nltri' => '⋪', - 'nltrie' => '⋬', - 'nLtv' => '≪̸', - 'nmid' => '∤', - 'NoBreak' => 'â ', - 'NonBreakingSpace' => ' ', - 'Nopf' => 'â„•', - 'nopf' => 'ð•Ÿ', - 'Not' => '⫬', - 'not' => '¬', - 'no' => '¬', - 'NotCongruent' => '≢', - 'NotCupCap' => '≭', - 'NotDoubleVerticalBar' => '∦', - 'NotElement' => '∉', - 'NotEqual' => '≠', - 'NotEqualTilde' => '≂̸', - 'NotExists' => '∄', - 'NotGreater' => '≯', - 'NotGreaterEqual' => '≱', - 'NotGreaterFullEqual' => '≧̸', - 'NotGreaterGreater' => '≫̸', - 'NotGreaterLess' => '≹', - 'NotGreaterSlantEqual' => '⩾̸', - 'NotGreaterTilde' => '≵', - 'NotHumpDownHump' => '≎̸', - 'NotHumpEqual' => 'â‰Ì¸', - 'notin' => '∉', - 'notindot' => '⋵̸', - 'notinE' => '⋹̸', - 'notinva' => '∉', - 'notinvb' => 'â‹·', - 'notinvc' => 'â‹¶', - 'NotLeftTriangle' => '⋪', - 'NotLeftTriangleBar' => 'â§Ì¸', - 'NotLeftTriangleEqual' => '⋬', - 'NotLess' => '≮', - 'NotLessEqual' => '≰', - 'NotLessGreater' => '≸', - 'NotLessLess' => '≪̸', - 'NotLessSlantEqual' => '⩽̸', - 'NotLessTilde' => '≴', - 'NotNestedGreaterGreater' => '⪢̸', - 'NotNestedLessLess' => '⪡̸', - 'notni' => '∌', - 'notniva' => '∌', - 'notnivb' => '⋾', - 'notnivc' => '⋽', - 'NotPrecedes' => '⊀', - 'NotPrecedesEqual' => '⪯̸', - 'NotPrecedesSlantEqual' => 'â‹ ', - 'NotReverseElement' => '∌', - 'NotRightTriangle' => 'â‹«', - 'NotRightTriangleBar' => 'â§Ì¸', - 'NotRightTriangleEqual' => 'â‹­', - 'NotSquareSubset' => 'âŠÌ¸', - 'NotSquareSubsetEqual' => 'â‹¢', - 'NotSquareSuperset' => 'âŠÌ¸', - 'NotSquareSupersetEqual' => 'â‹£', - 'NotSubset' => '⊂⃒', - 'NotSubsetEqual' => '⊈', - 'NotSucceeds' => 'âŠ', - 'NotSucceedsEqual' => '⪰̸', - 'NotSucceedsSlantEqual' => 'â‹¡', - 'NotSucceedsTilde' => '≿̸', - 'NotSuperset' => '⊃⃒', - 'NotSupersetEqual' => '⊉', - 'NotTilde' => 'â‰', - 'NotTildeEqual' => '≄', - 'NotTildeFullEqual' => '≇', - 'NotTildeTilde' => '≉', - 'NotVerticalBar' => '∤', - 'npar' => '∦', - 'nparallel' => '∦', - 'nparsl' => '⫽⃥', - 'npart' => '∂̸', - 'npolint' => '⨔', - 'npr' => '⊀', - 'nprcue' => 'â‹ ', - 'npre' => '⪯̸', - 'nprec' => '⊀', - 'npreceq' => '⪯̸', - 'nrArr' => 'â‡', - 'nrarr' => '↛', - 'nrarrc' => '⤳̸', - 'nrarrw' => 'â†Ì¸', - 'nRightarrow' => 'â‡', - 'nrightarrow' => '↛', - 'nrtri' => 'â‹«', - 'nrtrie' => 'â‹­', - 'nsc' => 'âŠ', - 'nsccue' => 'â‹¡', - 'nsce' => '⪰̸', - 'Nscr' => 'ð’©', - 'nscr' => 'ð“ƒ', - 'nshortmid' => '∤', - 'nshortparallel' => '∦', - 'nsim' => 'â‰', - 'nsime' => '≄', - 'nsimeq' => '≄', - 'nsmid' => '∤', - 'nspar' => '∦', - 'nsqsube' => 'â‹¢', - 'nsqsupe' => 'â‹£', - 'nsub' => '⊄', - 'nsubE' => '⫅̸', - 'nsube' => '⊈', - 'nsubset' => '⊂⃒', - 'nsubseteq' => '⊈', - 'nsubseteqq' => '⫅̸', - 'nsucc' => 'âŠ', - 'nsucceq' => '⪰̸', - 'nsup' => '⊅', - 'nsupE' => '⫆̸', - 'nsupe' => '⊉', - 'nsupset' => '⊃⃒', - 'nsupseteq' => '⊉', - 'nsupseteqq' => '⫆̸', - 'ntgl' => '≹', - 'Ntilde' => 'Ñ', - 'Ntild' => 'Ñ', - 'ntilde' => 'ñ', - 'ntild' => 'ñ', - 'ntlg' => '≸', - 'ntriangleleft' => '⋪', - 'ntrianglelefteq' => '⋬', - 'ntriangleright' => 'â‹«', - 'ntrianglerighteq' => 'â‹­', - 'Nu' => 'Î', - 'nu' => 'ν', - 'num' => '#', - 'numero' => 'â„–', - 'numsp' => ' ', - 'nvap' => 'â‰âƒ’', - 'nVDash' => '⊯', - 'nVdash' => '⊮', - 'nvDash' => '⊭', - 'nvdash' => '⊬', - 'nvge' => '≥⃒', - 'nvgt' => '>⃒', - 'nvHarr' => '⤄', - 'nvinfin' => 'â§ž', - 'nvlArr' => '⤂', - 'nvle' => '≤⃒', - 'nvlt' => '<⃒', - 'nvltrie' => '⊴⃒', - 'nvrArr' => '⤃', - 'nvrtrie' => '⊵⃒', - 'nvsim' => '∼⃒', - 'nwarhk' => '⤣', - 'nwArr' => '⇖', - 'nwarr' => '↖', - 'nwarrow' => '↖', - 'nwnear' => '⤧', - 'Oacute' => 'Ó', - 'Oacut' => 'Ó', - 'oacute' => 'ó', - 'oacut' => 'ó', - 'oast' => '⊛', - 'ocir' => 'ô', - 'Ocirc' => 'Ô', - 'Ocir' => 'Ô', - 'ocirc' => 'ô', - 'Ocy' => 'О', - 'ocy' => 'о', - 'odash' => 'âŠ', - 'Odblac' => 'Å', - 'odblac' => 'Å‘', - 'odiv' => '⨸', - 'odot' => '⊙', - 'odsold' => '⦼', - 'OElig' => 'Å’', - 'oelig' => 'Å“', - 'ofcir' => '⦿', - 'Ofr' => 'ð”’', - 'ofr' => 'ð”¬', - 'ogon' => 'Ë›', - 'Ograve' => 'Ã’', - 'Ograv' => 'Ã’', - 'ograve' => 'ò', - 'ograv' => 'ò', - 'ogt' => 'â§', - 'ohbar' => '⦵', - 'ohm' => 'Ω', - 'oint' => '∮', - 'olarr' => '↺', - 'olcir' => '⦾', - 'olcross' => '⦻', - 'oline' => '‾', - 'olt' => 'â§€', - 'Omacr' => 'ÅŒ', - 'omacr' => 'Å', - 'Omega' => 'Ω', - 'omega' => 'ω', - 'Omicron' => 'Ο', - 'omicron' => 'ο', - 'omid' => '⦶', - 'ominus' => '⊖', - 'Oopf' => 'ð•†', - 'oopf' => 'ð• ', - 'opar' => '⦷', - 'OpenCurlyDoubleQuote' => '“', - 'OpenCurlyQuote' => '‘', - 'operp' => '⦹', - 'oplus' => '⊕', - 'Or' => 'â©”', - 'or' => '∨', - 'orarr' => '↻', - 'ord' => 'º', - 'order' => 'â„´', - 'orderof' => 'â„´', - 'ordf' => 'ª', - 'ordm' => 'º', - 'origof' => '⊶', - 'oror' => 'â©–', - 'orslope' => 'â©—', - 'orv' => 'â©›', - 'oS' => 'Ⓢ', - 'Oscr' => 'ð’ª', - 'oscr' => 'â„´', - 'Oslash' => 'Ø', - 'Oslas' => 'Ø', - 'oslash' => 'ø', - 'oslas' => 'ø', - 'osol' => '⊘', - 'Otilde' => 'Õ', - 'Otild' => 'Õ', - 'otilde' => 'õ', - 'otild' => 'õ', - 'Otimes' => '⨷', - 'otimes' => '⊗', - 'otimesas' => '⨶', - 'Ouml' => 'Ö', - 'Oum' => 'Ö', - 'ouml' => 'ö', - 'oum' => 'ö', - 'ovbar' => '⌽', - 'OverBar' => '‾', - 'OverBrace' => 'âž', - 'OverBracket' => '⎴', - 'OverParenthesis' => 'âœ', - 'par' => '¶', - 'para' => '¶', - 'parallel' => '∥', - 'parsim' => '⫳', - 'parsl' => '⫽', - 'part' => '∂', - 'PartialD' => '∂', - 'Pcy' => 'П', - 'pcy' => 'п', - 'percnt' => '%', - 'period' => '.', - 'permil' => '‰', - 'perp' => '⊥', - 'pertenk' => '‱', - 'Pfr' => 'ð”“', - 'pfr' => 'ð”­', - 'Phi' => 'Φ', - 'phi' => 'φ', - 'phiv' => 'Ï•', - 'phmmat' => 'ℳ', - 'phone' => '☎', - 'Pi' => 'Π', - 'pi' => 'Ï€', - 'pitchfork' => 'â‹”', - 'piv' => 'Ï–', - 'planck' => 'â„', - 'planckh' => 'ℎ', - 'plankv' => 'â„', - 'plus' => '+', - 'plusacir' => '⨣', - 'plusb' => '⊞', - 'pluscir' => '⨢', - 'plusdo' => '∔', - 'plusdu' => '⨥', - 'pluse' => '⩲', - 'PlusMinus' => '±', - 'plusmn' => '±', - 'plusm' => '±', - 'plussim' => '⨦', - 'plustwo' => '⨧', - 'pm' => '±', - 'Poincareplane' => 'ℌ', - 'pointint' => '⨕', - 'Popf' => 'â„™', - 'popf' => 'ð•¡', - 'pound' => '£', - 'poun' => '£', - 'Pr' => '⪻', - 'pr' => '≺', - 'prap' => '⪷', - 'prcue' => '≼', - 'prE' => '⪳', - 'pre' => '⪯', - 'prec' => '≺', - 'precapprox' => '⪷', - 'preccurlyeq' => '≼', - 'Precedes' => '≺', - 'PrecedesEqual' => '⪯', - 'PrecedesSlantEqual' => '≼', - 'PrecedesTilde' => '≾', - 'preceq' => '⪯', - 'precnapprox' => '⪹', - 'precneqq' => '⪵', - 'precnsim' => '⋨', - 'precsim' => '≾', - 'Prime' => '″', - 'prime' => '′', - 'primes' => 'â„™', - 'prnap' => '⪹', - 'prnE' => '⪵', - 'prnsim' => '⋨', - 'prod' => 'âˆ', - 'Product' => 'âˆ', - 'profalar' => '⌮', - 'profline' => '⌒', - 'profsurf' => '⌓', - 'prop' => 'âˆ', - 'Proportion' => '∷', - 'Proportional' => 'âˆ', - 'propto' => 'âˆ', - 'prsim' => '≾', - 'prurel' => '⊰', - 'Pscr' => 'ð’«', - 'pscr' => 'ð“…', - 'Psi' => 'Ψ', - 'psi' => 'ψ', - 'puncsp' => ' ', - 'Qfr' => 'ð””', - 'qfr' => 'ð”®', - 'qint' => '⨌', - 'Qopf' => 'ℚ', - 'qopf' => 'ð•¢', - 'qprime' => 'â—', - 'Qscr' => 'ð’¬', - 'qscr' => 'ð“†', - 'quaternions' => 'â„', - 'quatint' => '⨖', - 'quest' => '?', - 'questeq' => '≟', - 'QUOT' => '"', - 'QUO' => '"', - 'quot' => '"', - 'quo' => '"', - 'rAarr' => '⇛', - 'race' => '∽̱', - 'Racute' => 'Å”', - 'racute' => 'Å•', - 'radic' => '√', - 'raemptyv' => '⦳', - 'Rang' => '⟫', - 'rang' => '⟩', - 'rangd' => '⦒', - 'range' => '⦥', - 'rangle' => '⟩', - 'raquo' => '»', - 'raqu' => '»', - 'Rarr' => '↠', - 'rArr' => '⇒', - 'rarr' => '→', - 'rarrap' => '⥵', - 'rarrb' => '⇥', - 'rarrbfs' => '⤠', - 'rarrc' => '⤳', - 'rarrfs' => '⤞', - 'rarrhk' => '↪', - 'rarrlp' => '↬', - 'rarrpl' => '⥅', - 'rarrsim' => '⥴', - 'Rarrtl' => '⤖', - 'rarrtl' => '↣', - 'rarrw' => 'â†', - 'rAtail' => '⤜', - 'ratail' => '⤚', - 'ratio' => '∶', - 'rationals' => 'ℚ', - 'RBarr' => 'â¤', - 'rBarr' => 'â¤', - 'rbarr' => 'â¤', - 'rbbrk' => 'â³', - 'rbrace' => '}', - 'rbrack' => ']', - 'rbrke' => '⦌', - 'rbrksld' => '⦎', - 'rbrkslu' => 'â¦', - 'Rcaron' => 'Ř', - 'rcaron' => 'Å™', - 'Rcedil' => 'Å–', - 'rcedil' => 'Å—', - 'rceil' => '⌉', - 'rcub' => '}', - 'Rcy' => 'Р', - 'rcy' => 'Ñ€', - 'rdca' => '⤷', - 'rdldhar' => '⥩', - 'rdquo' => 'â€', - 'rdquor' => 'â€', - 'rdsh' => '↳', - 'Re' => 'ℜ', - 'real' => 'ℜ', - 'realine' => 'â„›', - 'realpart' => 'ℜ', - 'reals' => 'â„', - 'rect' => 'â–­', - 'REG' => '®', - 'RE' => '®', - 'reg' => '®', - 're' => '®', - 'ReverseElement' => '∋', - 'ReverseEquilibrium' => '⇋', - 'ReverseUpEquilibrium' => '⥯', - 'rfisht' => '⥽', - 'rfloor' => '⌋', - 'Rfr' => 'ℜ', - 'rfr' => 'ð”¯', - 'rHar' => '⥤', - 'rhard' => 'â‡', - 'rharu' => '⇀', - 'rharul' => '⥬', - 'Rho' => 'Ρ', - 'rho' => 'Ï', - 'rhov' => 'ϱ', - 'RightAngleBracket' => '⟩', - 'RightArrow' => '→', - 'Rightarrow' => '⇒', - 'rightarrow' => '→', - 'RightArrowBar' => '⇥', - 'RightArrowLeftArrow' => '⇄', - 'rightarrowtail' => '↣', - 'RightCeiling' => '⌉', - 'RightDoubleBracket' => '⟧', - 'RightDownTeeVector' => 'â¥', - 'RightDownVector' => '⇂', - 'RightDownVectorBar' => '⥕', - 'RightFloor' => '⌋', - 'rightharpoondown' => 'â‡', - 'rightharpoonup' => '⇀', - 'rightleftarrows' => '⇄', - 'rightleftharpoons' => '⇌', - 'rightrightarrows' => '⇉', - 'rightsquigarrow' => 'â†', - 'RightTee' => '⊢', - 'RightTeeArrow' => '↦', - 'RightTeeVector' => '⥛', - 'rightthreetimes' => '⋌', - 'RightTriangle' => '⊳', - 'RightTriangleBar' => 'â§', - 'RightTriangleEqual' => '⊵', - 'RightUpDownVector' => 'â¥', - 'RightUpTeeVector' => '⥜', - 'RightUpVector' => '↾', - 'RightUpVectorBar' => '⥔', - 'RightVector' => '⇀', - 'RightVectorBar' => '⥓', - 'ring' => 'Ëš', - 'risingdotseq' => '≓', - 'rlarr' => '⇄', - 'rlhar' => '⇌', - 'rlm' => 'â€', - 'rmoust' => '⎱', - 'rmoustache' => '⎱', - 'rnmid' => 'â«®', - 'roang' => '⟭', - 'roarr' => '⇾', - 'robrk' => '⟧', - 'ropar' => '⦆', - 'Ropf' => 'â„', - 'ropf' => 'ð•£', - 'roplus' => '⨮', - 'rotimes' => '⨵', - 'RoundImplies' => '⥰', - 'rpar' => ')', - 'rpargt' => '⦔', - 'rppolint' => '⨒', - 'rrarr' => '⇉', - 'Rrightarrow' => '⇛', - 'rsaquo' => '›', - 'Rscr' => 'â„›', - 'rscr' => 'ð“‡', - 'Rsh' => '↱', - 'rsh' => '↱', - 'rsqb' => ']', - 'rsquo' => '’', - 'rsquor' => '’', - 'rthree' => '⋌', - 'rtimes' => '⋊', - 'rtri' => 'â–¹', - 'rtrie' => '⊵', - 'rtrif' => 'â–¸', - 'rtriltri' => 'â§Ž', - 'RuleDelayed' => 'â§´', - 'ruluhar' => '⥨', - 'rx' => '℞', - 'Sacute' => 'Åš', - 'sacute' => 'Å›', - 'sbquo' => '‚', - 'Sc' => '⪼', - 'sc' => '≻', - 'scap' => '⪸', - 'Scaron' => 'Å ', - 'scaron' => 'Å¡', - 'sccue' => '≽', - 'scE' => '⪴', - 'sce' => '⪰', - 'Scedil' => 'Åž', - 'scedil' => 'ÅŸ', - 'Scirc' => 'Åœ', - 'scirc' => 'Å', - 'scnap' => '⪺', - 'scnE' => '⪶', - 'scnsim' => 'â‹©', - 'scpolint' => '⨓', - 'scsim' => '≿', - 'Scy' => 'С', - 'scy' => 'Ñ', - 'sdot' => 'â‹…', - 'sdotb' => '⊡', - 'sdote' => '⩦', - 'searhk' => '⤥', - 'seArr' => '⇘', - 'searr' => '↘', - 'searrow' => '↘', - 'sect' => '§', - 'sec' => '§', - 'semi' => ';', - 'seswar' => '⤩', - 'setminus' => '∖', - 'setmn' => '∖', - 'sext' => '✶', - 'Sfr' => 'ð”–', - 'sfr' => 'ð”°', - 'sfrown' => '⌢', - 'sharp' => '♯', - 'SHCHcy' => 'Щ', - 'shchcy' => 'щ', - 'SHcy' => 'Ш', - 'shcy' => 'ш', - 'ShortDownArrow' => '↓', - 'ShortLeftArrow' => 'â†', - 'shortmid' => '∣', - 'shortparallel' => '∥', - 'ShortRightArrow' => '→', - 'ShortUpArrow' => '↑', - 'shy' => '­', - 'sh' => '­', - 'Sigma' => 'Σ', - 'sigma' => 'σ', - 'sigmaf' => 'Ï‚', - 'sigmav' => 'Ï‚', - 'sim' => '∼', - 'simdot' => '⩪', - 'sime' => '≃', - 'simeq' => '≃', - 'simg' => '⪞', - 'simgE' => '⪠', - 'siml' => 'âª', - 'simlE' => '⪟', - 'simne' => '≆', - 'simplus' => '⨤', - 'simrarr' => '⥲', - 'slarr' => 'â†', - 'SmallCircle' => '∘', - 'smallsetminus' => '∖', - 'smashp' => '⨳', - 'smeparsl' => '⧤', - 'smid' => '∣', - 'smile' => '⌣', - 'smt' => '⪪', - 'smte' => '⪬', - 'smtes' => '⪬︀', - 'SOFTcy' => 'Ь', - 'softcy' => 'ÑŒ', - 'sol' => '/', - 'solb' => 'â§„', - 'solbar' => '⌿', - 'Sopf' => 'ð•Š', - 'sopf' => 'ð•¤', - 'spades' => 'â™ ', - 'spadesuit' => 'â™ ', - 'spar' => '∥', - 'sqcap' => '⊓', - 'sqcaps' => '⊓︀', - 'sqcup' => '⊔', - 'sqcups' => '⊔︀', - 'Sqrt' => '√', - 'sqsub' => 'âŠ', - 'sqsube' => '⊑', - 'sqsubset' => 'âŠ', - 'sqsubseteq' => '⊑', - 'sqsup' => 'âŠ', - 'sqsupe' => '⊒', - 'sqsupset' => 'âŠ', - 'sqsupseteq' => '⊒', - 'squ' => 'â–¡', - 'Square' => 'â–¡', - 'square' => 'â–¡', - 'SquareIntersection' => '⊓', - 'SquareSubset' => 'âŠ', - 'SquareSubsetEqual' => '⊑', - 'SquareSuperset' => 'âŠ', - 'SquareSupersetEqual' => '⊒', - 'SquareUnion' => '⊔', - 'squarf' => 'â–ª', - 'squf' => 'â–ª', - 'srarr' => '→', - 'Sscr' => 'ð’®', - 'sscr' => 'ð“ˆ', - 'ssetmn' => '∖', - 'ssmile' => '⌣', - 'sstarf' => '⋆', - 'Star' => '⋆', - 'star' => '☆', - 'starf' => '★', - 'straightepsilon' => 'ϵ', - 'straightphi' => 'Ï•', - 'strns' => '¯', - 'Sub' => 'â‹', - 'sub' => '⊂', - 'subdot' => '⪽', - 'subE' => 'â«…', - 'sube' => '⊆', - 'subedot' => '⫃', - 'submult' => 'â«', - 'subnE' => 'â«‹', - 'subne' => '⊊', - 'subplus' => '⪿', - 'subrarr' => '⥹', - 'Subset' => 'â‹', - 'subset' => '⊂', - 'subseteq' => '⊆', - 'subseteqq' => 'â«…', - 'SubsetEqual' => '⊆', - 'subsetneq' => '⊊', - 'subsetneqq' => 'â«‹', - 'subsim' => '⫇', - 'subsub' => 'â«•', - 'subsup' => 'â«“', - 'succ' => '≻', - 'succapprox' => '⪸', - 'succcurlyeq' => '≽', - 'Succeeds' => '≻', - 'SucceedsEqual' => '⪰', - 'SucceedsSlantEqual' => '≽', - 'SucceedsTilde' => '≿', - 'succeq' => '⪰', - 'succnapprox' => '⪺', - 'succneqq' => '⪶', - 'succnsim' => 'â‹©', - 'succsim' => '≿', - 'SuchThat' => '∋', - 'Sum' => '∑', - 'sum' => '∑', - 'sung' => '♪', - 'Sup' => 'â‹‘', - 'sup' => '³', - 'sup1' => '¹', - 'sup2' => '²', - 'sup3' => '³', - 'supdot' => '⪾', - 'supdsub' => '⫘', - 'supE' => '⫆', - 'supe' => '⊇', - 'supedot' => 'â«„', - 'Superset' => '⊃', - 'SupersetEqual' => '⊇', - 'suphsol' => '⟉', - 'suphsub' => 'â«—', - 'suplarr' => '⥻', - 'supmult' => 'â«‚', - 'supnE' => '⫌', - 'supne' => '⊋', - 'supplus' => 'â«€', - 'Supset' => 'â‹‘', - 'supset' => '⊃', - 'supseteq' => '⊇', - 'supseteqq' => '⫆', - 'supsetneq' => '⊋', - 'supsetneqq' => '⫌', - 'supsim' => '⫈', - 'supsub' => 'â«”', - 'supsup' => 'â«–', - 'swarhk' => '⤦', - 'swArr' => '⇙', - 'swarr' => '↙', - 'swarrow' => '↙', - 'swnwar' => '⤪', - 'szlig' => 'ß', - 'szli' => 'ß', - 'Tab' => ' ', - 'target' => '⌖', - 'Tau' => 'Τ', - 'tau' => 'Ï„', - 'tbrk' => '⎴', - 'Tcaron' => 'Ť', - 'tcaron' => 'Å¥', - 'Tcedil' => 'Å¢', - 'tcedil' => 'Å£', - 'Tcy' => 'Т', - 'tcy' => 'Ñ‚', - 'tdot' => '⃛', - 'telrec' => '⌕', - 'Tfr' => 'ð”—', - 'tfr' => 'ð”±', - 'there4' => '∴', - 'Therefore' => '∴', - 'therefore' => '∴', - 'Theta' => 'Θ', - 'theta' => 'θ', - 'thetasym' => 'Ï‘', - 'thetav' => 'Ï‘', - 'thickapprox' => '≈', - 'thicksim' => '∼', - 'ThickSpace' => 'âŸâ€Š', - 'thinsp' => ' ', - 'ThinSpace' => ' ', - 'thkap' => '≈', - 'thksim' => '∼', - 'THORN' => 'Þ', - 'THOR' => 'Þ', - 'thorn' => 'þ', - 'thor' => 'þ', - 'Tilde' => '∼', - 'tilde' => 'Ëœ', - 'TildeEqual' => '≃', - 'TildeFullEqual' => '≅', - 'TildeTilde' => '≈', - 'times' => '×', - 'time' => '×', - 'timesb' => '⊠', - 'timesbar' => '⨱', - 'timesd' => '⨰', - 'tint' => '∭', - 'toea' => '⤨', - 'top' => '⊤', - 'topbot' => '⌶', - 'topcir' => '⫱', - 'Topf' => 'ð•‹', - 'topf' => 'ð•¥', - 'topfork' => '⫚', - 'tosa' => '⤩', - 'tprime' => '‴', - 'TRADE' => 'â„¢', - 'trade' => 'â„¢', - 'triangle' => 'â–µ', - 'triangledown' => 'â–¿', - 'triangleleft' => 'â—ƒ', - 'trianglelefteq' => '⊴', - 'triangleq' => '≜', - 'triangleright' => 'â–¹', - 'trianglerighteq' => '⊵', - 'tridot' => 'â—¬', - 'trie' => '≜', - 'triminus' => '⨺', - 'TripleDot' => '⃛', - 'triplus' => '⨹', - 'trisb' => 'â§', - 'tritime' => '⨻', - 'trpezium' => 'â¢', - 'Tscr' => 'ð’¯', - 'tscr' => 'ð“‰', - 'TScy' => 'Ц', - 'tscy' => 'ц', - 'TSHcy' => 'Ћ', - 'tshcy' => 'Ñ›', - 'Tstrok' => 'Ŧ', - 'tstrok' => 'ŧ', - 'twixt' => '≬', - 'twoheadleftarrow' => '↞', - 'twoheadrightarrow' => '↠', - 'Uacute' => 'Ú', - 'Uacut' => 'Ú', - 'uacute' => 'ú', - 'uacut' => 'ú', - 'Uarr' => '↟', - 'uArr' => '⇑', - 'uarr' => '↑', - 'Uarrocir' => '⥉', - 'Ubrcy' => 'ÐŽ', - 'ubrcy' => 'Ñž', - 'Ubreve' => 'Ŭ', - 'ubreve' => 'Å­', - 'Ucirc' => 'Û', - 'Ucir' => 'Û', - 'ucirc' => 'û', - 'ucir' => 'û', - 'Ucy' => 'У', - 'ucy' => 'у', - 'udarr' => '⇅', - 'Udblac' => 'Ű', - 'udblac' => 'ű', - 'udhar' => '⥮', - 'ufisht' => '⥾', - 'Ufr' => 'ð”˜', - 'ufr' => 'ð”²', - 'Ugrave' => 'Ù', - 'Ugrav' => 'Ù', - 'ugrave' => 'ù', - 'ugrav' => 'ù', - 'uHar' => '⥣', - 'uharl' => '↿', - 'uharr' => '↾', - 'uhblk' => 'â–€', - 'ulcorn' => '⌜', - 'ulcorner' => '⌜', - 'ulcrop' => 'âŒ', - 'ultri' => 'â—¸', - 'Umacr' => 'Ū', - 'umacr' => 'Å«', - 'uml' => '¨', - 'um' => '¨', - 'UnderBar' => '_', - 'UnderBrace' => 'âŸ', - 'UnderBracket' => '⎵', - 'UnderParenthesis' => 'â', - 'Union' => '⋃', - 'UnionPlus' => '⊎', - 'Uogon' => 'Ų', - 'uogon' => 'ų', - 'Uopf' => 'ð•Œ', - 'uopf' => 'ð•¦', - 'UpArrow' => '↑', - 'Uparrow' => '⇑', - 'uparrow' => '↑', - 'UpArrowBar' => '⤒', - 'UpArrowDownArrow' => '⇅', - 'UpDownArrow' => '↕', - 'Updownarrow' => '⇕', - 'updownarrow' => '↕', - 'UpEquilibrium' => '⥮', - 'upharpoonleft' => '↿', - 'upharpoonright' => '↾', - 'uplus' => '⊎', - 'UpperLeftArrow' => '↖', - 'UpperRightArrow' => '↗', - 'Upsi' => 'Ï’', - 'upsi' => 'Ï…', - 'upsih' => 'Ï’', - 'Upsilon' => 'Î¥', - 'upsilon' => 'Ï…', - 'UpTee' => '⊥', - 'UpTeeArrow' => '↥', - 'upuparrows' => '⇈', - 'urcorn' => 'âŒ', - 'urcorner' => 'âŒ', - 'urcrop' => '⌎', - 'Uring' => 'Å®', - 'uring' => 'ů', - 'urtri' => 'â—¹', - 'Uscr' => 'ð’°', - 'uscr' => 'ð“Š', - 'utdot' => 'â‹°', - 'Utilde' => 'Ũ', - 'utilde' => 'Å©', - 'utri' => 'â–µ', - 'utrif' => 'â–´', - 'uuarr' => '⇈', - 'Uuml' => 'Ü', - 'Uum' => 'Ü', - 'uuml' => 'ü', - 'uum' => 'ü', - 'uwangle' => '⦧', - 'vangrt' => '⦜', - 'varepsilon' => 'ϵ', - 'varkappa' => 'ϰ', - 'varnothing' => '∅', - 'varphi' => 'Ï•', - 'varpi' => 'Ï–', - 'varpropto' => 'âˆ', - 'vArr' => '⇕', - 'varr' => '↕', - 'varrho' => 'ϱ', - 'varsigma' => 'Ï‚', - 'varsubsetneq' => '⊊︀', - 'varsubsetneqq' => '⫋︀', - 'varsupsetneq' => '⊋︀', - 'varsupsetneqq' => '⫌︀', - 'vartheta' => 'Ï‘', - 'vartriangleleft' => '⊲', - 'vartriangleright' => '⊳', - 'Vbar' => 'â««', - 'vBar' => '⫨', - 'vBarv' => 'â«©', - 'Vcy' => 'Ð’', - 'vcy' => 'в', - 'VDash' => '⊫', - 'Vdash' => '⊩', - 'vDash' => '⊨', - 'vdash' => '⊢', - 'Vdashl' => '⫦', - 'Vee' => 'â‹', - 'vee' => '∨', - 'veebar' => '⊻', - 'veeeq' => '≚', - 'vellip' => 'â‹®', - 'Verbar' => '‖', - 'verbar' => '|', - 'Vert' => '‖', - 'vert' => '|', - 'VerticalBar' => '∣', - 'VerticalLine' => '|', - 'VerticalSeparator' => 'â˜', - 'VerticalTilde' => '≀', - 'VeryThinSpace' => ' ', - 'Vfr' => 'ð”™', - 'vfr' => 'ð”³', - 'vltri' => '⊲', - 'vnsub' => '⊂⃒', - 'vnsup' => '⊃⃒', - 'Vopf' => 'ð•', - 'vopf' => 'ð•§', - 'vprop' => 'âˆ', - 'vrtri' => '⊳', - 'Vscr' => 'ð’±', - 'vscr' => 'ð“‹', - 'vsubnE' => '⫋︀', - 'vsubne' => '⊊︀', - 'vsupnE' => '⫌︀', - 'vsupne' => '⊋︀', - 'Vvdash' => '⊪', - 'vzigzag' => '⦚', - 'Wcirc' => 'Å´', - 'wcirc' => 'ŵ', - 'wedbar' => '⩟', - 'Wedge' => 'â‹€', - 'wedge' => '∧', - 'wedgeq' => '≙', - 'weierp' => '℘', - 'Wfr' => 'ð”š', - 'wfr' => 'ð”´', - 'Wopf' => 'ð•Ž', - 'wopf' => 'ð•¨', - 'wp' => '℘', - 'wr' => '≀', - 'wreath' => '≀', - 'Wscr' => 'ð’²', - 'wscr' => 'ð“Œ', - 'xcap' => 'â‹‚', - 'xcirc' => 'â—¯', - 'xcup' => '⋃', - 'xdtri' => 'â–½', - 'Xfr' => 'ð”›', - 'xfr' => 'ð”µ', - 'xhArr' => '⟺', - 'xharr' => '⟷', - 'Xi' => 'Ξ', - 'xi' => 'ξ', - 'xlArr' => '⟸', - 'xlarr' => '⟵', - 'xmap' => '⟼', - 'xnis' => 'â‹»', - 'xodot' => '⨀', - 'Xopf' => 'ð•', - 'xopf' => 'ð•©', - 'xoplus' => 'â¨', - 'xotime' => '⨂', - 'xrArr' => '⟹', - 'xrarr' => '⟶', - 'Xscr' => 'ð’³', - 'xscr' => 'ð“', - 'xsqcup' => '⨆', - 'xuplus' => '⨄', - 'xutri' => 'â–³', - 'xvee' => 'â‹', - 'xwedge' => 'â‹€', - 'Yacute' => 'Ã', - 'Yacut' => 'Ã', - 'yacute' => 'ý', - 'yacut' => 'ý', - 'YAcy' => 'Я', - 'yacy' => 'Ñ', - 'Ycirc' => 'Ŷ', - 'ycirc' => 'Å·', - 'Ycy' => 'Ы', - 'ycy' => 'Ñ‹', - 'yen' => 'Â¥', - 'ye' => 'Â¥', - 'Yfr' => 'ð”œ', - 'yfr' => 'ð”¶', - 'YIcy' => 'Ї', - 'yicy' => 'Ñ—', - 'Yopf' => 'ð•', - 'yopf' => 'ð•ª', - 'Yscr' => 'ð’´', - 'yscr' => 'ð“Ž', - 'YUcy' => 'Ю', - 'yucy' => 'ÑŽ', - 'Yuml' => 'Ÿ', - 'yuml' => 'ÿ', - 'yum' => 'ÿ', - 'Zacute' => 'Ź', - 'zacute' => 'ź', - 'Zcaron' => 'Ž', - 'zcaron' => 'ž', - 'Zcy' => 'З', - 'zcy' => 'з', - 'Zdot' => 'Å»', - 'zdot' => 'ż', - 'zeetrf' => 'ℨ', - 'ZeroWidthSpace' => '​', - 'Zeta' => 'Ζ', - 'zeta' => 'ζ', - 'Zfr' => 'ℨ', - 'zfr' => 'ð”·', - 'ZHcy' => 'Ж', - 'zhcy' => 'ж', - 'zigrarr' => 'â‡', - 'Zopf' => 'ℤ', - 'zopf' => 'ð•«', - 'Zscr' => 'ð’µ', - 'zscr' => 'ð“', - 'zwj' => 'â€', - 'zwnj' => '‌', - ); -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Exception.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Exception.php deleted file mode 100644 index 64e97e6ff..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Exception.php +++ /dev/null @@ -1,10 +0,0 @@ - self::NAMESPACE_HTML, - 'svg' => self::NAMESPACE_SVG, - 'math' => self::NAMESPACE_MATHML, - ); - - /** - * Holds the always available namespaces (which does not require the XMLNS declaration). - * - * @var array - */ - protected $implicitNamespaces = array( - 'xml' => self::NAMESPACE_XML, - 'xmlns' => self::NAMESPACE_XMLNS, - 'xlink' => self::NAMESPACE_XLINK, - ); - - /** - * Holds a stack of currently active namespaces. - * - * @var array - */ - protected $nsStack = array(); - - /** - * Holds the number of namespaces declared by a node. - * - * @var array - */ - protected $pushes = array(); - - /** - * Defined in 8.2.5. - */ - const IM_INITIAL = 0; - - const IM_BEFORE_HTML = 1; - - const IM_BEFORE_HEAD = 2; - - const IM_IN_HEAD = 3; - - const IM_IN_HEAD_NOSCRIPT = 4; - - const IM_AFTER_HEAD = 5; - - const IM_IN_BODY = 6; - - const IM_TEXT = 7; - - const IM_IN_TABLE = 8; - - const IM_IN_TABLE_TEXT = 9; - - const IM_IN_CAPTION = 10; - - const IM_IN_COLUMN_GROUP = 11; - - const IM_IN_TABLE_BODY = 12; - - const IM_IN_ROW = 13; - - const IM_IN_CELL = 14; - - const IM_IN_SELECT = 15; - - const IM_IN_SELECT_IN_TABLE = 16; - - const IM_AFTER_BODY = 17; - - const IM_IN_FRAMESET = 18; - - const IM_AFTER_FRAMESET = 19; - - const IM_AFTER_AFTER_BODY = 20; - - const IM_AFTER_AFTER_FRAMESET = 21; - - const IM_IN_SVG = 22; - - const IM_IN_MATHML = 23; - - protected $options = array(); - - protected $stack = array(); - - protected $current; // Pointer in the tag hierarchy. - protected $rules; - protected $doc; - - protected $frag; - - protected $processor; - - protected $insertMode = 0; - - /** - * Track if we are in an element that allows only inline child nodes. - * - * @var string|null - */ - protected $onlyInline; - - /** - * Quirks mode is enabled by default. - * Any document that is missing the DT will be considered to be in quirks mode. - */ - protected $quirks = true; - - protected $errors = array(); - - public function __construct($isFragment = false, array $options = array()) - { - $this->options = $options; - - if (isset($options[self::OPT_TARGET_DOC])) { - $this->doc = $options[self::OPT_TARGET_DOC]; - } else { - $impl = new \DOMImplementation(); - // XXX: - // Create the doctype. For now, we are always creating HTML5 - // documents, and attempting to up-convert any older DTDs to HTML5. - $dt = $impl->createDocumentType('html'); - // $this->doc = \DOMImplementation::createDocument(NULL, 'html', $dt); - $this->doc = $impl->createDocument(null, '', $dt); - $this->doc->encoding = !empty($options['encoding']) ? $options['encoding'] : 'UTF-8'; - } - - $this->errors = array(); - - $this->current = $this->doc; // ->documentElement; - - // Create a rules engine for tags. - $this->rules = new TreeBuildingRules(); - - $implicitNS = array(); - if (isset($this->options[self::OPT_IMPLICIT_NS])) { - $implicitNS = $this->options[self::OPT_IMPLICIT_NS]; - } elseif (isset($this->options['implicitNamespaces'])) { - $implicitNS = $this->options['implicitNamespaces']; - } - - // Fill $nsStack with the defalut HTML5 namespaces, plus the "implicitNamespaces" array taken form $options - array_unshift($this->nsStack, $implicitNS + array('' => self::NAMESPACE_HTML) + $this->implicitNamespaces); - - if ($isFragment) { - $this->insertMode = static::IM_IN_BODY; - $this->frag = $this->doc->createDocumentFragment(); - $this->current = $this->frag; - } - } - - /** - * Get the document. - */ - public function document() - { - return $this->doc; - } - - /** - * Get the DOM fragment for the body. - * - * This returns a DOMNodeList because a fragment may have zero or more - * DOMNodes at its root. - * - * @see http://www.w3.org/TR/2012/CR-html5-20121217/syntax.html#concept-frag-parse-context - * - * @return \DOMDocumentFragment - */ - public function fragment() - { - return $this->frag; - } - - /** - * Provide an instruction processor. - * - * This is used for handling Processor Instructions as they are - * inserted. If omitted, PI's are inserted directly into the DOM tree. - * - * @param InstructionProcessor $proc - */ - public function setInstructionProcessor(InstructionProcessor $proc) - { - $this->processor = $proc; - } - - public function doctype($name, $idType = 0, $id = null, $quirks = false) - { - // This is used solely for setting quirks mode. Currently we don't - // try to preserve the inbound DT. We convert it to HTML5. - $this->quirks = $quirks; - - if ($this->insertMode > static::IM_INITIAL) { - $this->parseError('Illegal placement of DOCTYPE tag. Ignoring: ' . $name); - - return; - } - - $this->insertMode = static::IM_BEFORE_HTML; - } - - /** - * Process the start tag. - * - * @todo - XMLNS namespace handling (we need to parse, even if it's not valid) - * - XLink, MathML and SVG namespace handling - * - Omission rules: 8.1.2.4 Optional tags - * - * @param string $name - * @param array $attributes - * @param bool $selfClosing - * - * @return int - */ - public function startTag($name, $attributes = array(), $selfClosing = false) - { - $lname = $this->normalizeTagName($name); - - // Make sure we have an html element. - if (!$this->doc->documentElement && 'html' !== $name && !$this->frag) { - $this->startTag('html'); - } - - // Set quirks mode if we're at IM_INITIAL with no doctype. - if ($this->insertMode === static::IM_INITIAL) { - $this->quirks = true; - $this->parseError('No DOCTYPE specified.'); - } - - // SPECIAL TAG HANDLING: - // Spec says do this, and "don't ask." - // find the spec where this is defined... looks problematic - if ('image' === $name && !($this->insertMode === static::IM_IN_SVG || $this->insertMode === static::IM_IN_MATHML)) { - $name = 'img'; - } - - // Autoclose p tags where appropriate. - if ($this->insertMode >= static::IM_IN_BODY && Elements::isA($name, Elements::AUTOCLOSE_P)) { - $this->autoclose('p'); - } - - // Set insert mode: - switch ($name) { - case 'html': - $this->insertMode = static::IM_BEFORE_HEAD; - break; - case 'head': - if ($this->insertMode > static::IM_BEFORE_HEAD) { - $this->parseError('Unexpected head tag outside of head context.'); - } else { - $this->insertMode = static::IM_IN_HEAD; - } - break; - case 'body': - $this->insertMode = static::IM_IN_BODY; - break; - case 'svg': - $this->insertMode = static::IM_IN_SVG; - break; - case 'math': - $this->insertMode = static::IM_IN_MATHML; - break; - case 'noscript': - if ($this->insertMode === static::IM_IN_HEAD) { - $this->insertMode = static::IM_IN_HEAD_NOSCRIPT; - } - break; - } - - // Special case handling for SVG. - if ($this->insertMode === static::IM_IN_SVG) { - $lname = Elements::normalizeSvgElement($lname); - } - - $pushes = 0; - // when we found a tag thats appears inside $nsRoots, we have to switch the defalut namespace - if (isset($this->nsRoots[$lname]) && $this->nsStack[0][''] !== $this->nsRoots[$lname]) { - array_unshift($this->nsStack, array( - '' => $this->nsRoots[$lname], - ) + $this->nsStack[0]); - ++$pushes; - } - $needsWorkaround = false; - if (isset($this->options['xmlNamespaces']) && $this->options['xmlNamespaces']) { - // when xmlNamespaces is true a and we found a 'xmlns' or 'xmlns:*' attribute, we should add a new item to the $nsStack - foreach ($attributes as $aName => $aVal) { - if ('xmlns' === $aName) { - $needsWorkaround = $aVal; - array_unshift($this->nsStack, array( - '' => $aVal, - ) + $this->nsStack[0]); - ++$pushes; - } elseif ('xmlns' === (($pos = strpos($aName, ':')) ? substr($aName, 0, $pos) : '')) { - array_unshift($this->nsStack, array( - substr($aName, $pos + 1) => $aVal, - ) + $this->nsStack[0]); - ++$pushes; - } - } - } - - if ($this->onlyInline && Elements::isA($lname, Elements::BLOCK_TAG)) { - $this->autoclose($this->onlyInline); - $this->onlyInline = null; - } - - try { - $prefix = ($pos = strpos($lname, ':')) ? substr($lname, 0, $pos) : ''; - - if (false !== $needsWorkaround) { - $xml = "<$lname xmlns=\"$needsWorkaround\" " . (strlen($prefix) && isset($this->nsStack[0][$prefix]) ? ("xmlns:$prefix=\"" . $this->nsStack[0][$prefix] . '"') : '') . '/>'; - - $frag = new \DOMDocument('1.0', 'UTF-8'); - $frag->loadXML($xml); - - $ele = $this->doc->importNode($frag->documentElement, true); - } else { - if (!isset($this->nsStack[0][$prefix]) || ('' === $prefix && isset($this->options[self::OPT_DISABLE_HTML_NS]) && $this->options[self::OPT_DISABLE_HTML_NS])) { - $ele = $this->doc->createElement($lname); - } else { - $ele = $this->doc->createElementNS($this->nsStack[0][$prefix], $lname); - } - } - } catch (\DOMException $e) { - $this->parseError("Illegal tag name: <$lname>. Replaced with ."); - $ele = $this->doc->createElement('invalid'); - } - - if (Elements::isA($lname, Elements::BLOCK_ONLY_INLINE)) { - $this->onlyInline = $lname; - } - - // When we add some namespacess, we have to track them. Later, when "endElement" is invoked, we have to remove them. - // When we are on a void tag, we do not need to care about namesapce nesting. - if ($pushes > 0 && !Elements::isA($name, Elements::VOID_TAG)) { - // PHP tends to free the memory used by DOM, - // to avoid spl_object_hash collisions whe have to avoid garbage collection of $ele storing it into $pushes - // see https://bugs.php.net/bug.php?id=67459 - $this->pushes[spl_object_hash($ele)] = array($pushes, $ele); - } - - foreach ($attributes as $aName => $aVal) { - // xmlns attributes can't be set - if ('xmlns' === $aName) { - continue; - } - - if ($this->insertMode === static::IM_IN_SVG) { - $aName = Elements::normalizeSvgAttribute($aName); - } elseif ($this->insertMode === static::IM_IN_MATHML) { - $aName = Elements::normalizeMathMlAttribute($aName); - } - - $aVal = (string) $aVal; - - try { - $prefix = ($pos = strpos($aName, ':')) ? substr($aName, 0, $pos) : false; - - if ('xmlns' === $prefix) { - $ele->setAttributeNS(self::NAMESPACE_XMLNS, $aName, $aVal); - } elseif (false !== $prefix && isset($this->nsStack[0][$prefix])) { - $ele->setAttributeNS($this->nsStack[0][$prefix], $aName, $aVal); - } else { - $ele->setAttribute($aName, $aVal); - } - } catch (\DOMException $e) { - $this->parseError("Illegal attribute name for tag $name. Ignoring: $aName"); - continue; - } - - // This is necessary on a non-DTD schema, like HTML5. - if ('id' === $aName) { - $ele->setIdAttribute('id', true); - } - } - - if ($this->frag !== $this->current && $this->rules->hasRules($name)) { - // Some elements have special processing rules. Handle those separately. - $this->current = $this->rules->evaluate($ele, $this->current); - } else { - // Otherwise, it's a standard element. - $this->current->appendChild($ele); - - if (!Elements::isA($name, Elements::VOID_TAG)) { - $this->current = $ele; - } - - // Self-closing tags should only be respected on foreign elements - // (and are implied on void elements) - // See: https://www.w3.org/TR/html5/syntax.html#start-tags - if (Elements::isHtml5Element($name)) { - $selfClosing = false; - } - } - - // This is sort of a last-ditch attempt to correct for cases where no head/body - // elements are provided. - if ($this->insertMode <= static::IM_BEFORE_HEAD && 'head' !== $name && 'html' !== $name) { - $this->insertMode = static::IM_IN_BODY; - } - - // When we are on a void tag, we do not need to care about namesapce nesting, - // but we have to remove the namespaces pushed to $nsStack. - if ($pushes > 0 && Elements::isA($name, Elements::VOID_TAG)) { - // remove the namespaced definded by current node - for ($i = 0; $i < $pushes; ++$i) { - array_shift($this->nsStack); - } - } - - if ($selfClosing) { - $this->endTag($name); - } - - // Return the element mask, which the tokenizer can then use to set - // various processing rules. - return Elements::element($name); - } - - public function endTag($name) - { - $lname = $this->normalizeTagName($name); - - // Special case within 12.2.6.4.7: An end tag whose tag name is "br" should be treated as an opening tag - if ('br' === $name) { - $this->parseError('Closing tag encountered for void element br.'); - - $this->startTag('br'); - } - // Ignore closing tags for other unary elements. - elseif (Elements::isA($name, Elements::VOID_TAG)) { - return; - } - - if ($this->insertMode <= static::IM_BEFORE_HTML) { - // 8.2.5.4.2 - if (in_array($name, array( - 'html', - 'br', - 'head', - 'title', - ))) { - $this->startTag('html'); - $this->endTag($name); - $this->insertMode = static::IM_BEFORE_HEAD; - - return; - } - - // Ignore the tag. - $this->parseError('Illegal closing tag at global scope.'); - - return; - } - - // Special case handling for SVG. - if ($this->insertMode === static::IM_IN_SVG) { - $lname = Elements::normalizeSvgElement($lname); - } - - $cid = spl_object_hash($this->current); - - // XXX: HTML has no parent. What do we do, though, - // if this element appears in the wrong place? - if ('html' === $lname) { - return; - } - - // remove the namespaced definded by current node - if (isset($this->pushes[$cid])) { - for ($i = 0; $i < $this->pushes[$cid][0]; ++$i) { - array_shift($this->nsStack); - } - unset($this->pushes[$cid]); - } - - if (!$this->autoclose($lname)) { - $this->parseError('Could not find closing tag for ' . $lname); - } - - switch ($lname) { - case 'head': - $this->insertMode = static::IM_AFTER_HEAD; - break; - case 'body': - $this->insertMode = static::IM_AFTER_BODY; - break; - case 'svg': - case 'mathml': - $this->insertMode = static::IM_IN_BODY; - break; - } - } - - public function comment($cdata) - { - // TODO: Need to handle case where comment appears outside of the HTML tag. - $node = $this->doc->createComment($cdata); - $this->current->appendChild($node); - } - - public function text($data) - { - // XXX: Hmmm.... should we really be this strict? - if ($this->insertMode < static::IM_IN_HEAD) { - // Per '8.2.5.4.3 The "before head" insertion mode' the characters - // " \t\n\r\f" should be ignored but no mention of a parse error. This is - // practical as most documents contain these characters. Other text is not - // expected here so recording a parse error is necessary. - $dataTmp = trim($data, " \t\n\r\f"); - if (!empty($dataTmp)) { - // fprintf(STDOUT, "Unexpected insert mode: %d", $this->insertMode); - $this->parseError('Unexpected text. Ignoring: ' . $dataTmp); - } - - return; - } - // fprintf(STDOUT, "Appending text %s.", $data); - $node = $this->doc->createTextNode($data); - $this->current->appendChild($node); - } - - public function eof() - { - // If the $current isn't the $root, do we need to do anything? - } - - public function parseError($msg, $line = 0, $col = 0) - { - $this->errors[] = sprintf('Line %d, Col %d: %s', $line, $col, $msg); - } - - public function getErrors() - { - return $this->errors; - } - - public function cdata($data) - { - $node = $this->doc->createCDATASection($data); - $this->current->appendChild($node); - } - - public function processingInstruction($name, $data = null) - { - // XXX: Ignore initial XML declaration, per the spec. - if ($this->insertMode === static::IM_INITIAL && 'xml' === strtolower($name)) { - return; - } - - // Important: The processor may modify the current DOM tree however it sees fit. - if ($this->processor instanceof InstructionProcessor) { - $res = $this->processor->process($this->current, $name, $data); - if (!empty($res)) { - $this->current = $res; - } - - return; - } - - // Otherwise, this is just a dumb PI element. - $node = $this->doc->createProcessingInstruction($name, $data); - - $this->current->appendChild($node); - } - - // ========================================================================== - // UTILITIES - // ========================================================================== - - /** - * Apply normalization rules to a tag name. - * See sections 2.9 and 8.1.2. - * - * @param string $tagName - * - * @return string The normalized tag name. - */ - protected function normalizeTagName($tagName) - { - /* - * Section 2.9 suggests that we should not do this. if (strpos($name, ':') !== false) { // We know from the grammar that there must be at least one other // char besides :, since : is not a legal tag start. $parts = explode(':', $name); return array_pop($parts); } - */ - return $tagName; - } - - protected function quirksTreeResolver($name) - { - throw new \Exception('Not implemented.'); - } - - /** - * Automatically climb the tree and close the closest node with the matching $tag. - * - * @param string $tagName - * - * @return bool - */ - protected function autoclose($tagName) - { - $working = $this->current; - do { - if (XML_ELEMENT_NODE !== $working->nodeType) { - return false; - } - if ($working->tagName === $tagName) { - $this->current = $working->parentNode; - - return true; - } - } while ($working = $working->parentNode); - - return false; - } - - /** - * Checks if the given tagname is an ancestor of the present candidate. - * - * If $this->current or anything above $this->current matches the given tag - * name, this returns true. - * - * @param string $tagName - * - * @return bool - */ - protected function isAncestor($tagName) - { - $candidate = $this->current; - while (XML_ELEMENT_NODE === $candidate->nodeType) { - if ($candidate->tagName === $tagName) { - return true; - } - $candidate = $candidate->parentNode; - } - - return false; - } - - /** - * Returns true if the immediate parent element is of the given tagname. - * - * @param string $tagName - * - * @return bool - */ - protected function isParent($tagName) - { - return $this->current->tagName === $tagName; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/EventHandler.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/EventHandler.php deleted file mode 100644 index 9893a718b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/EventHandler.php +++ /dev/null @@ -1,114 +0,0 @@ -). - * - * @return int one of the Tokenizer::TEXTMODE_* constants - */ - public function startTag($name, $attributes = array(), $selfClosing = false); - - /** - * An end-tag. - */ - public function endTag($name); - - /** - * A comment section (unparsed character data). - */ - public function comment($cdata); - - /** - * A unit of parsed character data. - * - * Entities in this text are *already decoded*. - */ - public function text($cdata); - - /** - * Indicates that the document has been entirely processed. - */ - public function eof(); - - /** - * Emitted when the parser encounters an error condition. - */ - public function parseError($msg, $line, $col); - - /** - * A CDATA section. - * - * @param string $data - * The unparsed character data - */ - public function cdata($data); - - /** - * This is a holdover from the XML spec. - * - * While user agents don't get PIs, server-side does. - * - * @param string $name The name of the processor (e.g. 'php'). - * @param string $data The unparsed data. - */ - public function processingInstruction($name, $data = null); -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/FileInputStream.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/FileInputStream.php deleted file mode 100644 index b081ed96b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/FileInputStream.php +++ /dev/null @@ -1,33 +0,0 @@ -errors = UTF8Utils::checkForIllegalCodepoints($data); - - $data = $this->replaceLinefeeds($data); - - $this->data = $data; - $this->char = 0; - $this->EOF = strlen($data); - } - - /** - * Check if upcomming chars match the given sequence. - * - * This will read the stream for the $sequence. If it's - * found, this will return true. If not, return false. - * Since this unconsumes any chars it reads, the caller - * will still need to read the next sequence, even if - * this returns true. - * - * Example: $this->scanner->sequenceMatches('') will - * see if the input stream is at the start of a - * '' string. - * - * @param string $sequence - * @param bool $caseSensitive - * - * @return bool - */ - public function sequenceMatches($sequence, $caseSensitive = true) - { - $portion = substr($this->data, $this->char, strlen($sequence)); - - return $caseSensitive ? $portion === $sequence : 0 === strcasecmp($portion, $sequence); - } - - /** - * Get the current position. - * - * @return int The current intiger byte position. - */ - public function position() - { - return $this->char; - } - - /** - * Take a peek at the next character in the data. - * - * @return string The next character. - */ - public function peek() - { - if (($this->char + 1) < $this->EOF) { - return $this->data[$this->char + 1]; - } - - return false; - } - - /** - * Get the next character. - * Note: This advances the pointer. - * - * @return string The next character. - */ - public function next() - { - ++$this->char; - - if ($this->char < $this->EOF) { - return $this->data[$this->char]; - } - - return false; - } - - /** - * Get the current character. - * Note, this does not advance the pointer. - * - * @return string The current character. - */ - public function current() - { - if ($this->char < $this->EOF) { - return $this->data[$this->char]; - } - - return false; - } - - /** - * Silently consume N chars. - * - * @param int $count - */ - public function consume($count = 1) - { - $this->char += $count; - } - - /** - * Unconsume some of the data. - * This moves the data pointer backwards. - * - * @param int $howMany The number of characters to move the pointer back. - */ - public function unconsume($howMany = 1) - { - if (($this->char - $howMany) >= 0) { - $this->char -= $howMany; - } - } - - /** - * Get the next group of that contains hex characters. - * Note, along with getting the characters the pointer in the data will be - * moved as well. - * - * @return string The next group that is hex characters. - */ - public function getHex() - { - return $this->doCharsWhile(static::CHARS_HEX); - } - - /** - * Get the next group of characters that are ASCII Alpha characters. - * Note, along with getting the characters the pointer in the data will be - * moved as well. - * - * @return string The next group of ASCII alpha characters. - */ - public function getAsciiAlpha() - { - return $this->doCharsWhile(static::CHARS_ALPHA); - } - - /** - * Get the next group of characters that are ASCII Alpha characters and numbers. - * Note, along with getting the characters the pointer in the data will be - * moved as well. - * - * @return string The next group of ASCII alpha characters and numbers. - */ - public function getAsciiAlphaNum() - { - return $this->doCharsWhile(static::CHARS_ALNUM); - } - - /** - * Get the next group of numbers. - * Note, along with getting the characters the pointer in the data will be - * moved as well. - * - * @return string The next group of numbers. - */ - public function getNumeric() - { - return $this->doCharsWhile('0123456789'); - } - - /** - * Consume whitespace. - * Whitespace in HTML5 is: formfeed, tab, newline, space. - * - * @return int The length of the matched whitespaces. - */ - public function whitespace() - { - if ($this->char >= $this->EOF) { - return false; - } - - $len = strspn($this->data, "\n\t\f ", $this->char); - - $this->char += $len; - - return $len; - } - - /** - * Returns the current line that is being consumed. - * - * @return int The current line number. - */ - public function currentLine() - { - if (empty($this->EOF) || 0 === $this->char) { - return 1; - } - - // Add one to $this->char because we want the number for the next - // byte to be processed. - return substr_count($this->data, "\n", 0, min($this->char, $this->EOF)) + 1; - } - - /** - * Read chars until something in the mask is encountered. - * - * @param string $mask - * - * @return mixed - */ - public function charsUntil($mask) - { - return $this->doCharsUntil($mask); - } - - /** - * Read chars as long as the mask matches. - * - * @param string $mask - * - * @return int - */ - public function charsWhile($mask) - { - return $this->doCharsWhile($mask); - } - - /** - * Returns the current column of the current line that the tokenizer is at. - * - * Newlines are column 0. The first char after a newline is column 1. - * - * @return int The column number. - */ - public function columnOffset() - { - // Short circuit for the first char. - if (0 === $this->char) { - return 0; - } - - // strrpos is weird, and the offset needs to be negative for what we - // want (i.e., the last \n before $this->char). This needs to not have - // one (to make it point to the next character, the one we want the - // position of) added to it because strrpos's behaviour includes the - // final offset byte. - $backwardFrom = $this->char - 1 - strlen($this->data); - $lastLine = strrpos($this->data, "\n", $backwardFrom); - - // However, for here we want the length up until the next byte to be - // processed, so add one to the current byte ($this->char). - if (false !== $lastLine) { - $findLengthOf = substr($this->data, $lastLine + 1, $this->char - 1 - $lastLine); - } else { - // After a newline. - $findLengthOf = substr($this->data, 0, $this->char); - } - - return UTF8Utils::countChars($findLengthOf); - } - - /** - * Get all characters until EOF. - * - * This consumes characters until the EOF. - * - * @return int The number of characters remaining. - */ - public function remainingChars() - { - if ($this->char < $this->EOF) { - $data = substr($this->data, $this->char); - $this->char = $this->EOF; - - return $data; - } - - return ''; // false; - } - - /** - * Replace linefeed characters according to the spec. - * - * @param $data - * - * @return string - */ - private function replaceLinefeeds($data) - { - /* - * U+000D CARRIAGE RETURN (CR) characters and U+000A LINE FEED (LF) characters are treated specially. - * Any CR characters that are followed by LF characters must be removed, and any CR characters not - * followed by LF characters must be converted to LF characters. Thus, newlines in HTML DOMs are - * represented by LF characters, and there are never any CR characters in the input to the tokenization - * stage. - */ - $crlfTable = array( - "\0" => "\xEF\xBF\xBD", - "\r\n" => "\n", - "\r" => "\n", - ); - - return strtr($data, $crlfTable); - } - - /** - * Read to a particular match (or until $max bytes are consumed). - * - * This operates on byte sequences, not characters. - * - * Matches as far as possible until we reach a certain set of bytes - * and returns the matched substring. - * - * @param string $bytes Bytes to match. - * @param int $max Maximum number of bytes to scan. - * - * @return mixed Index or false if no match is found. You should use strong - * equality when checking the result, since index could be 0. - */ - private function doCharsUntil($bytes, $max = null) - { - if ($this->char >= $this->EOF) { - return false; - } - - if (0 === $max || $max) { - $len = strcspn($this->data, $bytes, $this->char, $max); - } else { - $len = strcspn($this->data, $bytes, $this->char); - } - - $string = (string) substr($this->data, $this->char, $len); - $this->char += $len; - - return $string; - } - - /** - * Returns the string so long as $bytes matches. - * - * Matches as far as possible with a certain set of bytes - * and returns the matched substring. - * - * @param string $bytes A mask of bytes to match. If ANY byte in this mask matches the - * current char, the pointer advances and the char is part of the - * substring. - * @param int $max The max number of chars to read. - * - * @return string - */ - private function doCharsWhile($bytes, $max = null) - { - if ($this->char >= $this->EOF) { - return false; - } - - if (0 === $max || $max) { - $len = strspn($this->data, $bytes, $this->char, $max); - } else { - $len = strspn($this->data, $bytes, $this->char); - } - - $string = (string) substr($this->data, $this->char, $len); - $this->char += $len; - - return $string; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php deleted file mode 100644 index 0c213feb6..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php +++ /dev/null @@ -1,331 +0,0 @@ - - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -// Some conventions: -// - /* */ indicates verbatim text from the HTML 5 specification -// MPB: Not sure which version of the spec. Moving from HTML5lib to -// HTML5-PHP, I have been using this version: -// http://www.w3.org/TR/2012/CR-html5-20121217/Overview.html#contents -// -// - // indicates regular comments - -/** - * @deprecated since 2.4, to remove in 3.0. Use a string in the scanner instead. - */ -class StringInputStream implements InputStream -{ - /** - * The string data we're parsing. - */ - private $data; - - /** - * The current integer byte position we are in $data. - */ - private $char; - - /** - * Length of $data; when $char === $data, we are at the end-of-file. - */ - private $EOF; - - /** - * Parse errors. - */ - public $errors = array(); - - /** - * Create a new InputStream wrapper. - * - * @param string $data Data to parse. - * @param string $encoding The encoding to use for the data. - * @param string $debug A fprintf format to use to echo the data on stdout. - */ - public function __construct($data, $encoding = 'UTF-8', $debug = '') - { - $data = UTF8Utils::convertToUTF8($data, $encoding); - if ($debug) { - fprintf(STDOUT, $debug, $data, strlen($data)); - } - - // There is good reason to question whether it makes sense to - // do this here, since most of these checks are done during - // parsing, and since this check doesn't actually *do* anything. - $this->errors = UTF8Utils::checkForIllegalCodepoints($data); - - $data = $this->replaceLinefeeds($data); - - $this->data = $data; - $this->char = 0; - $this->EOF = strlen($data); - } - - public function __toString() - { - return $this->data; - } - - /** - * Replace linefeed characters according to the spec. - */ - protected function replaceLinefeeds($data) - { - /* - * U+000D CARRIAGE RETURN (CR) characters and U+000A LINE FEED (LF) characters are treated specially. - * Any CR characters that are followed by LF characters must be removed, and any CR characters not - * followed by LF characters must be converted to LF characters. Thus, newlines in HTML DOMs are - * represented by LF characters, and there are never any CR characters in the input to the tokenization - * stage. - */ - $crlfTable = array( - "\0" => "\xEF\xBF\xBD", - "\r\n" => "\n", - "\r" => "\n", - ); - - return strtr($data, $crlfTable); - } - - /** - * Returns the current line that the tokenizer is at. - */ - public function currentLine() - { - if (empty($this->EOF) || 0 === $this->char) { - return 1; - } - // Add one to $this->char because we want the number for the next - // byte to be processed. - return substr_count($this->data, "\n", 0, min($this->char, $this->EOF)) + 1; - } - - /** - * @deprecated - */ - public function getCurrentLine() - { - return $this->currentLine(); - } - - /** - * Returns the current column of the current line that the tokenizer is at. - * Newlines are column 0. The first char after a newline is column 1. - * - * @return int The column number. - */ - public function columnOffset() - { - // Short circuit for the first char. - if (0 === $this->char) { - return 0; - } - // strrpos is weird, and the offset needs to be negative for what we - // want (i.e., the last \n before $this->char). This needs to not have - // one (to make it point to the next character, the one we want the - // position of) added to it because strrpos's behaviour includes the - // final offset byte. - $backwardFrom = $this->char - 1 - strlen($this->data); - $lastLine = strrpos($this->data, "\n", $backwardFrom); - - // However, for here we want the length up until the next byte to be - // processed, so add one to the current byte ($this->char). - if (false !== $lastLine) { - $findLengthOf = substr($this->data, $lastLine + 1, $this->char - 1 - $lastLine); - } else { - // After a newline. - $findLengthOf = substr($this->data, 0, $this->char); - } - - return UTF8Utils::countChars($findLengthOf); - } - - /** - * @deprecated - */ - public function getColumnOffset() - { - return $this->columnOffset(); - } - - /** - * Get the current character. - * - * @return string The current character. - */ - public function current() - { - return $this->data[$this->char]; - } - - /** - * Advance the pointer. - * This is part of the Iterator interface. - */ - public function next() - { - ++$this->char; - } - - /** - * Rewind to the start of the string. - */ - public function rewind() - { - $this->char = 0; - } - - /** - * Is the current pointer location valid. - * - * @return bool Whether the current pointer location is valid. - */ - public function valid() - { - return $this->char < $this->EOF; - } - - /** - * Get all characters until EOF. - * - * This reads to the end of the file, and sets the read marker at the - * end of the file. - * - * Note this performs bounds checking. - * - * @return string Returns the remaining text. If called when the InputStream is - * already exhausted, it returns an empty string. - */ - public function remainingChars() - { - if ($this->char < $this->EOF) { - $data = substr($this->data, $this->char); - $this->char = $this->EOF; - - return $data; - } - - return ''; // false; - } - - /** - * Read to a particular match (or until $max bytes are consumed). - * - * This operates on byte sequences, not characters. - * - * Matches as far as possible until we reach a certain set of bytes - * and returns the matched substring. - * - * @param string $bytes Bytes to match. - * @param int $max Maximum number of bytes to scan. - * - * @return mixed Index or false if no match is found. You should use strong - * equality when checking the result, since index could be 0. - */ - public function charsUntil($bytes, $max = null) - { - if ($this->char >= $this->EOF) { - return false; - } - - if (0 === $max || $max) { - $len = strcspn($this->data, $bytes, $this->char, $max); - } else { - $len = strcspn($this->data, $bytes, $this->char); - } - - $string = (string) substr($this->data, $this->char, $len); - $this->char += $len; - - return $string; - } - - /** - * Returns the string so long as $bytes matches. - * - * Matches as far as possible with a certain set of bytes - * and returns the matched substring. - * - * @param string $bytes A mask of bytes to match. If ANY byte in this mask matches the - * current char, the pointer advances and the char is part of the - * substring. - * @param int $max The max number of chars to read. - * - * @return string - */ - public function charsWhile($bytes, $max = null) - { - if ($this->char >= $this->EOF) { - return false; - } - - if (0 === $max || $max) { - $len = strspn($this->data, $bytes, $this->char, $max); - } else { - $len = strspn($this->data, $bytes, $this->char); - } - $string = (string) substr($this->data, $this->char, $len); - $this->char += $len; - - return $string; - } - - /** - * Unconsume characters. - * - * @param int $howMany The number of characters to unconsume. - */ - public function unconsume($howMany = 1) - { - if (($this->char - $howMany) >= 0) { - $this->char -= $howMany; - } - } - - /** - * Look ahead without moving cursor. - */ - public function peek() - { - if (($this->char + 1) <= $this->EOF) { - return $this->data[$this->char + 1]; - } - - return false; - } - - public function key() - { - return $this->char; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php deleted file mode 100644 index e8b4aa098..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php +++ /dev/null @@ -1,1214 +0,0 @@ -scanner = $scanner; - $this->events = $eventHandler; - $this->mode = $mode; - } - - /** - * Begin parsing. - * - * This will begin scanning the document, tokenizing as it goes. - * Tokens are emitted into the event handler. - * - * Tokenizing will continue until the document is completely - * read. Errors are emitted into the event handler, but - * the parser will attempt to continue parsing until the - * entire input stream is read. - */ - public function parse() - { - do { - $this->consumeData(); - // FIXME: Add infinite loop protection. - } while ($this->carryOn); - } - - /** - * Set the text mode for the character data reader. - * - * HTML5 defines three different modes for reading text: - * - Normal: Read until a tag is encountered. - * - RCDATA: Read until a tag is encountered, but skip a few otherwise- - * special characters. - * - Raw: Read until a special closing tag is encountered (viz. pre, script) - * - * This allows those modes to be set. - * - * Normally, setting is done by the event handler via a special return code on - * startTag(), but it can also be set manually using this function. - * - * @param int $textmode One of Elements::TEXT_*. - * @param string $untilTag The tag that should stop RAW or RCDATA mode. Normal mode does not - * use this indicator. - */ - public function setTextMode($textmode, $untilTag = null) - { - $this->textMode = $textmode & (Elements::TEXT_RAW | Elements::TEXT_RCDATA); - $this->untilTag = $untilTag; - } - - /** - * Consume a character and make a move. - * HTML5 8.2.4.1. - */ - protected function consumeData() - { - $tok = $this->scanner->current(); - - if ('&' === $tok) { - // Character reference - $ref = $this->decodeCharacterReference(); - $this->buffer($ref); - - $tok = $this->scanner->current(); - } - - // Parse tag - if ('<' === $tok) { - // Any buffered text data can go out now. - $this->flushBuffer(); - - $tok = $this->scanner->next(); - - if (false === $tok) { - // end of string - $this->parseError('Illegal tag opening'); - } elseif ('!' === $tok) { - $this->markupDeclaration(); - } elseif ('/' === $tok) { - $this->endTag(); - } elseif ('?' === $tok) { - $this->processingInstruction(); - } elseif ($this->is_alpha($tok)) { - $this->tagName(); - } else { - $this->parseError('Illegal tag opening'); - // TODO is this necessary ? - $this->characterData(); - } - - $tok = $this->scanner->current(); - } - - if (false === $tok) { - // Handle end of document - $this->eof(); - } else { - // Parse character - switch ($this->textMode) { - case Elements::TEXT_RAW: - $this->rawText($tok); - break; - - case Elements::TEXT_RCDATA: - $this->rcdata($tok); - break; - - default: - if ('<' === $tok || '&' === $tok) { - break; - } - - // NULL character - if ("\00" === $tok) { - $this->parseError('Received null character.'); - - $this->text .= $tok; - $this->scanner->consume(); - - break; - } - - $this->text .= $this->scanner->charsUntil("<&\0"); - } - } - - return $this->carryOn; - } - - /** - * Parse anything that looks like character data. - * - * Different rules apply based on the current text mode. - * - * @see Elements::TEXT_RAW Elements::TEXT_RCDATA. - */ - protected function characterData() - { - $tok = $this->scanner->current(); - if (false === $tok) { - return false; - } - switch ($this->textMode) { - case Elements::TEXT_RAW: - return $this->rawText($tok); - case Elements::TEXT_RCDATA: - return $this->rcdata($tok); - default: - if ('<' === $tok || '&' === $tok) { - return false; - } - - return $this->text($tok); - } - } - - /** - * This buffers the current token as character data. - * - * @param string $tok The current token. - * - * @return bool - */ - protected function text($tok) - { - // This should never happen... - if (false === $tok) { - return false; - } - - // NULL character - if ("\00" === $tok) { - $this->parseError('Received null character.'); - } - - $this->buffer($tok); - $this->scanner->consume(); - - return true; - } - - /** - * Read text in RAW mode. - * - * @param string $tok The current token. - * - * @return bool - */ - protected function rawText($tok) - { - if (is_null($this->untilTag)) { - return $this->text($tok); - } - - $sequence = 'untilTag . '>'; - $txt = $this->readUntilSequence($sequence); - $this->events->text($txt); - $this->setTextMode(0); - - return $this->endTag(); - } - - /** - * Read text in RCDATA mode. - * - * @param string $tok The current token. - * - * @return bool - */ - protected function rcdata($tok) - { - if (is_null($this->untilTag)) { - return $this->text($tok); - } - - $sequence = 'untilTag; - $txt = ''; - - $caseSensitive = !Elements::isHtml5Element($this->untilTag); - while (false !== $tok && !('<' == $tok && ($this->scanner->sequenceMatches($sequence, $caseSensitive)))) { - if ('&' == $tok) { - $txt .= $this->decodeCharacterReference(); - $tok = $this->scanner->current(); - } else { - $txt .= $tok; - $tok = $this->scanner->next(); - } - } - $len = strlen($sequence); - $this->scanner->consume($len); - $len += $this->scanner->whitespace(); - if ('>' !== $this->scanner->current()) { - $this->parseError('Unclosed RCDATA end tag'); - } - - $this->scanner->unconsume($len); - $this->events->text($txt); - $this->setTextMode(0); - - return $this->endTag(); - } - - /** - * If the document is read, emit an EOF event. - */ - protected function eof() - { - // fprintf(STDOUT, "EOF"); - $this->flushBuffer(); - $this->events->eof(); - $this->carryOn = false; - } - - /** - * Look for markup. - */ - protected function markupDeclaration() - { - $tok = $this->scanner->next(); - - // Comment: - if ('-' == $tok && '-' == $this->scanner->peek()) { - $this->scanner->consume(2); - - return $this->comment(); - } elseif ('D' == $tok || 'd' == $tok) { // Doctype - return $this->doctype(); - } elseif ('[' == $tok) { // CDATA section - return $this->cdataSection(); - } - - // FINISH - $this->parseError('Expected . Emit an empty comment because 8.2.4.46 says to. - if ('>' == $tok) { - // Parse error. Emit the comment token. - $this->parseError("Expected comment data, got '>'"); - $this->events->comment(''); - $this->scanner->consume(); - - return true; - } - - // Replace NULL with the replacement char. - if ("\0" == $tok) { - $tok = UTF8Utils::FFFD; - } - while (!$this->isCommentEnd()) { - $comment .= $tok; - $tok = $this->scanner->next(); - } - - $this->events->comment($comment); - $this->scanner->consume(); - - return true; - } - - /** - * Check if the scanner has reached the end of a comment. - * - * @return bool - */ - protected function isCommentEnd() - { - $tok = $this->scanner->current(); - - // EOF - if (false === $tok) { - // Hit the end. - $this->parseError('Unexpected EOF in a comment.'); - - return true; - } - - // If next two tokens are not '--', not the end. - if ('-' != $tok || '-' != $this->scanner->peek()) { - return false; - } - - $this->scanner->consume(2); // Consume '-' and one of '!' or '>' - - // Test for '>' - if ('>' == $this->scanner->current()) { - return true; - } - // Test for '!>' - if ('!' == $this->scanner->current() && '>' == $this->scanner->peek()) { - $this->scanner->consume(); // Consume the last '>' - return true; - } - // Unread '-' and one of '!' or '>'; - $this->scanner->unconsume(2); - - return false; - } - - /** - * Parse a DOCTYPE. - * - * Parse a DOCTYPE declaration. This method has strong bearing on whether or - * not Quirksmode is enabled on the event handler. - * - * @todo This method is a little long. Should probably refactor. - * - * @return bool - */ - protected function doctype() - { - // Check that string is DOCTYPE. - if ($this->scanner->sequenceMatches('DOCTYPE', false)) { - $this->scanner->consume(7); - } else { - $chars = $this->scanner->charsWhile('DOCTYPEdoctype'); - $this->parseError('Expected DOCTYPE, got %s', $chars); - - return $this->bogusComment('scanner->whitespace(); - $tok = $this->scanner->current(); - - // EOF: die. - if (false === $tok) { - $this->events->doctype('html5', EventHandler::DOCTYPE_NONE, '', true); - $this->eof(); - - return true; - } - - // NULL char: convert. - if ("\0" === $tok) { - $this->parseError('Unexpected null character in DOCTYPE.'); - } - - $stop = " \n\f>"; - $doctypeName = $this->scanner->charsUntil($stop); - // Lowercase ASCII, replace \0 with FFFD - $doctypeName = strtolower(strtr($doctypeName, "\0", UTF8Utils::FFFD)); - - $tok = $this->scanner->current(); - - // If false, emit a parse error, DOCTYPE, and return. - if (false === $tok) { - $this->parseError('Unexpected EOF in DOCTYPE declaration.'); - $this->events->doctype($doctypeName, EventHandler::DOCTYPE_NONE, null, true); - - return true; - } - - // Short DOCTYPE, like - if ('>' == $tok) { - // DOCTYPE without a name. - if (0 == strlen($doctypeName)) { - $this->parseError('Expected a DOCTYPE name. Got nothing.'); - $this->events->doctype($doctypeName, 0, null, true); - $this->scanner->consume(); - - return true; - } - $this->events->doctype($doctypeName); - $this->scanner->consume(); - - return true; - } - $this->scanner->whitespace(); - - $pub = strtoupper($this->scanner->getAsciiAlpha()); - $white = $this->scanner->whitespace(); - - // Get ID, and flag it as pub or system. - if (('PUBLIC' == $pub || 'SYSTEM' == $pub) && $white > 0) { - // Get the sys ID. - $type = 'PUBLIC' == $pub ? EventHandler::DOCTYPE_PUBLIC : EventHandler::DOCTYPE_SYSTEM; - $id = $this->quotedString("\0>"); - if (false === $id) { - $this->events->doctype($doctypeName, $type, $pub, false); - - return true; - } - - // Premature EOF. - if (false === $this->scanner->current()) { - $this->parseError('Unexpected EOF in DOCTYPE'); - $this->events->doctype($doctypeName, $type, $id, true); - - return true; - } - - // Well-formed complete DOCTYPE. - $this->scanner->whitespace(); - if ('>' == $this->scanner->current()) { - $this->events->doctype($doctypeName, $type, $id, false); - $this->scanner->consume(); - - return true; - } - - // If we get here, we have scanner->charsUntil('>'); - $this->parseError('Malformed DOCTYPE.'); - $this->events->doctype($doctypeName, $type, $id, true); - $this->scanner->consume(); - - return true; - } - - // Else it's a bogus DOCTYPE. - // Consume to > and trash. - $this->scanner->charsUntil('>'); - - $this->parseError('Expected PUBLIC or SYSTEM. Got %s.', $pub); - $this->events->doctype($doctypeName, 0, null, true); - $this->scanner->consume(); - - return true; - } - - /** - * Utility for reading a quoted string. - * - * @param string $stopchars Characters (in addition to a close-quote) that should stop the string. - * E.g. sometimes '>' is higher precedence than '"' or "'". - * - * @return mixed String if one is found (quotations omitted). - */ - protected function quotedString($stopchars) - { - $tok = $this->scanner->current(); - if ('"' == $tok || "'" == $tok) { - $this->scanner->consume(); - $ret = $this->scanner->charsUntil($tok . $stopchars); - if ($this->scanner->current() == $tok) { - $this->scanner->consume(); - } else { - // Parse error because no close quote. - $this->parseError('Expected %s, got %s', $tok, $this->scanner->current()); - } - - return $ret; - } - - return false; - } - - /** - * Handle a CDATA section. - * - * @return bool - */ - protected function cdataSection() - { - $cdata = ''; - $this->scanner->consume(); - - $chars = $this->scanner->charsWhile('CDAT'); - if ('CDATA' != $chars || '[' != $this->scanner->current()) { - $this->parseError('Expected [CDATA[, got %s', $chars); - - return $this->bogusComment('scanner->next(); - do { - if (false === $tok) { - $this->parseError('Unexpected EOF inside CDATA.'); - $this->bogusComment('scanner->next(); - } while (!$this->scanner->sequenceMatches(']]>')); - - // Consume ]]> - $this->scanner->consume(3); - - $this->events->cdata($cdata); - - return true; - } - - // ================================================================ - // Non-HTML5 - // ================================================================ - - /** - * Handle a processing instruction. - * - * XML processing instructions are supposed to be ignored in HTML5, - * treated as "bogus comments". However, since we're not a user - * agent, we allow them. We consume until ?> and then issue a - * EventListener::processingInstruction() event. - * - * @return bool - */ - protected function processingInstruction() - { - if ('?' != $this->scanner->current()) { - return false; - } - - $tok = $this->scanner->next(); - $procName = $this->scanner->getAsciiAlpha(); - $white = $this->scanner->whitespace(); - - // If not a PI, send to bogusComment. - if (0 == strlen($procName) || 0 == $white || false == $this->scanner->current()) { - $this->parseError("Expected processing instruction name, got $tok"); - $this->bogusComment('. - while (!('?' == $this->scanner->current() && '>' == $this->scanner->peek())) { - $data .= $this->scanner->current(); - - $tok = $this->scanner->next(); - if (false === $tok) { - $this->parseError('Unexpected EOF in processing instruction.'); - $this->events->processingInstruction($procName, $data); - - return true; - } - } - - $this->scanner->consume(2); // Consume the closing tag - $this->events->processingInstruction($procName, $data); - - return true; - } - - // ================================================================ - // UTILITY FUNCTIONS - // ================================================================ - - /** - * Read from the input stream until we get to the desired sequene - * or hit the end of the input stream. - * - * @param string $sequence - * - * @return string - */ - protected function readUntilSequence($sequence) - { - $buffer = ''; - - // Optimization for reading larger blocks faster. - $first = substr($sequence, 0, 1); - while (false !== $this->scanner->current()) { - $buffer .= $this->scanner->charsUntil($first); - - // Stop as soon as we hit the stopping condition. - if ($this->scanner->sequenceMatches($sequence, false)) { - return $buffer; - } - $buffer .= $this->scanner->current(); - $this->scanner->consume(); - } - - // If we get here, we hit the EOF. - $this->parseError('Unexpected EOF during text read.'); - - return $buffer; - } - - /** - * Check if upcomming chars match the given sequence. - * - * This will read the stream for the $sequence. If it's - * found, this will return true. If not, return false. - * Since this unconsumes any chars it reads, the caller - * will still need to read the next sequence, even if - * this returns true. - * - * Example: $this->scanner->sequenceMatches('') will - * see if the input stream is at the start of a - * '' string. - * - * @param string $sequence - * @param bool $caseSensitive - * - * @return bool - */ - protected function sequenceMatches($sequence, $caseSensitive = true) - { - @trigger_error(__METHOD__ . ' method is deprecated since version 2.4 and will be removed in 3.0. Use Scanner::sequenceMatches() instead.', E_USER_DEPRECATED); - - return $this->scanner->sequenceMatches($sequence, $caseSensitive); - } - - /** - * Send a TEXT event with the contents of the text buffer. - * - * This emits an EventHandler::text() event with the current contents of the - * temporary text buffer. (The buffer is used to group as much PCDATA - * as we can instead of emitting lots and lots of TEXT events.) - */ - protected function flushBuffer() - { - if ('' === $this->text) { - return; - } - $this->events->text($this->text); - $this->text = ''; - } - - /** - * Add text to the temporary buffer. - * - * @see flushBuffer() - * - * @param string $str - */ - protected function buffer($str) - { - $this->text .= $str; - } - - /** - * Emit a parse error. - * - * A parse error always returns false because it never consumes any - * characters. - * - * @param string $msg - * - * @return string - */ - protected function parseError($msg) - { - $args = func_get_args(); - - if (count($args) > 1) { - array_shift($args); - $msg = vsprintf($msg, $args); - } - - $line = $this->scanner->currentLine(); - $col = $this->scanner->columnOffset(); - $this->events->parseError($msg, $line, $col); - - return false; - } - - /** - * Decode a character reference and return the string. - * - * If $inAttribute is set to true, a bare & will be returned as-is. - * - * @param bool $inAttribute Set to true if the text is inside of an attribute value. - * false otherwise. - * - * @return string - */ - protected function decodeCharacterReference($inAttribute = false) - { - // Next char after &. - $tok = $this->scanner->next(); - $start = $this->scanner->position(); - - if (false === $tok) { - return '&'; - } - - // These indicate not an entity. We return just - // the &. - if ("\t" === $tok || "\n" === $tok || "\f" === $tok || ' ' === $tok || '&' === $tok || '<' === $tok) { - // $this->scanner->next(); - return '&'; - } - - // Numeric entity - if ('#' === $tok) { - $tok = $this->scanner->next(); - - if (false === $tok) { - $this->parseError('Expected &#DEC; &#HEX;, got EOF'); - $this->scanner->unconsume(1); - - return '&'; - } - - // Hexidecimal encoding. - // X[0-9a-fA-F]+; - // x[0-9a-fA-F]+; - if ('x' === $tok || 'X' === $tok) { - $tok = $this->scanner->next(); // Consume x - - // Convert from hex code to char. - $hex = $this->scanner->getHex(); - if (empty($hex)) { - $this->parseError('Expected &#xHEX;, got &#x%s', $tok); - // We unconsume because we don't know what parser rules might - // be in effect for the remaining chars. For example. '&#>' - // might result in a specific parsing rule inside of tag - // contexts, while not inside of pcdata context. - $this->scanner->unconsume(2); - - return '&'; - } - $entity = CharacterReference::lookupHex($hex); - } // Decimal encoding. - // [0-9]+; - else { - // Convert from decimal to char. - $numeric = $this->scanner->getNumeric(); - if (false === $numeric) { - $this->parseError('Expected &#DIGITS;, got &#%s', $tok); - $this->scanner->unconsume(2); - - return '&'; - } - $entity = CharacterReference::lookupDecimal($numeric); - } - } elseif ('=' === $tok && $inAttribute) { - return '&'; - } else { // String entity. - // Attempt to consume a string up to a ';'. - // [a-zA-Z0-9]+; - $cname = $this->scanner->getAsciiAlphaNum(); - $entity = CharacterReference::lookupName($cname); - - // When no entity is found provide the name of the unmatched string - // and continue on as the & is not part of an entity. The & will - // be converted to & elsewhere. - if (null === $entity) { - if (!$inAttribute || '' === $cname) { - $this->parseError("No match in entity table for '%s'", $cname); - } - $this->scanner->unconsume($this->scanner->position() - $start); - - return '&'; - } - } - - // The scanner has advanced the cursor for us. - $tok = $this->scanner->current(); - - // We have an entity. We're done here. - if (';' === $tok) { - $this->scanner->consume(); - - return $entity; - } - - // Failing to match ; means unconsume the entire string. - $this->scanner->unconsume($this->scanner->position() - $start); - - $this->parseError('Expected &ENTITY;, got &ENTITY%s (no trailing ;) ', $tok); - - return '&'; - } - - /** - * Checks whether a (single-byte) character is an ASCII letter or not. - * - * @param string $input A single-byte string - * - * @return bool True if it is a letter, False otherwise - */ - protected function is_alpha($input) - { - $code = ord($input); - - return ($code >= 97 && $code <= 122) || ($code >= 65 && $code <= 90); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php deleted file mode 100644 index 00d3951fd..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php +++ /dev/null @@ -1,127 +0,0 @@ - 1, - 'dd' => 1, - 'dt' => 1, - 'rt' => 1, - 'rp' => 1, - 'tr' => 1, - 'th' => 1, - 'td' => 1, - 'thead' => 1, - 'tfoot' => 1, - 'tbody' => 1, - 'table' => 1, - 'optgroup' => 1, - 'option' => 1, - ); - - /** - * Returns true if the given tagname has special processing rules. - */ - public function hasRules($tagname) - { - return isset(static::$tags[$tagname]); - } - - /** - * Evaluate the rule for the current tag name. - * - * This may modify the existing DOM. - * - * @return \DOMElement The new Current DOM element. - */ - public function evaluate($new, $current) - { - switch ($new->tagName) { - case 'li': - return $this->handleLI($new, $current); - case 'dt': - case 'dd': - return $this->handleDT($new, $current); - case 'rt': - case 'rp': - return $this->handleRT($new, $current); - case 'optgroup': - return $this->closeIfCurrentMatches($new, $current, array( - 'optgroup', - )); - case 'option': - return $this->closeIfCurrentMatches($new, $current, array( - 'option', - )); - case 'tr': - return $this->closeIfCurrentMatches($new, $current, array( - 'tr', - )); - case 'td': - case 'th': - return $this->closeIfCurrentMatches($new, $current, array( - 'th', - 'td', - )); - case 'tbody': - case 'thead': - case 'tfoot': - case 'table': // Spec isn't explicit about this, but it's necessary. - - return $this->closeIfCurrentMatches($new, $current, array( - 'thead', - 'tfoot', - 'tbody', - )); - } - - return $current; - } - - protected function handleLI($ele, $current) - { - return $this->closeIfCurrentMatches($ele, $current, array( - 'li', - )); - } - - protected function handleDT($ele, $current) - { - return $this->closeIfCurrentMatches($ele, $current, array( - 'dt', - 'dd', - )); - } - - protected function handleRT($ele, $current) - { - return $this->closeIfCurrentMatches($ele, $current, array( - 'rt', - 'rp', - )); - } - - protected function closeIfCurrentMatches($ele, $current, $match) - { - if (in_array($current->tagName, $match, true)) { - $current->parentNode->appendChild($ele); - } else { - $current->appendChild($ele); - } - - return $ele; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php deleted file mode 100644 index 4405e4cc0..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php +++ /dev/null @@ -1,177 +0,0 @@ - - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -use Masterminds\HTML5\Exception; - -class UTF8Utils -{ - /** - * The Unicode replacement character. - */ - const FFFD = "\xEF\xBF\xBD"; - - /** - * Count the number of characters in a string. - * UTF-8 aware. This will try (in order) iconv, MB, and finally a custom counter. - * - * @param string $string - * - * @return int - */ - public static function countChars($string) - { - // Get the length for the string we need. - if (function_exists('mb_strlen')) { - return mb_strlen($string, 'utf-8'); - } - - if (function_exists('iconv_strlen')) { - return iconv_strlen($string, 'utf-8'); - } - - $count = count_chars($string); - - // 0x80 = 0x7F - 0 + 1 (one added to get inclusive range) - // 0x33 = 0xF4 - 0x2C + 1 (one added to get inclusive range) - return array_sum(array_slice($count, 0, 0x80)) + array_sum(array_slice($count, 0xC2, 0x33)); - } - - /** - * Convert data from the given encoding to UTF-8. - * - * This has not yet been tested with charactersets other than UTF-8. - * It should work with ISO-8859-1/-13 and standard Latin Win charsets. - * - * @param string $data The data to convert - * @param string $encoding A valid encoding. Examples: http://www.php.net/manual/en/mbstring.supported-encodings.php - * - * @return string - */ - public static function convertToUTF8($data, $encoding = 'UTF-8') - { - /* - * From the HTML5 spec: Given an encoding, the bytes in the input stream must be converted - * to Unicode characters for the tokeniser, as described by the rules for that encoding, - * except that the leading U+FEFF BYTE ORDER MARK character, if any, must not be stripped - * by the encoding layer (it is stripped by the rule below). Bytes or sequences of bytes - * in the original byte stream that could not be converted to Unicode characters must be - * converted to U+FFFD REPLACEMENT CHARACTER code points. - */ - - // mb_convert_encoding is chosen over iconv because of a bug. The best - // details for the bug are on http://us1.php.net/manual/en/function.iconv.php#108643 - // which contains links to the actual but reports as well as work around - // details. - if (function_exists('mb_convert_encoding')) { - // mb library has the following behaviors: - // - UTF-16 surrogates result in false. - // - Overlongs and outside Plane 16 result in empty strings. - - // Before we run mb_convert_encoding we need to tell it what to do with - // characters it does not know. This could be different than the parent - // application executing this library so we store the value, change it - // to our needs, and then change it back when we are done. This feels - // a little excessive and it would be great if there was a better way. - $save = mb_substitute_character(); - mb_substitute_character('none'); - $data = mb_convert_encoding($data, 'UTF-8', $encoding); - mb_substitute_character($save); - } - // @todo Get iconv running in at least some environments if that is possible. - elseif (function_exists('iconv') && 'auto' !== $encoding) { - // fprintf(STDOUT, "iconv found\n"); - // iconv has the following behaviors: - // - Overlong representations are ignored. - // - Beyond Plane 16 is replaced with a lower char. - // - Incomplete sequences generate a warning. - $data = @iconv($encoding, 'UTF-8//IGNORE', $data); - } else { - throw new Exception('Not implemented, please install mbstring or iconv'); - } - - /* - * One leading U+FEFF BYTE ORDER MARK character must be ignored if any are present. - */ - if ("\xEF\xBB\xBF" === substr($data, 0, 3)) { - $data = substr($data, 3); - } - - return $data; - } - - /** - * Checks for Unicode code points that are not valid in a document. - * - * @param string $data A string to analyze - * - * @return array An array of (string) error messages produced by the scanning - */ - public static function checkForIllegalCodepoints($data) - { - // Vestigal error handling. - $errors = array(); - - /* - * All U+0000 null characters in the input must be replaced by U+FFFD REPLACEMENT CHARACTERs. - * Any occurrences of such characters is a parse error. - */ - for ($i = 0, $count = substr_count($data, "\0"); $i < $count; ++$i) { - $errors[] = 'null-character'; - } - - /* - * Any occurrences of any characters in the ranges U+0001 to U+0008, U+000B, U+000E to U+001F, U+007F - * to U+009F, U+D800 to U+DFFF , U+FDD0 to U+FDEF, and characters U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, - * U+2FFFE, U+2FFFF, U+3FFFE, U+3FFFF, U+4FFFE, U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE, - * U+7FFFF, U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF, U+AFFFE, U+AFFFF, U+BFFFE, U+BFFFF, U+CFFFE, U+CFFFF, - * U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF, U+FFFFE, U+FFFFF, U+10FFFE, and U+10FFFF are parse errors. - * (These are all control characters or permanently undefined Unicode characters.) - */ - // Check PCRE is loaded. - $count = preg_match_all( - '/(?: - [\x01-\x08\x0B\x0E-\x1F\x7F] # U+0001 to U+0008, U+000B, U+000E to U+001F and U+007F - | - \xC2[\x80-\x9F] # U+0080 to U+009F - | - \xED(?:\xA0[\x80-\xFF]|[\xA1-\xBE][\x00-\xFF]|\xBF[\x00-\xBF]) # U+D800 to U+DFFFF - | - \xEF\xB7[\x90-\xAF] # U+FDD0 to U+FDEF - | - \xEF\xBF[\xBE\xBF] # U+FFFE and U+FFFF - | - [\xF0-\xF4][\x8F-\xBF]\xBF[\xBE\xBF] # U+nFFFE and U+nFFFF (1 <= n <= 10_{16}) - )/x', $data, $matches); - for ($i = 0; $i < $count; ++$i) { - $errors[] = 'invalid-codepoint'; - } - - return $errors; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/HTML5Entities.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/HTML5Entities.php deleted file mode 100644 index e9421a12d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/HTML5Entities.php +++ /dev/null @@ -1,1533 +0,0 @@ - ' ', - "\n" => ' ', - '!' => '!', - '"' => '"', - '#' => '#', - '$' => '$', - '%' => '%', - '&' => '&', - '\'' => ''', - '(' => '(', - ')' => ')', - '*' => '*', - '+' => '+', - ',' => ',', - '.' => '.', - '/' => '/', - ':' => ':', - ';' => ';', - '<' => '<', - '<⃒' => '&nvlt', - '=' => '=', - '=⃥' => '&bne', - '>' => '>', - '>⃒' => '&nvgt', - '?' => '?', - '@' => '@', - '[' => '[', - '\\' => '\', - ']' => ']', - '^' => '^', - '_' => '_', - '`' => '`', - 'fj' => '&fjlig', - '{' => '{', - '|' => '|', - '}' => '}', - ' ' => ' ', - '¡' => '¡', - '¢' => '¢', - '£' => '£', - '¤' => '¤', - 'Â¥' => '¥', - '¦' => '¦', - '§' => '§', - '¨' => '¨', - '©' => '©', - 'ª' => 'ª', - '«' => '«', - '¬' => '¬', - '­' => '­', - '®' => '®', - '¯' => '¯', - '°' => '°', - '±' => '±', - '²' => '²', - '³' => '³', - '´' => '´', - 'µ' => 'µ', - '¶' => '¶', - '·' => '·', - '¸' => '¸', - '¹' => '¹', - 'º' => 'º', - '»' => '»', - '¼' => '¼', - '½' => '½', - '¾' => '¾', - '¿' => '¿', - 'À' => 'À', - 'Ã' => 'Á', - 'Â' => 'Â', - 'Ã' => 'Ã', - 'Ä' => 'Ä', - 'Ã…' => 'Å', - 'Æ' => 'Æ', - 'Ç' => 'Ç', - 'È' => 'È', - 'É' => 'É', - 'Ê' => 'Ê', - 'Ë' => 'Ë', - 'ÃŒ' => 'Ì', - 'Ã' => 'Í', - 'ÃŽ' => 'Î', - 'Ã' => 'Ï', - 'Ã' => 'Ð', - 'Ñ' => 'Ñ', - 'Ã’' => 'Ò', - 'Ó' => 'Ó', - 'Ô' => 'Ô', - 'Õ' => 'Õ', - 'Ö' => 'Ö', - '×' => '×', - 'Ø' => 'Ø', - 'Ù' => 'Ù', - 'Ú' => 'Ú', - 'Û' => 'Û', - 'Ü' => 'Ü', - 'Ã' => 'Ý', - 'Þ' => 'Þ', - 'ß' => 'ß', - 'à' => 'à', - 'á' => 'á', - 'â' => 'â', - 'ã' => 'ã', - 'ä' => 'ä', - 'Ã¥' => 'å', - 'æ' => 'æ', - 'ç' => 'ç', - 'è' => 'è', - 'é' => 'é', - 'ê' => 'ê', - 'ë' => 'ë', - 'ì' => 'ì', - 'í' => 'í', - 'î' => 'î', - 'ï' => 'ï', - 'ð' => 'ð', - 'ñ' => 'ñ', - 'ò' => 'ò', - 'ó' => 'ó', - 'ô' => 'ô', - 'õ' => 'õ', - 'ö' => 'ö', - '÷' => '÷', - 'ø' => 'ø', - 'ù' => 'ù', - 'ú' => 'ú', - 'û' => 'û', - 'ü' => 'ü', - 'ý' => 'ý', - 'þ' => 'þ', - 'ÿ' => 'ÿ', - 'Ä€' => 'Ā', - 'Ä' => 'ā', - 'Ä‚' => 'Ă', - 'ă' => 'ă', - 'Ä„' => 'Ą', - 'Ä…' => 'ą', - 'Ć' => 'Ć', - 'ć' => 'ć', - 'Ĉ' => 'Ĉ', - 'ĉ' => 'ĉ', - 'ÄŠ' => 'Ċ', - 'Ä‹' => 'ċ', - 'ÄŒ' => 'Č', - 'Ä' => 'č', - 'ÄŽ' => 'Ď', - 'Ä' => 'ď', - 'Ä' => 'Đ', - 'Ä‘' => 'đ', - 'Ä’' => 'Ē', - 'Ä“' => 'ē', - 'Ä–' => 'Ė', - 'Ä—' => 'ė', - 'Ę' => 'Ę', - 'Ä™' => 'ę', - 'Äš' => 'Ě', - 'Ä›' => 'ě', - 'Äœ' => 'Ĝ', - 'Ä' => 'ĝ', - 'Äž' => 'Ğ', - 'ÄŸ' => 'ğ', - 'Ä ' => 'Ġ', - 'Ä¡' => 'ġ', - 'Ä¢' => 'Ģ', - 'Ĥ' => 'Ĥ', - 'Ä¥' => 'ĥ', - 'Ħ' => 'Ħ', - 'ħ' => 'ħ', - 'Ĩ' => 'Ĩ', - 'Ä©' => 'ĩ', - 'Ī' => 'Ī', - 'Ä«' => 'ī', - 'Ä®' => 'Į', - 'į' => 'į', - 'İ' => 'İ', - 'ı' => 'ı', - 'IJ' => 'IJ', - 'ij' => 'ij', - 'Ä´' => 'Ĵ', - 'ĵ' => 'ĵ', - 'Ķ' => 'Ķ', - 'Ä·' => 'ķ', - 'ĸ' => 'ĸ', - 'Ĺ' => 'Ĺ', - 'ĺ' => 'ĺ', - 'Ä»' => 'Ļ', - 'ļ' => 'ļ', - 'Ľ' => 'Ľ', - 'ľ' => 'ľ', - 'Ä¿' => 'Ŀ', - 'Å€' => 'ŀ', - 'Å' => 'Ł', - 'Å‚' => 'ł', - 'Ń' => 'Ń', - 'Å„' => 'ń', - 'Å…' => 'Ņ', - 'ņ' => 'ņ', - 'Ň' => 'Ň', - 'ň' => 'ň', - 'ʼn' => 'ʼn', - 'ÅŠ' => 'Ŋ', - 'Å‹' => 'ŋ', - 'ÅŒ' => 'Ō', - 'Å' => 'ō', - 'Å' => 'Ő', - 'Å‘' => 'ő', - 'Å’' => 'Œ', - 'Å“' => 'œ', - 'Å”' => 'Ŕ', - 'Å•' => 'ŕ', - 'Å–' => 'Ŗ', - 'Å—' => 'ŗ', - 'Ř' => 'Ř', - 'Å™' => 'ř', - 'Åš' => 'Ś', - 'Å›' => 'ś', - 'Åœ' => 'Ŝ', - 'Å' => 'ŝ', - 'Åž' => 'Ş', - 'ÅŸ' => 'ş', - 'Å ' => 'Š', - 'Å¡' => 'š', - 'Å¢' => 'Ţ', - 'Å£' => 'ţ', - 'Ť' => 'Ť', - 'Å¥' => 'ť', - 'Ŧ' => 'Ŧ', - 'ŧ' => 'ŧ', - 'Ũ' => 'Ũ', - 'Å©' => 'ũ', - 'Ū' => 'Ū', - 'Å«' => 'ū', - 'Ŭ' => 'Ŭ', - 'Å­' => 'ŭ', - 'Å®' => 'Ů', - 'ů' => 'ů', - 'Ű' => 'Ű', - 'ű' => 'ű', - 'Ų' => 'Ų', - 'ų' => 'ų', - 'Å´' => 'Ŵ', - 'ŵ' => 'ŵ', - 'Ŷ' => 'Ŷ', - 'Å·' => 'ŷ', - 'Ÿ' => 'Ÿ', - 'Ź' => 'Ź', - 'ź' => 'ź', - 'Å»' => 'Ż', - 'ż' => 'ż', - 'Ž' => 'Ž', - 'ž' => 'ž', - 'Æ’' => 'ƒ', - 'Ƶ' => 'Ƶ', - 'ǵ' => 'ǵ', - 'È·' => 'ȷ', - 'ˆ' => 'ˆ', - 'ˇ' => 'ˇ', - '˘' => '˘', - 'Ë™' => '˙', - 'Ëš' => '˚', - 'Ë›' => '˛', - 'Ëœ' => '˜', - 'Ë' => '˝', - 'Ì‘' => '̑', - 'Α' => 'Α', - 'Î’' => 'Β', - 'Γ' => 'Γ', - 'Δ' => 'Δ', - 'Ε' => 'Ε', - 'Ζ' => 'Ζ', - 'Η' => 'Η', - 'Θ' => 'Θ', - 'Ι' => 'Ι', - 'Κ' => 'Κ', - 'Λ' => 'Λ', - 'Μ' => 'Μ', - 'Î' => 'Ν', - 'Ξ' => 'Ξ', - 'Ο' => 'Ο', - 'Π' => 'Π', - 'Ρ' => 'Ρ', - 'Σ' => 'Σ', - 'Τ' => 'Τ', - 'Î¥' => 'Υ', - 'Φ' => 'Φ', - 'Χ' => 'Χ', - 'Ψ' => 'Ψ', - 'Ω' => 'Ω', - 'α' => 'α', - 'β' => 'β', - 'γ' => 'γ', - 'δ' => 'δ', - 'ε' => 'ε', - 'ζ' => 'ζ', - 'η' => 'η', - 'θ' => 'θ', - 'ι' => 'ι', - 'κ' => 'κ', - 'λ' => 'λ', - 'μ' => 'μ', - 'ν' => 'ν', - 'ξ' => 'ξ', - 'ο' => 'ο', - 'Ï€' => 'π', - 'Ï' => 'ρ', - 'Ï‚' => 'ς', - 'σ' => 'σ', - 'Ï„' => 'τ', - 'Ï…' => 'υ', - 'φ' => 'φ', - 'χ' => 'χ', - 'ψ' => 'ψ', - 'ω' => 'ω', - 'Ï‘' => 'ϑ', - 'Ï’' => 'ϒ', - 'Ï•' => 'ϕ', - 'Ï–' => 'ϖ', - 'Ïœ' => 'Ϝ', - 'Ï' => 'ϝ', - 'ϰ' => 'ϰ', - 'ϱ' => 'ϱ', - 'ϵ' => 'ϵ', - '϶' => '϶', - 'Ð' => 'Ё', - 'Ђ' => 'Ђ', - 'Ѓ' => 'Ѓ', - 'Є' => 'Є', - 'Ð…' => 'Ѕ', - 'І' => 'І', - 'Ї' => 'Ї', - 'Ј' => 'Ј', - 'Љ' => 'Љ', - 'Њ' => 'Њ', - 'Ћ' => 'Ћ', - 'ÐŒ' => 'Ќ', - 'ÐŽ' => 'Ў', - 'Ð' => 'Џ', - 'Ð' => 'А', - 'Б' => 'Б', - 'Ð’' => 'В', - 'Г' => 'Г', - 'Д' => 'Д', - 'Е' => 'Е', - 'Ж' => 'Ж', - 'З' => 'З', - 'И' => 'И', - 'Й' => 'Й', - 'К' => 'К', - 'Л' => 'Л', - 'М' => 'М', - 'Ð' => 'Н', - 'О' => 'О', - 'П' => 'П', - 'Р' => 'Р', - 'С' => 'С', - 'Т' => 'Т', - 'У' => 'У', - 'Ф' => 'Ф', - 'Ð¥' => 'Х', - 'Ц' => 'Ц', - 'Ч' => 'Ч', - 'Ш' => 'Ш', - 'Щ' => 'Щ', - 'Ъ' => 'Ъ', - 'Ы' => 'Ы', - 'Ь' => 'Ь', - 'Э' => 'Э', - 'Ю' => 'Ю', - 'Я' => 'Я', - 'а' => 'а', - 'б' => 'б', - 'в' => 'в', - 'г' => 'г', - 'д' => 'д', - 'е' => 'е', - 'ж' => 'ж', - 'з' => 'з', - 'и' => 'и', - 'й' => 'й', - 'к' => 'к', - 'л' => 'л', - 'м' => 'м', - 'н' => 'н', - 'о' => 'о', - 'п' => 'п', - 'Ñ€' => 'р', - 'Ñ' => 'с', - 'Ñ‚' => 'т', - 'у' => 'у', - 'Ñ„' => 'ф', - 'Ñ…' => 'х', - 'ц' => 'ц', - 'ч' => 'ч', - 'ш' => 'ш', - 'щ' => 'щ', - 'ÑŠ' => 'ъ', - 'Ñ‹' => 'ы', - 'ÑŒ' => 'ь', - 'Ñ' => 'э', - 'ÑŽ' => 'ю', - 'Ñ' => 'я', - 'Ñ‘' => 'ё', - 'Ñ’' => 'ђ', - 'Ñ“' => 'ѓ', - 'Ñ”' => 'є', - 'Ñ•' => 'ѕ', - 'Ñ–' => 'і', - 'Ñ—' => 'ї', - 'ј' => 'ј', - 'Ñ™' => 'љ', - 'Ñš' => 'њ', - 'Ñ›' => 'ћ', - 'Ñœ' => 'ќ', - 'Ñž' => 'ў', - 'ÑŸ' => 'џ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - '​' => '​', - '‌' => '‌', - 'â€' => '‍', - '‎' => '‎', - 'â€' => '‏', - 'â€' => '‐', - '–' => '–', - '—' => '—', - '―' => '―', - '‖' => '‖', - '‘' => '‘', - '’' => '’', - '‚' => '‚', - '“' => '“', - 'â€' => '”', - '„' => '„', - '†' => '†', - '‡' => '‡', - '•' => '•', - '‥' => '‥', - '…' => '…', - '‰' => '‰', - '‱' => '‱', - '′' => '′', - '″' => '″', - '‴' => '‴', - '‵' => '‵', - '‹' => '‹', - '›' => '›', - '‾' => '‾', - 'â' => '⁁', - 'âƒ' => '⁃', - 'â„' => '⁄', - 'â' => '⁏', - 'â—' => '⁗', - 'âŸ' => ' ', - 'âŸâ€Š' => '&ThickSpace', - 'â ' => '⁠', - 'â¡' => '⁡', - 'â¢' => '⁢', - 'â£' => '⁣', - '€' => '€', - '⃛' => '⃛', - '⃜' => '⃜', - 'â„‚' => 'ℂ', - 'â„…' => '℅', - 'ℊ' => 'ℊ', - 'â„‹' => 'ℋ', - 'ℌ' => 'ℌ', - 'â„' => 'ℍ', - 'ℎ' => 'ℎ', - 'â„' => 'ℏ', - 'â„' => 'ℐ', - 'â„‘' => 'ℑ', - 'â„’' => 'ℒ', - 'â„“' => 'ℓ', - 'â„•' => 'ℕ', - 'â„–' => '№', - 'â„—' => '℗', - '℘' => '℘', - 'â„™' => 'ℙ', - 'ℚ' => 'ℚ', - 'â„›' => 'ℛ', - 'ℜ' => 'ℜ', - 'â„' => 'ℝ', - '℞' => '℞', - 'â„¢' => '™', - 'ℤ' => 'ℤ', - 'â„§' => '℧', - 'ℨ' => 'ℨ', - 'â„©' => '℩', - 'ℬ' => 'ℬ', - 'â„­' => 'ℭ', - 'ℯ' => 'ℯ', - 'â„°' => 'ℰ', - 'ℱ' => 'ℱ', - 'ℳ' => 'ℳ', - 'â„´' => 'ℴ', - 'ℵ' => 'ℵ', - 'â„¶' => 'ℶ', - 'â„·' => 'ℷ', - 'ℸ' => 'ℸ', - 'â……' => 'ⅅ', - 'â…†' => 'ⅆ', - 'â…‡' => 'ⅇ', - 'â…ˆ' => 'ⅈ', - 'â…“' => '⅓', - 'â…”' => '⅔', - 'â…•' => '⅕', - 'â…–' => '⅖', - 'â…—' => '⅗', - 'â…˜' => '⅘', - 'â…™' => '⅙', - 'â…š' => '⅚', - 'â…›' => '⅛', - 'â…œ' => '⅜', - 'â…' => '⅝', - 'â…ž' => '⅞', - 'â†' => '←', - '↑' => '↑', - '→' => '→', - '↓' => '↓', - '↔' => '↔', - '↕' => '↕', - '↖' => '↖', - '↗' => '↗', - '↘' => '↘', - '↙' => '↙', - '↚' => '↚', - '↛' => '↛', - 'â†' => '↝', - 'â†Ì¸' => '&nrarrw', - '↞' => '↞', - '↟' => '↟', - '↠' => '↠', - '↡' => '↡', - '↢' => '↢', - '↣' => '↣', - '↤' => '↤', - '↥' => '↥', - '↦' => '↦', - '↧' => '↧', - '↩' => '↩', - '↪' => '↪', - '↫' => '↫', - '↬' => '↬', - '↭' => '↭', - '↮' => '↮', - '↰' => '↰', - '↱' => '↱', - '↲' => '↲', - '↳' => '↳', - '↵' => '↵', - '↶' => '↶', - '↷' => '↷', - '↺' => '↺', - '↻' => '↻', - '↼' => '↼', - '↽' => '↽', - '↾' => '↾', - '↿' => '↿', - '⇀' => '⇀', - 'â‡' => '⇁', - '⇂' => '⇂', - '⇃' => '⇃', - '⇄' => '⇄', - '⇅' => '⇅', - '⇆' => '⇆', - '⇇' => '⇇', - '⇈' => '⇈', - '⇉' => '⇉', - '⇊' => '⇊', - '⇋' => '⇋', - '⇌' => '⇌', - 'â‡' => '⇍', - '⇎' => '⇎', - 'â‡' => '⇏', - 'â‡' => '⇐', - '⇑' => '⇑', - '⇒' => '⇒', - '⇓' => '⇓', - '⇔' => '⇔', - '⇕' => '⇕', - '⇖' => '⇖', - '⇗' => '⇗', - '⇘' => '⇘', - '⇙' => '⇙', - '⇚' => '⇚', - '⇛' => '⇛', - 'â‡' => '⇝', - '⇤' => '⇤', - '⇥' => '⇥', - '⇵' => '⇵', - '⇽' => '⇽', - '⇾' => '⇾', - '⇿' => '⇿', - '∀' => '∀', - 'âˆ' => '∁', - '∂' => '∂', - '∂̸' => '&npart', - '∃' => '∃', - '∄' => '∄', - '∅' => '∅', - '∇' => '∇', - '∈' => '∈', - '∉' => '∉', - '∋' => '∋', - '∌' => '∌', - 'âˆ' => '∏', - 'âˆ' => '∐', - '∑' => '∑', - '−' => '−', - '∓' => '∓', - '∔' => '∔', - '∖' => '∖', - '∗' => '∗', - '∘' => '∘', - '√' => '√', - 'âˆ' => '∝', - '∞' => '∞', - '∟' => '∟', - '∠' => '∠', - '∠⃒' => '&nang', - '∡' => '∡', - '∢' => '∢', - '∣' => '∣', - '∤' => '∤', - '∥' => '∥', - '∦' => '∦', - '∧' => '∧', - '∨' => '∨', - '∩' => '∩', - '∩︀' => '&caps', - '∪' => '∪', - '∪︀' => '&cups', - '∫' => '∫', - '∬' => '∬', - '∭' => '∭', - '∮' => '∮', - '∯' => '∯', - '∰' => '∰', - '∱' => '∱', - '∲' => '∲', - '∳' => '∳', - '∴' => '∴', - '∵' => '∵', - '∶' => '∶', - '∷' => '∷', - '∸' => '∸', - '∺' => '∺', - '∻' => '∻', - '∼' => '∼', - '∼⃒' => '&nvsim', - '∽' => '∽', - '∽̱' => '&race', - '∾' => '∾', - '∾̳' => '&acE', - '∿' => '∿', - '≀' => '≀', - 'â‰' => '≁', - '≂' => '≂', - '≂̸' => '&nesim', - '≃' => '≃', - '≄' => '≄', - '≅' => '≅', - '≆' => '≆', - '≇' => '≇', - '≈' => '≈', - '≉' => '≉', - '≊' => '≊', - '≋' => '≋', - '≋̸' => '&napid', - '≌' => '≌', - 'â‰' => '≍', - 'â‰âƒ’' => '&nvap', - '≎' => '≎', - '≎̸' => '&nbump', - 'â‰' => '≏', - 'â‰Ì¸' => '&nbumpe', - 'â‰' => '≐', - 'â‰Ì¸' => '&nedot', - '≑' => '≑', - '≒' => '≒', - '≓' => '≓', - '≔' => '≔', - '≕' => '≕', - '≖' => '≖', - '≗' => '≗', - '≙' => '≙', - '≚' => '≚', - '≜' => '≜', - '≟' => '≟', - '≠' => '≠', - '≡' => '≡', - '≡⃥' => '&bnequiv', - '≢' => '≢', - '≤' => '≤', - '≤⃒' => '&nvle', - '≥' => '≥', - '≥⃒' => '&nvge', - '≦' => '≦', - '≦̸' => '&nlE', - '≧' => '≧', - '≧̸' => '&NotGreaterFullEqual', - '≨' => '≨', - '≨︀' => '&lvertneqq', - '≩' => '≩', - '≩︀' => '&gvertneqq', - '≪' => '≪', - '≪̸' => '&nLtv', - '≪⃒' => '&nLt', - '≫' => '≫', - '≫̸' => '&NotGreaterGreater', - '≫⃒' => '&nGt', - '≬' => '≬', - '≭' => '≭', - '≮' => '≮', - '≯' => '≯', - '≰' => '≰', - '≱' => '≱', - '≲' => '≲', - '≳' => '≳', - '≴' => '≴', - '≵' => '≵', - '≶' => '≶', - '≷' => '≷', - '≸' => '≸', - '≹' => '≹', - '≺' => '≺', - '≻' => '≻', - '≼' => '≼', - '≽' => '≽', - '≾' => '≾', - '≿' => '≿', - '≿̸' => '&NotSucceedsTilde', - '⊀' => '⊀', - 'âŠ' => '⊁', - '⊂' => '⊂', - '⊂⃒' => '&vnsub', - '⊃' => '⊃', - '⊃⃒' => '&nsupset', - '⊄' => '⊄', - '⊅' => '⊅', - '⊆' => '⊆', - '⊇' => '⊇', - '⊈' => '⊈', - '⊉' => '⊉', - '⊊' => '⊊', - '⊊︀' => '&vsubne', - '⊋' => '⊋', - '⊋︀' => '&vsupne', - 'âŠ' => '⊍', - '⊎' => '⊎', - 'âŠ' => '⊏', - 'âŠÌ¸' => '&NotSquareSubset', - 'âŠ' => '⊐', - 'âŠÌ¸' => '&NotSquareSuperset', - '⊑' => '⊑', - '⊒' => '⊒', - '⊓' => '⊓', - '⊓︀' => '&sqcaps', - '⊔' => '⊔', - '⊔︀' => '&sqcups', - '⊕' => '⊕', - '⊖' => '⊖', - '⊗' => '⊗', - '⊘' => '⊘', - '⊙' => '⊙', - '⊚' => '⊚', - '⊛' => '⊛', - 'âŠ' => '⊝', - '⊞' => '⊞', - '⊟' => '⊟', - '⊠' => '⊠', - '⊡' => '⊡', - '⊢' => '⊢', - '⊣' => '⊣', - '⊤' => '⊤', - '⊥' => '⊥', - '⊧' => '⊧', - '⊨' => '⊨', - '⊩' => '⊩', - '⊪' => '⊪', - '⊫' => '⊫', - '⊬' => '⊬', - '⊭' => '⊭', - '⊮' => '⊮', - '⊯' => '⊯', - '⊰' => '⊰', - '⊲' => '⊲', - '⊳' => '⊳', - '⊴' => '⊴', - '⊴⃒' => '&nvltrie', - '⊵' => '⊵', - '⊵⃒' => '&nvrtrie', - '⊶' => '⊶', - '⊷' => '⊷', - '⊸' => '⊸', - '⊹' => '⊹', - '⊺' => '⊺', - '⊻' => '⊻', - '⊽' => '⊽', - '⊾' => '⊾', - '⊿' => '⊿', - 'â‹€' => '⋀', - 'â‹' => '⋁', - 'â‹‚' => '⋂', - '⋃' => '⋃', - 'â‹„' => '⋄', - 'â‹…' => '⋅', - '⋆' => '⋆', - '⋇' => '⋇', - '⋈' => '⋈', - '⋉' => '⋉', - '⋊' => '⋊', - 'â‹‹' => '⋋', - '⋌' => '⋌', - 'â‹' => '⋍', - '⋎' => '⋎', - 'â‹' => '⋏', - 'â‹' => '⋐', - 'â‹‘' => '⋑', - 'â‹’' => '⋒', - 'â‹“' => '⋓', - 'â‹”' => '⋔', - 'â‹•' => '⋕', - 'â‹–' => '⋖', - 'â‹—' => '⋗', - '⋘' => '⋘', - '⋘̸' => '&nLl', - 'â‹™' => '⋙', - '⋙̸' => '&nGg', - '⋚' => '⋚', - '⋚︀' => '&lesg', - 'â‹›' => '⋛', - '⋛︀' => '&gesl', - '⋞' => '⋞', - '⋟' => '⋟', - 'â‹ ' => '⋠', - 'â‹¡' => '⋡', - 'â‹¢' => '⋢', - 'â‹£' => '⋣', - '⋦' => '⋦', - 'â‹§' => '⋧', - '⋨' => '⋨', - 'â‹©' => '⋩', - '⋪' => '⋪', - 'â‹«' => '⋫', - '⋬' => '⋬', - 'â‹­' => '⋭', - 'â‹®' => '⋮', - '⋯' => '⋯', - 'â‹°' => '⋰', - '⋱' => '⋱', - '⋲' => '⋲', - '⋳' => '⋳', - 'â‹´' => '⋴', - '⋵' => '⋵', - '⋵̸' => '¬indot', - 'â‹¶' => '⋶', - 'â‹·' => '⋷', - '⋹' => '⋹', - '⋹̸' => '¬inE', - '⋺' => '⋺', - 'â‹»' => '⋻', - '⋼' => '⋼', - '⋽' => '⋽', - '⋾' => '⋾', - '⌅' => '⌅', - '⌆' => '⌆', - '⌈' => '⌈', - '⌉' => '⌉', - '⌊' => '⌊', - '⌋' => '⌋', - '⌌' => '⌌', - 'âŒ' => '⌍', - '⌎' => '⌎', - 'âŒ' => '⌏', - 'âŒ' => '⌐', - '⌒' => '⌒', - '⌓' => '⌓', - '⌕' => '⌕', - '⌖' => '⌖', - '⌜' => '⌜', - 'âŒ' => '⌝', - '⌞' => '⌞', - '⌟' => '⌟', - '⌢' => '⌢', - '⌣' => '⌣', - '⌭' => '⌭', - '⌮' => '⌮', - '⌶' => '⌶', - '⌽' => '⌽', - '⌿' => '⌿', - 'â¼' => '⍼', - '⎰' => '⎰', - '⎱' => '⎱', - '⎴' => '⎴', - '⎵' => '⎵', - '⎶' => '⎶', - 'âœ' => '⏜', - 'â' => '⏝', - 'âž' => '⏞', - 'âŸ' => '⏟', - 'â¢' => '⏢', - 'â§' => '⏧', - 'â£' => '␣', - 'Ⓢ' => 'Ⓢ', - '─' => '─', - '│' => '│', - '┌' => '┌', - 'â”' => '┐', - 'â””' => '└', - '┘' => '┘', - '├' => '├', - '┤' => '┤', - '┬' => '┬', - 'â”´' => '┴', - '┼' => '┼', - 'â•' => '═', - 'â•‘' => '║', - 'â•’' => '╒', - 'â•“' => '╓', - 'â•”' => '╔', - 'â••' => '╕', - 'â•–' => '╖', - 'â•—' => '╗', - '╘' => '╘', - 'â•™' => '╙', - '╚' => '╚', - 'â•›' => '╛', - '╜' => '╜', - 'â•' => '╝', - '╞' => '╞', - '╟' => '╟', - 'â• ' => '╠', - 'â•¡' => '╡', - 'â•¢' => '╢', - 'â•£' => '╣', - '╤' => '╤', - 'â•¥' => '╥', - '╦' => '╦', - 'â•§' => '╧', - '╨' => '╨', - 'â•©' => '╩', - '╪' => '╪', - 'â•«' => '╫', - '╬' => '╬', - 'â–€' => '▀', - 'â–„' => '▄', - 'â–ˆ' => '█', - 'â–‘' => '░', - 'â–’' => '▒', - 'â–“' => '▓', - 'â–¡' => '□', - 'â–ª' => '▪', - 'â–«' => '▫', - 'â–­' => '▭', - 'â–®' => '▮', - 'â–±' => '▱', - 'â–³' => '△', - 'â–´' => '▴', - 'â–µ' => '▵', - 'â–¸' => '▸', - 'â–¹' => '▹', - 'â–½' => '▽', - 'â–¾' => '▾', - 'â–¿' => '▿', - 'â—‚' => '◂', - 'â—ƒ' => '◃', - 'â—Š' => '◊', - 'â—‹' => '○', - 'â—¬' => '◬', - 'â—¯' => '◯', - 'â—¸' => '◸', - 'â—¹' => '◹', - 'â—º' => '◺', - 'â—»' => '◻', - 'â—¼' => '◼', - '★' => '★', - '☆' => '☆', - '☎' => '☎', - '♀' => '♀', - '♂' => '♂', - 'â™ ' => '♠', - '♣' => '♣', - '♥' => '♥', - '♦' => '♦', - '♪' => '♪', - 'â™­' => '♭', - 'â™®' => '♮', - '♯' => '♯', - '✓' => '✓', - '✗' => '✗', - '✠' => '✠', - '✶' => '✶', - 'â˜' => '❘', - 'â²' => '❲', - 'â³' => '❳', - '⟈' => '⟈', - '⟉' => '⟉', - '⟦' => '⟦', - '⟧' => '⟧', - '⟨' => '⟨', - '⟩' => '⟩', - '⟪' => '⟪', - '⟫' => '⟫', - '⟬' => '⟬', - '⟭' => '⟭', - '⟵' => '⟵', - '⟶' => '⟶', - '⟷' => '⟷', - '⟸' => '⟸', - '⟹' => '⟹', - '⟺' => '⟺', - '⟼' => '⟼', - '⟿' => '⟿', - '⤂' => '⤂', - '⤃' => '⤃', - '⤄' => '⤄', - '⤅' => '⤅', - '⤌' => '⤌', - 'â¤' => '⤍', - '⤎' => '⤎', - 'â¤' => '⤏', - 'â¤' => '⤐', - '⤑' => '⤑', - '⤒' => '⤒', - '⤓' => '⤓', - '⤖' => '⤖', - '⤙' => '⤙', - '⤚' => '⤚', - '⤛' => '⤛', - '⤜' => '⤜', - 'â¤' => '⤝', - '⤞' => '⤞', - '⤟' => '⤟', - '⤠' => '⤠', - '⤣' => '⤣', - '⤤' => '⤤', - '⤥' => '⤥', - '⤦' => '⤦', - '⤧' => '⤧', - '⤨' => '⤨', - '⤩' => '⤩', - '⤪' => '⤪', - '⤳' => '⤳', - '⤳̸' => '&nrarrc', - '⤵' => '⤵', - '⤶' => '⤶', - '⤷' => '⤷', - '⤸' => '⤸', - '⤹' => '⤹', - '⤼' => '⤼', - '⤽' => '⤽', - '⥅' => '⥅', - '⥈' => '⥈', - '⥉' => '⥉', - '⥊' => '⥊', - '⥋' => '⥋', - '⥎' => '⥎', - 'â¥' => '⥏', - 'â¥' => '⥐', - '⥑' => '⥑', - '⥒' => '⥒', - '⥓' => '⥓', - '⥔' => '⥔', - '⥕' => '⥕', - '⥖' => '⥖', - '⥗' => '⥗', - '⥘' => '⥘', - '⥙' => '⥙', - '⥚' => '⥚', - '⥛' => '⥛', - '⥜' => '⥜', - 'â¥' => '⥝', - '⥞' => '⥞', - '⥟' => '⥟', - '⥠' => '⥠', - '⥡' => '⥡', - '⥢' => '⥢', - '⥣' => '⥣', - '⥤' => '⥤', - '⥥' => '⥥', - '⥦' => '⥦', - '⥧' => '⥧', - '⥨' => '⥨', - '⥩' => '⥩', - '⥪' => '⥪', - '⥫' => '⥫', - '⥬' => '⥬', - '⥭' => '⥭', - '⥮' => '⥮', - '⥯' => '⥯', - '⥰' => '⥰', - '⥱' => '⥱', - '⥲' => '⥲', - '⥳' => '⥳', - '⥴' => '⥴', - '⥵' => '⥵', - '⥶' => '⥶', - '⥸' => '⥸', - '⥹' => '⥹', - '⥻' => '⥻', - '⥼' => '⥼', - '⥽' => '⥽', - '⥾' => '⥾', - '⥿' => '⥿', - '⦅' => '⦅', - '⦆' => '⦆', - '⦋' => '⦋', - '⦌' => '⦌', - 'â¦' => '⦍', - '⦎' => '⦎', - 'â¦' => '⦏', - 'â¦' => '⦐', - '⦑' => '⦑', - '⦒' => '⦒', - '⦓' => '⦓', - '⦔' => '⦔', - '⦕' => '⦕', - '⦖' => '⦖', - '⦚' => '⦚', - '⦜' => '⦜', - 'â¦' => '⦝', - '⦤' => '⦤', - '⦥' => '⦥', - '⦦' => '⦦', - '⦧' => '⦧', - '⦨' => '⦨', - '⦩' => '⦩', - '⦪' => '⦪', - '⦫' => '⦫', - '⦬' => '⦬', - '⦭' => '⦭', - '⦮' => '⦮', - '⦯' => '⦯', - '⦰' => '⦰', - '⦱' => '⦱', - '⦲' => '⦲', - '⦳' => '⦳', - '⦴' => '⦴', - '⦵' => '⦵', - '⦶' => '⦶', - '⦷' => '⦷', - '⦹' => '⦹', - '⦻' => '⦻', - '⦼' => '⦼', - '⦾' => '⦾', - '⦿' => '⦿', - 'â§€' => '⧀', - 'â§' => '⧁', - 'â§‚' => '⧂', - '⧃' => '⧃', - 'â§„' => '⧄', - 'â§…' => '⧅', - '⧉' => '⧉', - 'â§' => '⧍', - 'â§Ž' => '⧎', - 'â§' => '⧏', - 'â§Ì¸' => '&NotLeftTriangleBar', - 'â§' => '⧐', - 'â§Ì¸' => '&NotRightTriangleBar', - 'â§œ' => '⧜', - 'â§' => '⧝', - 'â§ž' => '⧞', - 'â§£' => '⧣', - '⧤' => '⧤', - 'â§¥' => '⧥', - 'â§«' => '⧫', - 'â§´' => '⧴', - 'â§¶' => '⧶', - '⨀' => '⨀', - 'â¨' => '⨁', - '⨂' => '⨂', - '⨄' => '⨄', - '⨆' => '⨆', - '⨌' => '⨌', - 'â¨' => '⨍', - 'â¨' => '⨐', - '⨑' => '⨑', - '⨒' => '⨒', - '⨓' => '⨓', - '⨔' => '⨔', - '⨕' => '⨕', - '⨖' => '⨖', - '⨗' => '⨗', - '⨢' => '⨢', - '⨣' => '⨣', - '⨤' => '⨤', - '⨥' => '⨥', - '⨦' => '⨦', - '⨧' => '⨧', - '⨩' => '⨩', - '⨪' => '⨪', - '⨭' => '⨭', - '⨮' => '⨮', - '⨯' => '⨯', - '⨰' => '⨰', - '⨱' => '⨱', - '⨳' => '⨳', - '⨴' => '⨴', - '⨵' => '⨵', - '⨶' => '⨶', - '⨷' => '⨷', - '⨸' => '⨸', - '⨹' => '⨹', - '⨺' => '⨺', - '⨻' => '⨻', - '⨼' => '⨼', - '⨿' => '⨿', - 'â©€' => '⩀', - 'â©‚' => '⩂', - '⩃' => '⩃', - 'â©„' => '⩄', - 'â©…' => '⩅', - '⩆' => '⩆', - '⩇' => '⩇', - '⩈' => '⩈', - '⩉' => '⩉', - '⩊' => '⩊', - 'â©‹' => '⩋', - '⩌' => '⩌', - 'â©' => '⩍', - 'â©' => '⩐', - 'â©“' => '⩓', - 'â©”' => '⩔', - 'â©•' => '⩕', - 'â©–' => '⩖', - 'â©—' => '⩗', - '⩘' => '⩘', - '⩚' => '⩚', - 'â©›' => '⩛', - '⩜' => '⩜', - 'â©' => '⩝', - '⩟' => '⩟', - '⩦' => '⩦', - '⩪' => '⩪', - 'â©­' => '⩭', - '⩭̸' => '&ncongdot', - 'â©®' => '⩮', - '⩯' => '⩯', - 'â©°' => '⩰', - '⩰̸' => '&napE', - '⩱' => '⩱', - '⩲' => '⩲', - '⩳' => '⩳', - 'â©´' => '⩴', - '⩵' => '⩵', - 'â©·' => '⩷', - '⩸' => '⩸', - '⩹' => '⩹', - '⩺' => '⩺', - 'â©»' => '⩻', - '⩼' => '⩼', - '⩽' => '⩽', - '⩽̸' => '&nles', - '⩾' => '⩾', - '⩾̸' => '&nges', - 'â©¿' => '⩿', - '⪀' => '⪀', - 'âª' => '⪁', - '⪂' => '⪂', - '⪃' => '⪃', - '⪄' => '⪄', - '⪅' => '⪅', - '⪆' => '⪆', - '⪇' => '⪇', - '⪈' => '⪈', - '⪉' => '⪉', - '⪊' => '⪊', - '⪋' => '⪋', - '⪌' => '⪌', - 'âª' => '⪍', - '⪎' => '⪎', - 'âª' => '⪏', - 'âª' => '⪐', - '⪑' => '⪑', - '⪒' => '⪒', - '⪓' => '⪓', - '⪔' => '⪔', - '⪕' => '⪕', - '⪖' => '⪖', - '⪗' => '⪗', - '⪘' => '⪘', - '⪙' => '⪙', - '⪚' => '⪚', - 'âª' => '⪝', - '⪞' => '⪞', - '⪟' => '⪟', - '⪠' => '⪠', - '⪡' => '⪡', - '⪡̸' => '&NotNestedLessLess', - '⪢' => '⪢', - '⪢̸' => '&NotNestedGreaterGreater', - '⪤' => '⪤', - '⪥' => '⪥', - '⪦' => '⪦', - '⪧' => '⪧', - '⪨' => '⪨', - '⪩' => '⪩', - '⪪' => '⪪', - '⪫' => '⪫', - '⪬' => '⪬', - '⪬︀' => '&smtes', - '⪭' => '⪭', - '⪭︀' => '&lates', - '⪮' => '⪮', - '⪯' => '⪯', - '⪯̸' => '&NotPrecedesEqual', - '⪰' => '⪰', - '⪰̸' => '&NotSucceedsEqual', - '⪳' => '⪳', - '⪴' => '⪴', - '⪵' => '⪵', - '⪶' => '⪶', - '⪷' => '⪷', - '⪸' => '⪸', - '⪹' => '⪹', - '⪺' => '⪺', - '⪻' => '⪻', - '⪼' => '⪼', - '⪽' => '⪽', - '⪾' => '⪾', - '⪿' => '⪿', - 'â«€' => '⫀', - 'â«' => '⫁', - 'â«‚' => '⫂', - '⫃' => '⫃', - 'â«„' => '⫄', - 'â«…' => '⫅', - '⫅̸' => '&nsubE', - '⫆' => '⫆', - '⫆̸' => '&nsupseteqq', - '⫇' => '⫇', - '⫈' => '⫈', - 'â«‹' => '⫋', - '⫋︀' => '&vsubnE', - '⫌' => '⫌', - '⫌︀' => '&varsupsetneqq', - 'â«' => '⫏', - 'â«' => '⫐', - 'â«‘' => '⫑', - 'â«’' => '⫒', - 'â«“' => '⫓', - 'â«”' => '⫔', - 'â«•' => '⫕', - 'â«–' => '⫖', - 'â«—' => '⫗', - '⫘' => '⫘', - 'â«™' => '⫙', - '⫚' => '⫚', - 'â«›' => '⫛', - '⫤' => '⫤', - '⫦' => '⫦', - 'â«§' => '⫧', - '⫨' => '⫨', - 'â«©' => '⫩', - 'â««' => '⫫', - '⫬' => '⫬', - 'â«­' => '⫭', - 'â«®' => '⫮', - '⫯' => '⫯', - 'â«°' => '⫰', - '⫱' => '⫱', - '⫲' => '⫲', - '⫳' => '⫳', - '⫽︀' => '&varsupsetneqq', - 'ff' => 'ff', - 'ï¬' => 'fi', - 'fl' => 'fl', - 'ffi' => 'ffi', - 'ffl' => 'ffl', - 'ð’œ' => '𝒜', - 'ð’ž' => '𝒞', - 'ð’Ÿ' => '𝒟', - 'ð’¢' => '𝒢', - 'ð’¥' => '𝒥', - 'ð’¦' => '𝒦', - 'ð’©' => '𝒩', - 'ð’ª' => '𝒪', - 'ð’«' => '𝒫', - 'ð’¬' => '𝒬', - 'ð’®' => '𝒮', - 'ð’¯' => '𝒯', - 'ð’°' => '𝒰', - 'ð’±' => '𝒱', - 'ð’²' => '𝒲', - 'ð’³' => '𝒳', - 'ð’´' => '𝒴', - 'ð’µ' => '𝒵', - 'ð’¶' => '𝒶', - 'ð’·' => '𝒷', - 'ð’¸' => '𝒸', - 'ð’¹' => '𝒹', - 'ð’»' => '𝒻', - 'ð’½' => '𝒽', - 'ð’¾' => '𝒾', - 'ð’¿' => '𝒿', - 'ð“€' => '𝓀', - 'ð“' => '𝓁', - 'ð“‚' => '𝓂', - 'ð“ƒ' => '𝓃', - 'ð“…' => '𝓅', - 'ð“†' => '𝓆', - 'ð“‡' => '𝓇', - 'ð“ˆ' => '𝓈', - 'ð“‰' => '𝓉', - 'ð“Š' => '𝓊', - 'ð“‹' => '𝓋', - 'ð“Œ' => '𝓌', - 'ð“' => '𝓍', - 'ð“Ž' => '𝓎', - 'ð“' => '𝓏', - 'ð”„' => '𝔄', - 'ð”…' => '𝔅', - 'ð”‡' => '𝔇', - 'ð”ˆ' => '𝔈', - 'ð”‰' => '𝔉', - 'ð”Š' => '𝔊', - 'ð”' => '𝔍', - 'ð”Ž' => '𝔎', - 'ð”' => '𝔏', - 'ð”' => '𝔐', - 'ð”‘' => '𝔑', - 'ð”’' => '𝔒', - 'ð”“' => '𝔓', - 'ð””' => '𝔔', - 'ð”–' => '𝔖', - 'ð”—' => '𝔗', - 'ð”˜' => '𝔘', - 'ð”™' => '𝔙', - 'ð”š' => '𝔚', - 'ð”›' => '𝔛', - 'ð”œ' => '𝔜', - 'ð”ž' => '𝔞', - 'ð”Ÿ' => '𝔟', - 'ð” ' => '𝔠', - 'ð”¡' => '𝔡', - 'ð”¢' => '𝔢', - 'ð”£' => '𝔣', - 'ð”¤' => '𝔤', - 'ð”¥' => '𝔥', - 'ð”¦' => '𝔦', - 'ð”§' => '𝔧', - 'ð”¨' => '𝔨', - 'ð”©' => '𝔩', - 'ð”ª' => '𝔪', - 'ð”«' => '𝔫', - 'ð”¬' => '𝔬', - 'ð”­' => '𝔭', - 'ð”®' => '𝔮', - 'ð”¯' => '𝔯', - 'ð”°' => '𝔰', - 'ð”±' => '𝔱', - 'ð”²' => '𝔲', - 'ð”³' => '𝔳', - 'ð”´' => '𝔴', - 'ð”µ' => '𝔵', - 'ð”¶' => '𝔶', - 'ð”·' => '𝔷', - 'ð”¸' => '𝔸', - 'ð”¹' => '𝔹', - 'ð”»' => '𝔻', - 'ð”¼' => '𝔼', - 'ð”½' => '𝔽', - 'ð”¾' => '𝔾', - 'ð•€' => '𝕀', - 'ð•' => '𝕁', - 'ð•‚' => '𝕂', - 'ð•ƒ' => '𝕃', - 'ð•„' => '𝕄', - 'ð•†' => '𝕆', - 'ð•Š' => '𝕊', - 'ð•‹' => '𝕋', - 'ð•Œ' => '𝕌', - 'ð•' => '𝕍', - 'ð•Ž' => '𝕎', - 'ð•' => '𝕏', - 'ð•' => '𝕐', - 'ð•’' => '𝕒', - 'ð•“' => '𝕓', - 'ð•”' => '𝕔', - 'ð••' => '𝕕', - 'ð•–' => '𝕖', - 'ð•—' => '𝕗', - 'ð•˜' => '𝕘', - 'ð•™' => '𝕙', - 'ð•š' => '𝕚', - 'ð•›' => '𝕛', - 'ð•œ' => '𝕜', - 'ð•' => '𝕝', - 'ð•ž' => '𝕞', - 'ð•Ÿ' => '𝕟', - 'ð• ' => '𝕠', - 'ð•¡' => '𝕡', - 'ð•¢' => '𝕢', - 'ð•£' => '𝕣', - 'ð•¤' => '𝕤', - 'ð•¥' => '𝕥', - 'ð•¦' => '𝕦', - 'ð•§' => '𝕧', - 'ð•¨' => '𝕨', - 'ð•©' => '𝕩', - 'ð•ª' => '𝕪', - 'ð•«' => '𝕫', - ); -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php deleted file mode 100644 index ec467f22c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php +++ /dev/null @@ -1,553 +0,0 @@ -'http://www.w3.org/1999/xhtml', - 'attrNamespace'=>'http://www.w3.org/1999/xhtml', - - 'nodeName'=>'img', 'nodeName'=>array('img', 'a'), - 'attrName'=>'alt', 'attrName'=>array('title', 'alt'), - ), - */ - array( - 'nodeNamespace' => 'http://www.w3.org/1999/xhtml', - 'attrName' => array('href', - 'hreflang', - 'http-equiv', - 'icon', - 'id', - 'keytype', - 'kind', - 'label', - 'lang', - 'language', - 'list', - 'maxlength', - 'media', - 'method', - 'name', - 'placeholder', - 'rel', - 'rows', - 'rowspan', - 'sandbox', - 'spellcheck', - 'scope', - 'seamless', - 'shape', - 'size', - 'sizes', - 'span', - 'src', - 'srcdoc', - 'srclang', - 'srcset', - 'start', - 'step', - 'style', - 'summary', - 'tabindex', - 'target', - 'title', - 'type', - 'value', - 'width', - 'border', - 'charset', - 'cite', - 'class', - 'code', - 'codebase', - 'color', - 'cols', - 'colspan', - 'content', - 'coords', - 'data', - 'datetime', - 'default', - 'dir', - 'dirname', - 'enctype', - 'for', - 'form', - 'formaction', - 'headers', - 'height', - 'accept', - 'accept-charset', - 'accesskey', - 'action', - 'align', - 'alt', - 'bgcolor', - ), - ), - array( - 'nodeNamespace' => 'http://www.w3.org/1999/xhtml', - 'xpath' => 'starts-with(local-name(), \'data-\')', - ), - ); - - const DOCTYPE = ''; - - public function __construct($output, $options = array()) - { - if (isset($options['encode_entities'])) { - $this->encode = $options['encode_entities']; - } - - $this->outputMode = static::IM_IN_HTML; - $this->out = $output; - $this->hasHTML5 = defined('ENT_HTML5'); - } - - public function addRule(array $rule) - { - $this->nonBooleanAttributes[] = $rule; - } - - public function setTraverser(Traverser $traverser) - { - $this->traverser = $traverser; - - return $this; - } - - public function unsetTraverser() - { - $this->traverser = null; - - return $this; - } - - public function document($dom) - { - $this->doctype(); - if ($dom->documentElement) { - foreach ($dom->childNodes as $node) { - $this->traverser->node($node); - } - $this->nl(); - } - } - - protected function doctype() - { - $this->wr(static::DOCTYPE); - $this->nl(); - } - - public function element($ele) - { - $name = $ele->tagName; - - // Per spec: - // If the element has a declared namespace in the HTML, MathML or - // SVG namespaces, we use the lname instead of the tagName. - if ($this->traverser->isLocalElement($ele)) { - $name = $ele->localName; - } - - // If we are in SVG or MathML there is special handling. - // Using if/elseif instead of switch because it's faster in PHP. - if ('svg' == $name) { - $this->outputMode = static::IM_IN_SVG; - $name = Elements::normalizeSvgElement($name); - } elseif ('math' == $name) { - $this->outputMode = static::IM_IN_MATHML; - } - - $this->openTag($ele); - if (Elements::isA($name, Elements::TEXT_RAW)) { - foreach ($ele->childNodes as $child) { - if ($child instanceof \DOMCharacterData) { - $this->wr($child->data); - } elseif ($child instanceof \DOMElement) { - $this->element($child); - } - } - } else { - // Handle children. - if ($ele->hasChildNodes()) { - $this->traverser->children($ele->childNodes); - } - - // Close out the SVG or MathML special handling. - if ('svg' == $name || 'math' == $name) { - $this->outputMode = static::IM_IN_HTML; - } - } - - // If not unary, add a closing tag. - if (!Elements::isA($name, Elements::VOID_TAG)) { - $this->closeTag($ele); - } - } - - /** - * Write a text node. - * - * @param \DOMText $ele The text node to write. - */ - public function text($ele) - { - if (isset($ele->parentNode) && isset($ele->parentNode->tagName) && Elements::isA($ele->parentNode->localName, Elements::TEXT_RAW)) { - $this->wr($ele->data); - - return; - } - - // FIXME: This probably needs some flags set. - $this->wr($this->enc($ele->data)); - } - - public function cdata($ele) - { - // This encodes CDATA. - $this->wr($ele->ownerDocument->saveXML($ele)); - } - - public function comment($ele) - { - // These produce identical output. - // $this->wr(''); - $this->wr($ele->ownerDocument->saveXML($ele)); - } - - public function processorInstruction($ele) - { - $this->wr('wr($ele->target) - ->wr(' ') - ->wr($ele->data) - ->wr('?>'); - } - - /** - * Write the namespace attributes. - * - * @param \DOMNode $ele The element being written. - */ - protected function namespaceAttrs($ele) - { - if (!$this->xpath || $this->xpath->document !== $ele->ownerDocument) { - $this->xpath = new \DOMXPath($ele->ownerDocument); - } - - foreach ($this->xpath->query('namespace::*[not(.=../../namespace::*)]', $ele) as $nsNode) { - if (!in_array($nsNode->nodeValue, $this->implicitNamespaces)) { - $this->wr(' ')->wr($nsNode->nodeName)->wr('="')->wr($nsNode->nodeValue)->wr('"'); - } - } - } - - /** - * Write the opening tag. - * - * Tags for HTML, MathML, and SVG are in the local name. Otherwise, use the - * qualified name (8.3). - * - * @param \DOMNode $ele The element being written. - */ - protected function openTag($ele) - { - $this->wr('<')->wr($this->traverser->isLocalElement($ele) ? $ele->localName : $ele->tagName); - - $this->attrs($ele); - $this->namespaceAttrs($ele); - - if ($this->outputMode == static::IM_IN_HTML) { - $this->wr('>'); - } // If we are not in html mode we are in SVG, MathML, or XML embedded content. - else { - if ($ele->hasChildNodes()) { - $this->wr('>'); - } // If there are no children this is self closing. - else { - $this->wr(' />'); - } - } - } - - protected function attrs($ele) - { - // FIXME: Needs support for xml, xmlns, xlink, and namespaced elements. - if (!$ele->hasAttributes()) { - return $this; - } - - // TODO: Currently, this always writes name="value", and does not do - // value-less attributes. - $map = $ele->attributes; - $len = $map->length; - for ($i = 0; $i < $len; ++$i) { - $node = $map->item($i); - $val = $this->enc($node->value, true); - - // XXX: The spec says that we need to ensure that anything in - // the XML, XMLNS, or XLink NS's should use the canonical - // prefix. It seems that DOM does this for us already, but there - // may be exceptions. - $name = $node->nodeName; - - // Special handling for attributes in SVG and MathML. - // Using if/elseif instead of switch because it's faster in PHP. - if ($this->outputMode == static::IM_IN_SVG) { - $name = Elements::normalizeSvgAttribute($name); - } elseif ($this->outputMode == static::IM_IN_MATHML) { - $name = Elements::normalizeMathMlAttribute($name); - } - - $this->wr(' ')->wr($name); - - if ((isset($val) && '' !== $val) || $this->nonBooleanAttribute($node)) { - $this->wr('="')->wr($val)->wr('"'); - } - } - } - - protected function nonBooleanAttribute(\DOMAttr $attr) - { - $ele = $attr->ownerElement; - foreach ($this->nonBooleanAttributes as $rule) { - if (isset($rule['nodeNamespace']) && $rule['nodeNamespace'] !== $ele->namespaceURI) { - continue; - } - if (isset($rule['attNamespace']) && $rule['attNamespace'] !== $attr->namespaceURI) { - continue; - } - if (isset($rule['nodeName']) && !is_array($rule['nodeName']) && $rule['nodeName'] !== $ele->localName) { - continue; - } - if (isset($rule['nodeName']) && is_array($rule['nodeName']) && !in_array($ele->localName, $rule['nodeName'], true)) { - continue; - } - if (isset($rule['attrName']) && !is_array($rule['attrName']) && $rule['attrName'] !== $attr->localName) { - continue; - } - if (isset($rule['attrName']) && is_array($rule['attrName']) && !in_array($attr->localName, $rule['attrName'], true)) { - continue; - } - if (isset($rule['xpath'])) { - $xp = $this->getXPath($attr); - if (isset($rule['prefixes'])) { - foreach ($rule['prefixes'] as $nsPrefix => $ns) { - $xp->registerNamespace($nsPrefix, $ns); - } - } - if (!$xp->evaluate($rule['xpath'], $attr)) { - continue; - } - } - - return true; - } - - return false; - } - - private function getXPath(\DOMNode $node) - { - if (!$this->xpath) { - $this->xpath = new \DOMXPath($node->ownerDocument); - } - - return $this->xpath; - } - - /** - * Write the closing tag. - * - * Tags for HTML, MathML, and SVG are in the local name. Otherwise, use the - * qualified name (8.3). - * - * @param \DOMNode $ele The element being written. - */ - protected function closeTag($ele) - { - if ($this->outputMode == static::IM_IN_HTML || $ele->hasChildNodes()) { - $this->wr('wr($this->traverser->isLocalElement($ele) ? $ele->localName : $ele->tagName)->wr('>'); - } - } - - /** - * Write to the output. - * - * @param string $text The string to put into the output - * - * @return $this - */ - protected function wr($text) - { - fwrite($this->out, $text); - - return $this; - } - - /** - * Write a new line character. - * - * @return $this - */ - protected function nl() - { - fwrite($this->out, PHP_EOL); - - return $this; - } - - /** - * Encode text. - * - * When encode is set to false, the default value, the text passed in is - * escaped per section 8.3 of the html5 spec. For details on how text is - * escaped see the escape() method. - * - * When encoding is set to true the text is converted to named character - * references where appropriate. Section 8.1.4 Character references of the - * html5 spec refers to using named character references. This is useful for - * characters that can't otherwise legally be used in the text. - * - * The named character references are listed in section 8.5. - * - * @see http://www.w3.org/TR/2013/CR-html5-20130806/syntax.html#named-character-references True encoding will turn all named character references into their entities. - * This includes such characters as +.# and many other common ones. By default - * encoding here will just escape &'<>". - * - * Note, PHP 5.4+ has better html5 encoding. - * - * @todo Use the Entities class in php 5.3 to have html5 entities. - * - * @param string $text Text to encode. - * @param bool $attribute True if we are encoding an attrubute, false otherwise. - * - * @return string The encoded text. - */ - protected function enc($text, $attribute = false) - { - // Escape the text rather than convert to named character references. - if (!$this->encode) { - return $this->escape($text, $attribute); - } - - // If we are in PHP 5.4+ we can use the native html5 entity functionality to - // convert the named character references. - - if ($this->hasHTML5) { - return htmlentities($text, ENT_HTML5 | ENT_SUBSTITUTE | ENT_QUOTES, 'UTF-8', false); - } // If a version earlier than 5.4 html5 entities are not entirely handled. - // This manually handles them. - else { - return strtr($text, HTML5Entities::$map); - } - } - - /** - * Escape test. - * - * According to the html5 spec section 8.3 Serializing HTML fragments, text - * within tags that are not style, script, xmp, iframe, noembed, and noframes - * need to be properly escaped. - * - * The & should be converted to &, no breaking space unicode characters - * converted to  , when in attribute mode the " should be converted to - * ", and when not in attribute mode the < and > should be converted to - * < and >. - * - * @see http://www.w3.org/TR/2013/CR-html5-20130806/syntax.html#escapingString - * - * @param string $text Text to escape. - * @param bool $attribute True if we are escaping an attrubute, false otherwise. - */ - protected function escape($text, $attribute = false) - { - // Not using htmlspecialchars because, while it does escaping, it doesn't - // match the requirements of section 8.5. For example, it doesn't handle - // non-breaking spaces. - if ($attribute) { - $replace = array( - '"' => '"', - '&' => '&', - "\xc2\xa0" => ' ', - ); - } else { - $replace = array( - '<' => '<', - '>' => '>', - '&' => '&', - "\xc2\xa0" => ' ', - ); - } - - return strtr($text, $replace); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/README.md b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/README.md deleted file mode 100644 index 849a47f3a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# The Serializer (Writer) Model - -The serializer roughly follows sections _8.1 Writing HTML documents_ and section -_8.3 Serializing HTML fragments_ by converting DOMDocument, DOMDocumentFragment, -and DOMNodeList into HTML5. - - [ HTML5 ] // Interface for saving. - || - [ Traverser ] // Walk the DOM - || - [ Rules ] // Convert DOM elements into strings. - || - [ HTML5 ] // HTML5 document or fragment in text. - - -## HTML5 Class - -Provides the top level interface for saving. - -## The Traverser - -Walks the DOM finding each element and passing it off to the output rules to -convert to HTML5. - -## Output Rules - -The output rules are defined in the RulesInterface which can have multiple -implementations. Currently, the OutputRules is the default implementation that -converts a DOM as is into HTML5. - -## HTML5 String - -The output of the process it HTML5 as a string or saved to a file. \ No newline at end of file diff --git a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/RulesInterface.php b/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/RulesInterface.php deleted file mode 100644 index 69a6ecdad..000000000 --- a/fixtures/symfony_5_local_deps/vendor/masterminds/html5/src/HTML5/Serializer/RulesInterface.php +++ /dev/null @@ -1,99 +0,0 @@ - 'html', - 'http://www.w3.org/1998/Math/MathML' => 'math', - 'http://www.w3.org/2000/svg' => 'svg', - ); - - protected $dom; - - protected $options; - - protected $encode = false; - - protected $rules; - - protected $out; - - /** - * Create a traverser. - * - * @param \DOMNode|\DOMNodeList $dom The document or node to traverse. - * @param resource $out A stream that allows writing. The traverser will output into this - * stream. - * @param array $options An array of options for the traverser as key/value pairs. These include: - * - encode_entities: A bool to specify if full encding should happen for all named - * charachter references. Defaults to false which escapes &'<>". - * - output_rules: The path to the class handling the output rules. - */ - public function __construct($dom, $out, RulesInterface $rules, $options = array()) - { - $this->dom = $dom; - $this->out = $out; - $this->rules = $rules; - $this->options = $options; - - $this->rules->setTraverser($this); - } - - /** - * Tell the traverser to walk the DOM. - * - * @return resource $out Returns the output stream. - */ - public function walk() - { - if ($this->dom instanceof \DOMDocument) { - $this->rules->document($this->dom); - } elseif ($this->dom instanceof \DOMDocumentFragment) { - // Document fragments are a special case. Only the children need to - // be serialized. - if ($this->dom->hasChildNodes()) { - $this->children($this->dom->childNodes); - } - } // If NodeList, loop - elseif ($this->dom instanceof \DOMNodeList) { - // If this is a NodeList of DOMDocuments this will not work. - $this->children($this->dom); - } // Else assume this is a DOMNode-like datastructure. - else { - $this->node($this->dom); - } - - return $this->out; - } - - /** - * Process a node in the DOM. - * - * @param mixed $node A node implementing \DOMNode. - */ - public function node($node) - { - // A listing of types is at http://php.net/manual/en/dom.constants.php - switch ($node->nodeType) { - case XML_ELEMENT_NODE: - $this->rules->element($node); - break; - case XML_TEXT_NODE: - $this->rules->text($node); - break; - case XML_CDATA_SECTION_NODE: - $this->rules->cdata($node); - break; - case XML_PI_NODE: - $this->rules->processorInstruction($node); - break; - case XML_COMMENT_NODE: - $this->rules->comment($node); - break; - // Currently we don't support embedding DTDs. - default: - //print ''; - break; - } - } - - /** - * Walk through all the nodes on a node list. - * - * @param \DOMNodeList $nl A list of child elements to walk through. - */ - public function children($nl) - { - foreach ($nl as $node) { - $this->node($node); - } - } - - /** - * Is an element local? - * - * @param mixed $ele An element that implement \DOMNode. - * - * @return bool true if local and false otherwise. - */ - public function isLocalElement($ele) - { - $uri = $ele->namespaceURI; - if (empty($uri)) { - return false; - } - - return isset(static::$local_ns[$uri]); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/CHANGELOG.md b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/CHANGELOG.md deleted file mode 100644 index 13bb05390..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/CHANGELOG.md +++ /dev/null @@ -1,737 +0,0 @@ -### 3.5.0 (2023-10-27) - - * Added ability to indent stack traces in LineFormatter via e.g. `indentStacktraces(' ')` (#1835) - * Added ability to configure a max level name length in LineFormatter via e.g. `setMaxLevelNameLength(3)` (#1850) - * Added support for indexed arrays (i.e. `[]` and not `{}` arrays once json serialized) containing inline linebreaks in LineFormatter (#1818) - * Added `WithMonologChannel` attribute for integrators to use to configure autowiring (#1847) - * Fixed log record `extra` data leaking between handlers that have handler-specific processors set (#1819) - * Fixed LogglyHandler issue with record level filtering (#1841) - * Fixed display_errors parsing in ErrorHandler which did not support string values (#1804) - * Fixed bug where the previous error handler would not be restored in some cases where StreamHandler fails (#1815) - * Fixed normalization error when normalizing incomplete classes (#1833) - -### 3.4.0 (2023-06-21) - - * Added `LoadAverageProcessor` to track one of the 1, 5 or 15min load averages (#1803) - * Added support for priority to the `AsMonologProcessor` attribute (#1797) - * Added `TelegramBotHandler` `topic`/`message_thread_id` support (#1802) - * Fixed `FingersCrossedHandler` passthruLevel checking (#1801) - * Fixed support of yearly and monthly rotation log file to rotate only once a month/year (#1805) - * Fixed `TestHandler` method docs (#1794) - * Fixed handling of falsey `display_errors` string values (#1804) - -### 3.3.1 (2023-02-06) - - * Fixed Logger not being serializable anymore (#1792) - -### 3.3.0 (2023-02-06) - - * Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748) - * Added `ClosureContextProcessor` to allow delaying the creation of context data by setting a Closure in context which is called when the log record is used (#1745) - * Added an ElasticsearchHandler option to set the `op_type` to `create` instead of the default `index` (#1766) - * Added support for enum context values in PsrLogMessageProcessor (#1773) - * Added graylog2/gelf-php 2.x support (#1747) - * Improved `BrowserConsoleHandler` logging to use more appropriate methods than just console.log in the browser (#1739) - * Fixed GitProcessor not filtering correctly based on Level (#1749) - * Fixed `WhatFailureGroupHandler` not catching errors happening inside `close()` (#1791) - * Fixed datetime field in `GoogleCloudLoggingFormatter` (#1758) - * Fixed infinite loop detection within Fibers (#1753) - * Fixed `AmqpHandler->setExtraAttributes` not working with buffering handler wrappers (#1781) - -### 3.2.0 (2022-07-24) - - * Deprecated `CubeHandler` and `PHPConsoleHandler` as both projects are abandoned and those should not be used anymore (#1734) - * Marked `Logger` `@final` as it should not be extended, prefer composition or talk to us if you are missing something - * Added RFC 5424 level (`7` to `0`) support to `Logger::log` and `Logger::addRecord` to increase interoperability (#1723) - * Added `SyslogFormatter` to output syslog-like files which can be consumed by tools like [lnav](https://lnav.org/) (#1689) - * Added support for `__toString` for objects which are not json serializable in `JsonFormatter` (#1733) - * Added `GoogleCloudLoggingFormatter` (#1719) - * Added support for Predis 2.x (#1732) - * Added `AmqpHandler->setExtraAttributes` to allow configuring attributes when using an AMQPExchange (#1724) - * Fixed serialization/unserialization of handlers to make sure private properties are included (#1727) - * Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing `\n` or `\r` sequences (#1720) - * Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726) - * Fixed PHP 8.2 deprecation warnings (#1722) - * Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678) - -### 3.1.0 (2022-06-09) - - * Added `$datetime` parameter to `Logger::addRecord` as low level API to allow logging into the past or future (#1682) - * Added `Logger::useLoggingLoopDetection` to allow disabling cyclic logging detection in concurrent frameworks (#1681) - * Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670) - * Fixed interop issue by removing the need for a return type in ProcessorInterface (#1680) - * Marked the reusable `Monolog\Test\TestCase` class as `@internal` to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677) - * Fixed RotatingFileHandler issue when the date format contained slashes (#1671) - -### 3.0.0 (2022-05-10) - -Changes from RC1 - -- The `Monolog\LevelName` enum does not exist anymore, use `Monolog\Level->getName()` instead. - -### 3.0.0-RC1 (2022-05-08) - -This is mostly a cleanup release offering stronger type guarantees for integrators with the -array->object/enum changes, but there is no big new feature for end users. - -See [UPGRADE notes](UPGRADE.md#300) for details on all breaking changes especially if you are extending/implementing Monolog classes/interfaces. - -Noteworthy BC Breaks: - -- The minimum supported PHP version is now `8.1.0`. -- Log records have been converted from an array to a [`Monolog\LogRecord` object](src/Monolog/LogRecord.php) - with public (and mostly readonly) properties. e.g. instead of doing - `$record['context']` use `$record->context`. - In formatters or handlers if you rather need an array to work with you can use `$record->toArray()` - to get back a Monolog 1/2 style record array. This will contain the enum values instead of enum cases - in the `level` and `level_name` keys to be more backwards compatible and use simpler data types. -- `FormatterInterface`, `HandlerInterface`, `ProcessorInterface`, etc. changed to contain `LogRecord $record` - instead of `array $record` parameter types. If you want to support multiple Monolog versions this should - be possible by type-hinting nothing, or `array|LogRecord` if you support PHP 8.0+. You can then code - against the $record using Monolog 2 style as LogRecord implements ArrayAccess for BC. - The interfaces do not require a `LogRecord` return type even where it would be applicable, but if you only - support Monolog 3 in integration code I would recommend you use `LogRecord` return types wherever fitting - to ensure forward compatibility as it may be added in Monolog 4. -- Log levels are now enums [`Monolog\Level`](src/Monolog/Level.php) and [`Monolog\LevelName`](src/Monolog/LevelName.php) -- Removed deprecated SwiftMailerHandler, migrate to SymfonyMailerHandler instead. -- `ResettableInterface::reset()` now requires a void return type. -- All properties have had types added, which may require you to do so as well if you extended - a Monolog class and declared the same property. - -New deprecations: - -- `Logger::DEBUG`, `Logger::ERROR`, etc. are now deprecated in favor of the `Monolog\Level` enum. - e.g. instead of `Logger::WARNING` use `Level::Warning` if you need to pass the enum case - to Monolog or one of its handlers, or `Level::Warning->value` if you need the integer - value equal to what `Logger::WARNING` was giving you. -- `Logger::getLevelName()` is now deprecated. - -### 2.9.2 (2023-10-27) - - * Fixed display_errors parsing in ErrorHandler which did not support string values (#1804) - * Fixed bug where the previous error handler would not be restored in some cases where StreamHandler fails (#1815) - * Fixed normalization error when normalizing incomplete classes (#1833) - -### 2.9.1 (2023-02-06) - - * Fixed Logger not being serializable anymore (#1792) - -### 2.9.0 (2023-02-05) - - * Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748) - * Added support for enum context values in PsrLogMessageProcessor (#1773) - * Added graylog2/gelf-php 2.x support (#1747) - * Improved `BrowserConsoleHandler` logging to use more appropriate methods than just console.log in the browser (#1739) - * Fixed `WhatFailureGroupHandler` not catching errors happening inside `close()` (#1791) - * Fixed datetime field in `GoogleCloudLoggingFormatter` (#1758) - * Fixed infinite loop detection within Fibers (#1753) - * Fixed `AmqpHandler->setExtraAttributes` not working with buffering handler wrappers (#1781) - -### 2.8.0 (2022-07-24) - - * Deprecated `CubeHandler` and `PHPConsoleHandler` as both projects are abandoned and those should not be used anymore (#1734) - * Added RFC 5424 level (`7` to `0`) support to `Logger::log` and `Logger::addRecord` to increase interoperability (#1723) - * Added support for `__toString` for objects which are not json serializable in `JsonFormatter` (#1733) - * Added `GoogleCloudLoggingFormatter` (#1719) - * Added support for Predis 2.x (#1732) - * Added `AmqpHandler->setExtraAttributes` to allow configuring attributes when using an AMQPExchange (#1724) - * Fixed serialization/unserialization of handlers to make sure private properties are included (#1727) - * Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing `\n` or `\r` sequences (#1720) - * Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726) - * Fixed PHP 8.2 deprecation warnings (#1722) - * Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678) - -### 2.7.0 (2022-06-09) - - * Added `$datetime` parameter to `Logger::addRecord` as low level API to allow logging into the past or future (#1682) - * Added `Logger::useLoggingLoopDetection` to allow disabling cyclic logging detection in concurrent frameworks (#1681) - * Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670) - * Marked the reusable `Monolog\Test\TestCase` class as `@internal` to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677) - * Fixed RotatingFileHandler issue when the date format contained slashes (#1671) - -### 2.6.0 (2022-05-10) - - * Deprecated `SwiftMailerHandler`, use `SymfonyMailerHandler` instead - * Added `SymfonyMailerHandler` (#1663) - * Added ElasticSearch 8.x support to the ElasticsearchHandler (#1662) - * Added a way to filter/modify stack traces in LineFormatter (#1665) - * Fixed UdpSocket not being able to reopen/reconnect after close() - * Fixed infinite loops if a Handler is triggering logging while handling log records - -### 2.5.0 (2022-04-08) - - * Added `callType` to IntrospectionProcessor (#1612) - * Fixed AsMonologProcessor syntax to be compatible with PHP 7.2 (#1651) - -### 2.4.0 (2022-03-14) - - * Added [`Monolog\LogRecord`](src/Monolog/LogRecord.php) interface that can be used to type-hint records like `array|\Monolog\LogRecord $record` to be forward compatible with the upcoming Monolog 3 changes - * Added `includeStacktraces` constructor params to LineFormatter & JsonFormatter (#1603) - * Added `persistent`, `timeout`, `writingTimeout`, `connectionTimeout`, `chunkSize` constructor params to SocketHandler and derivatives (#1600) - * Added `AsMonologProcessor` PHP attribute which can help autowiring / autoconfiguration of processors if frameworks / integrations decide to make use of it. This is useless when used purely with Monolog (#1637) - * Added support for keeping native BSON types as is in MongoDBFormatter (#1620) - * Added support for a `user_agent` key in WebProcessor, disabled by default but you can use it by configuring the $extraFields you want (#1613) - * Added support for username/userIcon in SlackWebhookHandler (#1617) - * Added extension points to BrowserConsoleHandler (#1593) - * Added record message/context/extra info to exceptions thrown when a StreamHandler cannot open its stream to avoid completely losing the data logged (#1630) - * Fixed error handler signature to accept a null $context which happens with internal PHP errors (#1614) - * Fixed a few setter methods not returning `self` (#1609) - * Fixed handling of records going over the max Telegram message length (#1616) - -### 2.3.5 (2021-10-01) - - * Fixed regression in StreamHandler since 2.3.3 on systems with the memory_limit set to >=20GB (#1592) - -### 2.3.4 (2021-09-15) - - * Fixed support for psr/log 3.x (#1589) - -### 2.3.3 (2021-09-14) - - * Fixed memory usage when using StreamHandler and calling stream_get_contents on the resource you passed to it (#1578, #1577) - * Fixed support for psr/log 2.x (#1587) - * Fixed some type annotations - -### 2.3.2 (2021-07-23) - - * Fixed compatibility with PHP 7.2 - 7.4 when experiencing PCRE errors (#1568) - -### 2.3.1 (2021-07-14) - - * Fixed Utils::getClass handling of anonymous classes not being fully compatible with PHP 8 (#1563) - * Fixed some `@inheritDoc` annotations having the wrong case - -### 2.3.0 (2021-07-05) - - * Added a ton of PHPStan type annotations as well as type aliases on Monolog\Logger for Record, Level and LevelName that you can import (#1557) - * Added ability to customize date format when using JsonFormatter (#1561) - * Fixed FilterHandler not calling reset on its internal handler when reset() is called on it (#1531) - * Fixed SyslogUdpHandler not setting the timezone correctly on DateTimeImmutable instances (#1540) - * Fixed StreamHandler thread safety - chunk size set to 2GB now to avoid interlacing when doing concurrent writes (#1553) - -### 2.2.0 (2020-12-14) - - * Added JSON_PARTIAL_OUTPUT_ON_ERROR to default json encoding flags, to avoid dropping entire context data or even records due to an invalid subset of it somewhere - * Added setDateFormat to NormalizerFormatter (and Line/Json formatters by extension) to allow changing this after object creation - * Added RedisPubSubHandler to log records to a Redis channel using PUBLISH - * Added support for Elastica 7, and deprecated the $type argument of ElasticaFormatter which is not in use anymore as of Elastica 7 - * Added support for millisecond write timeouts in SocketHandler, you can now pass floats to setWritingTimeout, e.g. 0.2 is 200ms - * Added support for unix sockets in SyslogUdpHandler (set $port to 0 to make the $host a unix socket) - * Added handleBatch support for TelegramBotHandler - * Added RFC5424e extended date format including milliseconds to SyslogUdpHandler - * Added support for configuring handlers with numeric level values in strings (coming from e.g. env vars) - * Fixed Wildfire/FirePHP/ChromePHP handling of unicode characters - * Fixed PHP 8 issues in SyslogUdpHandler - * Fixed internal type error when mbstring is missing - -### 2.1.1 (2020-07-23) - - * Fixed removing of json encoding options - * Fixed type hint of $level not accepting strings in SendGridHandler and OverflowHandler - * Fixed SwiftMailerHandler not accepting email templates with an empty subject - * Fixed array access on null in RavenHandler - * Fixed unique_id in WebProcessor not being disableable - -### 2.1.0 (2020-05-22) - - * Added `JSON_INVALID_UTF8_SUBSTITUTE` to default json flags, so that invalid UTF8 characters now get converted to [�](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) instead of being converted from ISO-8859-15 to UTF8 as it was before, which was hardly a comprehensive solution - * Added `$ignoreEmptyContextAndExtra` option to JsonFormatter to skip empty context/extra entirely from the output - * Added `$parseMode`, `$disableWebPagePreview` and `$disableNotification` options to TelegramBotHandler - * Added tentative support for PHP 8 - * NormalizerFormatter::addJsonEncodeOption and removeJsonEncodeOption are now public to allow modifying default json flags - * Fixed GitProcessor type error when there is no git repo present - * Fixed normalization of SoapFault objects containing deeply nested objects as "detail" - * Fixed support for relative paths in RotatingFileHandler - -### 2.0.2 (2019-12-20) - - * Fixed ElasticsearchHandler swallowing exceptions details when failing to index log records - * Fixed normalization of SoapFault objects containing non-strings as "detail" in LineFormatter - * Fixed formatting of resources in JsonFormatter - * Fixed RedisHandler failing to use MULTI properly when passed a proxied Redis instance (e.g. in Symfony with lazy services) - * Fixed FilterHandler triggering a notice when handleBatch was filtering all records passed to it - * Fixed Turkish locale messing up the conversion of level names to their constant values - -### 2.0.1 (2019-11-13) - - * Fixed normalization of Traversables to avoid traversing them as not all of them are rewindable - * Fixed setFormatter/getFormatter to forward to the nested handler in FilterHandler, FingersCrossedHandler, BufferHandler, OverflowHandler and SamplingHandler - * Fixed BrowserConsoleHandler formatting when using multiple styles - * Fixed normalization of exception codes to be always integers even for PDOException which have them as numeric strings - * Fixed normalization of SoapFault objects containing non-strings as "detail" - * Fixed json encoding across all handlers to always attempt recovery of non-UTF-8 strings instead of failing the whole encoding - * Fixed ChromePHPHandler to avoid sending more data than latest Chrome versions allow in headers (4KB down from 256KB). - * Fixed type error in BrowserConsoleHandler when the context array of log records was not associative. - -### 2.0.0 (2019-08-30) - - * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release - * BC Break: Logger methods log/debug/info/notice/warning/error/critical/alert/emergency now have explicit void return types - * Added FallbackGroupHandler which works like the WhatFailureGroupHandler but stops dispatching log records as soon as one handler accepted it - * Fixed support for UTF-8 when cutting strings to avoid cutting a multibyte-character in half - * Fixed normalizers handling of exception backtraces to avoid serializing arguments in some cases - * Fixed date timezone handling in SyslogUdpHandler - -### 2.0.0-beta2 (2019-07-06) - - * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release - * BC Break: PHP 7.2 is now the minimum required PHP version. - * BC Break: Removed SlackbotHandler, RavenHandler and HipChatHandler, see [UPGRADE.md](UPGRADE.md) for details - * Added OverflowHandler which will only flush log records to its nested handler when reaching a certain amount of logs (i.e. only pass through when things go really bad) - * Added TelegramBotHandler to log records to a [Telegram](https://core.telegram.org/bots/api) bot account - * Added support for JsonSerializable when normalizing exceptions - * Added support for RFC3164 (outdated BSD syslog protocol) to SyslogUdpHandler - * Added SoapFault details to formatted exceptions - * Fixed DeduplicationHandler silently failing to start when file could not be opened - * Fixed issue in GroupHandler and WhatFailureGroupHandler where setting multiple processors would duplicate records - * Fixed GelfFormatter losing some data when one attachment was too long - * Fixed issue in SignalHandler restarting syscalls functionality - * Improved performance of LogglyHandler when sending multiple logs in a single request - -### 2.0.0-beta1 (2018-12-08) - - * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release - * BC Break: PHP 7.1 is now the minimum required PHP version. - * BC Break: Quite a few interface changes, only relevant if you implemented your own handlers/processors/formatters - * BC Break: Removed non-PSR-3 methods to add records, all the `add*` (e.g. `addWarning`) methods as well as `emerg`, `crit`, `err` and `warn` - * BC Break: The record timezone is now set per Logger instance and not statically anymore - * BC Break: There is no more default handler configured on empty Logger instances - * BC Break: ElasticSearchHandler renamed to ElasticaHandler - * BC Break: Various handler-specific breaks, see [UPGRADE.md](UPGRADE.md) for details - * Added scalar type hints and return hints in all the places it was possible. Switched strict_types on for more reliability. - * Added DateTimeImmutable support, all record datetime are now immutable, and will toString/json serialize with the correct date format, including microseconds (unless disabled) - * Added timezone and microseconds to the default date format - * Added SendGridHandler to use the SendGrid API to send emails - * Added LogmaticHandler to use the Logmatic.io API to store log records - * Added SqsHandler to send log records to an AWS SQS queue - * Added ElasticsearchHandler to send records via the official ES library. Elastica users should now use ElasticaHandler instead of ElasticSearchHandler - * Added NoopHandler which is similar to the NullHandle but does not prevent the bubbling of log records to handlers further down the configuration, useful for temporarily disabling a handler in configuration files - * Added ProcessHandler to write log output to the STDIN of a given process - * Added HostnameProcessor that adds the machine's hostname to log records - * Added a `$dateFormat` option to the PsrLogMessageProcessor which lets you format DateTime instances nicely - * Added support for the PHP 7.x `mongodb` extension in the MongoDBHandler - * Fixed many minor issues in various handlers, and probably added a few regressions too - -### 1.26.1 (2021-05-28) - - * Fixed PHP 8.1 deprecation warning - -### 1.26.0 (2020-12-14) - - * Added $dateFormat and $removeUsedContextFields arguments to PsrLogMessageProcessor (backport from 2.x) - -### 1.25.5 (2020-07-23) - - * Fixed array access on null in RavenHandler - * Fixed unique_id in WebProcessor not being disableable - -### 1.25.4 (2020-05-22) - - * Fixed GitProcessor type error when there is no git repo present - * Fixed normalization of SoapFault objects containing deeply nested objects as "detail" - * Fixed support for relative paths in RotatingFileHandler - -### 1.25.3 (2019-12-20) - - * Fixed formatting of resources in JsonFormatter - * Fixed RedisHandler failing to use MULTI properly when passed a proxied Redis instance (e.g. in Symfony with lazy services) - * Fixed FilterHandler triggering a notice when handleBatch was filtering all records passed to it - * Fixed Turkish locale messing up the conversion of level names to their constant values - -### 1.25.2 (2019-11-13) - - * Fixed normalization of Traversables to avoid traversing them as not all of them are rewindable - * Fixed setFormatter/getFormatter to forward to the nested handler in FilterHandler, FingersCrossedHandler, BufferHandler and SamplingHandler - * Fixed BrowserConsoleHandler formatting when using multiple styles - * Fixed normalization of exception codes to be always integers even for PDOException which have them as numeric strings - * Fixed normalization of SoapFault objects containing non-strings as "detail" - * Fixed json encoding across all handlers to always attempt recovery of non-UTF-8 strings instead of failing the whole encoding - -### 1.25.1 (2019-09-06) - - * Fixed forward-compatible interfaces to be compatible with Monolog 1.x too. - -### 1.25.0 (2019-09-06) - - * Deprecated SlackbotHandler, use SlackWebhookHandler or SlackHandler instead - * Deprecated RavenHandler, use sentry/sentry 2.x and their Sentry\Monolog\Handler instead - * Deprecated HipChatHandler, migrate to Slack and use SlackWebhookHandler or SlackHandler instead - * Added forward-compatible interfaces and traits FormattableHandlerInterface, FormattableHandlerTrait, ProcessableHandlerInterface, ProcessableHandlerTrait. If you use modern PHP and want to make code compatible with Monolog 1 and 2 this can help. You will have to require at least Monolog 1.25 though. - * Added support for RFC3164 (outdated BSD syslog protocol) to SyslogUdpHandler - * Fixed issue in GroupHandler and WhatFailureGroupHandler where setting multiple processors would duplicate records - * Fixed issue in SignalHandler restarting syscalls functionality - * Fixed normalizers handling of exception backtraces to avoid serializing arguments in some cases - * Fixed ZendMonitorHandler to work with the latest Zend Server versions - * Fixed ChromePHPHandler to avoid sending more data than latest Chrome versions allow in headers (4KB down from 256KB). - -### 1.24.0 (2018-11-05) - - * BC Notice: If you are extending any of the Monolog's Formatters' `normalize` method, make sure you add the new `$depth = 0` argument to your function signature to avoid strict PHP warnings. - * Added a `ResettableInterface` in order to reset/reset/clear/flush handlers and processors - * Added a `ProcessorInterface` as an optional way to label a class as being a processor (mostly useful for autowiring dependency containers) - * Added a way to log signals being received using Monolog\SignalHandler - * Added ability to customize error handling at the Logger level using Logger::setExceptionHandler - * Added InsightOpsHandler to migrate users of the LogEntriesHandler - * Added protection to NormalizerFormatter against circular and very deep structures, it now stops normalizing at a depth of 9 - * Added capture of stack traces to ErrorHandler when logging PHP errors - * Added RavenHandler support for a `contexts` context or extra key to forward that to Sentry's contexts - * Added forwarding of context info to FluentdFormatter - * Added SocketHandler::setChunkSize to override the default chunk size in case you must send large log lines to rsyslog for example - * Added ability to extend/override BrowserConsoleHandler - * Added SlackWebhookHandler::getWebhookUrl and SlackHandler::getToken to enable class extensibility - * Added SwiftMailerHandler::getSubjectFormatter to enable class extensibility - * Dropped official support for HHVM in test builds - * Fixed normalization of exception traces when call_user_func is used to avoid serializing objects and the data they contain - * Fixed naming of fields in Slack handler, all field names are now capitalized in all cases - * Fixed HipChatHandler bug where slack dropped messages randomly - * Fixed normalization of objects in Slack handlers - * Fixed support for PHP7's Throwable in NewRelicHandler - * Fixed race bug when StreamHandler sometimes incorrectly reported it failed to create a directory - * Fixed table row styling issues in HtmlFormatter - * Fixed RavenHandler dropping the message when logging exception - * Fixed WhatFailureGroupHandler skipping processors when using handleBatch - and implement it where possible - * Fixed display of anonymous class names - -### 1.23.0 (2017-06-19) - - * Improved SyslogUdpHandler's support for RFC5424 and added optional `$ident` argument - * Fixed GelfHandler truncation to be per field and not per message - * Fixed compatibility issue with PHP <5.3.6 - * Fixed support for headless Chrome in ChromePHPHandler - * Fixed support for latest Aws SDK in DynamoDbHandler - * Fixed support for SwiftMailer 6.0+ in SwiftMailerHandler - -### 1.22.1 (2017-03-13) - - * Fixed lots of minor issues in the new Slack integrations - * Fixed support for allowInlineLineBreaks in LineFormatter when formatting exception backtraces - -### 1.22.0 (2016-11-26) - - * Added SlackbotHandler and SlackWebhookHandler to set up Slack integration more easily - * Added MercurialProcessor to add mercurial revision and branch names to log records - * Added support for AWS SDK v3 in DynamoDbHandler - * Fixed fatal errors occurring when normalizing generators that have been fully consumed - * Fixed RollbarHandler to include a level (rollbar level), monolog_level (original name), channel and datetime (unix) - * Fixed RollbarHandler not flushing records automatically, calling close() explicitly is not necessary anymore - * Fixed SyslogUdpHandler to avoid sending empty frames - * Fixed a few PHP 7.0 and 7.1 compatibility issues - -### 1.21.0 (2016-07-29) - - * Break: Reverted the addition of $context when the ErrorHandler handles regular php errors from 1.20.0 as it was causing issues - * Added support for more formats in RotatingFileHandler::setFilenameFormat as long as they have Y, m and d in order - * Added ability to format the main line of text the SlackHandler sends by explicitly setting a formatter on the handler - * Added information about SoapFault instances in NormalizerFormatter - * Added $handleOnlyReportedErrors option on ErrorHandler::registerErrorHandler (default true) to allow logging of all errors no matter the error_reporting level - -### 1.20.0 (2016-07-02) - - * Added FingersCrossedHandler::activate() to manually trigger the handler regardless of the activation policy - * Added StreamHandler::getUrl to retrieve the stream's URL - * Added ability to override addRow/addTitle in HtmlFormatter - * Added the $context to context information when the ErrorHandler handles a regular php error - * Deprecated RotatingFileHandler::setFilenameFormat to only support 3 formats: Y, Y-m and Y-m-d - * Fixed WhatFailureGroupHandler to work with PHP7 throwables - * Fixed a few minor bugs - -### 1.19.0 (2016-04-12) - - * Break: StreamHandler will not close streams automatically that it does not own. If you pass in a stream (not a path/url), then it will not close it for you. You can retrieve those using getStream() if needed - * Added DeduplicationHandler to remove duplicate records from notifications across multiple requests, useful for email or other notifications on errors - * Added ability to use `%message%` and other LineFormatter replacements in the subject line of emails sent with NativeMailHandler and SwiftMailerHandler - * Fixed HipChatHandler handling of long messages - -### 1.18.2 (2016-04-02) - - * Fixed ElasticaFormatter to use more precise dates - * Fixed GelfMessageFormatter sending too long messages - -### 1.18.1 (2016-03-13) - - * Fixed SlackHandler bug where slack dropped messages randomly - * Fixed RedisHandler issue when using with the PHPRedis extension - * Fixed AmqpHandler content-type being incorrectly set when using with the AMQP extension - * Fixed BrowserConsoleHandler regression - -### 1.18.0 (2016-03-01) - - * Added optional reduction of timestamp precision via `Logger->useMicrosecondTimestamps(false)`, disabling it gets you a bit of performance boost but reduces the precision to the second instead of microsecond - * Added possibility to skip some extra stack frames in IntrospectionProcessor if you have some library wrapping Monolog that is always adding frames - * Added `Logger->withName` to clone a logger (keeping all handlers) with a new name - * Added FluentdFormatter for the Fluentd unix socket protocol - * Added HandlerWrapper base class to ease the creation of handler wrappers, just extend it and override as needed - * Added support for replacing context sub-keys using `%context.*%` in LineFormatter - * Added support for `payload` context value in RollbarHandler - * Added setRelease to RavenHandler to describe the application version, sent with every log - * Added support for `fingerprint` context value in RavenHandler - * Fixed JSON encoding errors that would gobble up the whole log record, we now handle those more gracefully by dropping chars as needed - * Fixed write timeouts in SocketHandler and derivatives, set to 10sec by default, lower it with `setWritingTimeout()` - * Fixed PHP7 compatibility with regard to Exception/Throwable handling in a few places - -### 1.17.2 (2015-10-14) - - * Fixed ErrorHandler compatibility with non-Monolog PSR-3 loggers - * Fixed SlackHandler handling to use slack functionalities better - * Fixed SwiftMailerHandler bug when sending multiple emails they all had the same id - * Fixed 5.3 compatibility regression - -### 1.17.1 (2015-08-31) - - * Fixed RollbarHandler triggering PHP notices - -### 1.17.0 (2015-08-30) - - * Added support for `checksum` and `release` context/extra values in RavenHandler - * Added better support for exceptions in RollbarHandler - * Added UidProcessor::getUid - * Added support for showing the resource type in NormalizedFormatter - * Fixed IntrospectionProcessor triggering PHP notices - -### 1.16.0 (2015-08-09) - - * Added IFTTTHandler to notify ifttt.com triggers - * Added Logger::setHandlers() to allow setting/replacing all handlers - * Added $capSize in RedisHandler to cap the log size - * Fixed StreamHandler creation of directory to only trigger when the first log write happens - * Fixed bug in the handling of curl failures - * Fixed duplicate logging of fatal errors when both error and fatal error handlers are registered in monolog's ErrorHandler - * Fixed missing fatal errors records with handlers that need to be closed to flush log records - * Fixed TagProcessor::addTags support for associative arrays - -### 1.15.0 (2015-07-12) - - * Added addTags and setTags methods to change a TagProcessor - * Added automatic creation of directories if they are missing for a StreamHandler to open a log file - * Added retry functionality to Loggly, Cube and Mandrill handlers so they retry up to 5 times in case of network failure - * Fixed process exit code being incorrectly reset to 0 if ErrorHandler::registerExceptionHandler was used - * Fixed HTML/JS escaping in BrowserConsoleHandler - * Fixed JSON encoding errors being silently suppressed (PHP 5.5+ only) - -### 1.14.0 (2015-06-19) - - * Added PHPConsoleHandler to send record to Chrome's PHP Console extension and library - * Added support for objects implementing __toString in the NormalizerFormatter - * Added support for HipChat's v2 API in HipChatHandler - * Added Logger::setTimezone() to initialize the timezone monolog should use in case date.timezone isn't correct for your app - * Added an option to send formatted message instead of the raw record on PushoverHandler via ->useFormattedMessage(true) - * Fixed curl errors being silently suppressed - -### 1.13.1 (2015-03-09) - - * Fixed regression in HipChat requiring a new token to be created - -### 1.13.0 (2015-03-05) - - * Added Registry::hasLogger to check for the presence of a logger instance - * Added context.user support to RavenHandler - * Added HipChat API v2 support in the HipChatHandler - * Added NativeMailerHandler::addParameter to pass params to the mail() process - * Added context data to SlackHandler when $includeContextAndExtra is true - * Added ability to customize the Swift_Message per-email in SwiftMailerHandler - * Fixed SwiftMailerHandler to lazily create message instances if a callback is provided - * Fixed serialization of INF and NaN values in Normalizer and LineFormatter - -### 1.12.0 (2014-12-29) - - * Break: HandlerInterface::isHandling now receives a partial record containing only a level key. This was always the intent and does not break any Monolog handler but is strictly speaking a BC break and you should check if you relied on any other field in your own handlers. - * Added PsrHandler to forward records to another PSR-3 logger - * Added SamplingHandler to wrap around a handler and include only every Nth record - * Added MongoDBFormatter to support better storage with MongoDBHandler (it must be enabled manually for now) - * Added exception codes in the output of most formatters - * Added LineFormatter::includeStacktraces to enable exception stack traces in logs (uses more than one line) - * Added $useShortAttachment to SlackHandler to minify attachment size and $includeExtra to append extra data - * Added $host to HipChatHandler for users of private instances - * Added $transactionName to NewRelicHandler and support for a transaction_name context value - * Fixed MandrillHandler to avoid outputting API call responses - * Fixed some non-standard behaviors in SyslogUdpHandler - -### 1.11.0 (2014-09-30) - - * Break: The NewRelicHandler extra and context data are now prefixed with extra_ and context_ to avoid clashes. Watch out if you have scripts reading those from the API and rely on names - * Added WhatFailureGroupHandler to suppress any exception coming from the wrapped handlers and avoid chain failures if a logging service fails - * Added MandrillHandler to send emails via the Mandrillapp.com API - * Added SlackHandler to log records to a Slack.com account - * Added FleepHookHandler to log records to a Fleep.io account - * Added LogglyHandler::addTag to allow adding tags to an existing handler - * Added $ignoreEmptyContextAndExtra to LineFormatter to avoid empty [] at the end - * Added $useLocking to StreamHandler and RotatingFileHandler to enable flock() while writing - * Added support for PhpAmqpLib in the AmqpHandler - * Added FingersCrossedHandler::clear and BufferHandler::clear to reset them between batches in long running jobs - * Added support for adding extra fields from $_SERVER in the WebProcessor - * Fixed support for non-string values in PrsLogMessageProcessor - * Fixed SwiftMailer messages being sent with the wrong date in long running scripts - * Fixed minor PHP 5.6 compatibility issues - * Fixed BufferHandler::close being called twice - -### 1.10.0 (2014-06-04) - - * Added Logger::getHandlers() and Logger::getProcessors() methods - * Added $passthruLevel argument to FingersCrossedHandler to let it always pass some records through even if the trigger level is not reached - * Added support for extra data in NewRelicHandler - * Added $expandNewlines flag to the ErrorLogHandler to create multiple log entries when a message has multiple lines - -### 1.9.1 (2014-04-24) - - * Fixed regression in RotatingFileHandler file permissions - * Fixed initialization of the BufferHandler to make sure it gets flushed after receiving records - * Fixed ChromePHPHandler and FirePHPHandler's activation strategies to be more conservative - -### 1.9.0 (2014-04-20) - - * Added LogEntriesHandler to send logs to a LogEntries account - * Added $filePermissions to tweak file mode on StreamHandler and RotatingFileHandler - * Added $useFormatting flag to MemoryProcessor to make it send raw data in bytes - * Added support for table formatting in FirePHPHandler via the table context key - * Added a TagProcessor to add tags to records, and support for tags in RavenHandler - * Added $appendNewline flag to the JsonFormatter to enable using it when logging to files - * Added sound support to the PushoverHandler - * Fixed multi-threading support in StreamHandler - * Fixed empty headers issue when ChromePHPHandler received no records - * Fixed default format of the ErrorLogHandler - -### 1.8.0 (2014-03-23) - - * Break: the LineFormatter now strips newlines by default because this was a bug, set $allowInlineLineBreaks to true if you need them - * Added BrowserConsoleHandler to send logs to any browser's console via console.log() injection in the output - * Added FilterHandler to filter records and only allow those of a given list of levels through to the wrapped handler - * Added FlowdockHandler to send logs to a Flowdock account - * Added RollbarHandler to send logs to a Rollbar account - * Added HtmlFormatter to send prettier log emails with colors for each log level - * Added GitProcessor to add the current branch/commit to extra record data - * Added a Monolog\Registry class to allow easier global access to pre-configured loggers - * Added support for the new official graylog2/gelf-php lib for GelfHandler, upgrade if you can by replacing the mlehner/gelf-php requirement - * Added support for HHVM - * Added support for Loggly batch uploads - * Added support for tweaking the content type and encoding in NativeMailerHandler - * Added $skipClassesPartials to tweak the ignored classes in the IntrospectionProcessor - * Fixed batch request support in GelfHandler - -### 1.7.0 (2013-11-14) - - * Added ElasticSearchHandler to send logs to an Elastic Search server - * Added DynamoDbHandler and ScalarFormatter to send logs to Amazon's Dynamo DB - * Added SyslogUdpHandler to send logs to a remote syslogd server - * Added LogglyHandler to send logs to a Loggly account - * Added $level to IntrospectionProcessor so it only adds backtraces when needed - * Added $version to LogstashFormatter to allow using the new v1 Logstash format - * Added $appName to NewRelicHandler - * Added configuration of Pushover notification retries/expiry - * Added $maxColumnWidth to NativeMailerHandler to change the 70 chars default - * Added chainability to most setters for all handlers - * Fixed RavenHandler batch processing so it takes the message from the record with highest priority - * Fixed HipChatHandler batch processing so it sends all messages at once - * Fixed issues with eAccelerator - * Fixed and improved many small things - -### 1.6.0 (2013-07-29) - - * Added HipChatHandler to send logs to a HipChat chat room - * Added ErrorLogHandler to send logs to PHP's error_log function - * Added NewRelicHandler to send logs to NewRelic's service - * Added Monolog\ErrorHandler helper class to register a Logger as exception/error/fatal handler - * Added ChannelLevelActivationStrategy for the FingersCrossedHandler to customize levels by channel - * Added stack traces output when normalizing exceptions (json output & co) - * Added Monolog\Logger::API constant (currently 1) - * Added support for ChromePHP's v4.0 extension - * Added support for message priorities in PushoverHandler, see $highPriorityLevel and $emergencyLevel - * Added support for sending messages to multiple users at once with the PushoverHandler - * Fixed RavenHandler's support for batch sending of messages (when behind a Buffer or FingersCrossedHandler) - * Fixed normalization of Traversables with very large data sets, only the first 1000 items are shown now - * Fixed issue in RotatingFileHandler when an open_basedir restriction is active - * Fixed minor issues in RavenHandler and bumped the API to Raven 0.5.0 - * Fixed SyslogHandler issue when many were used concurrently with different facilities - -### 1.5.0 (2013-04-23) - - * Added ProcessIdProcessor to inject the PID in log records - * Added UidProcessor to inject a unique identifier to all log records of one request/run - * Added support for previous exceptions in the LineFormatter exception serialization - * Added Monolog\Logger::getLevels() to get all available levels - * Fixed ChromePHPHandler so it avoids sending headers larger than Chrome can handle - -### 1.4.1 (2013-04-01) - - * Fixed exception formatting in the LineFormatter to be more minimalistic - * Fixed RavenHandler's handling of context/extra data, requires Raven client >0.1.0 - * Fixed log rotation in RotatingFileHandler to work with long running scripts spanning multiple days - * Fixed WebProcessor array access so it checks for data presence - * Fixed Buffer, Group and FingersCrossed handlers to make use of their processors - -### 1.4.0 (2013-02-13) - - * Added RedisHandler to log to Redis via the Predis library or the phpredis extension - * Added ZendMonitorHandler to log to the Zend Server monitor - * Added the possibility to pass arrays of handlers and processors directly in the Logger constructor - * Added `$useSSL` option to the PushoverHandler which is enabled by default - * Fixed ChromePHPHandler and FirePHPHandler issue when multiple instances are used simultaneously - * Fixed header injection capability in the NativeMailHandler - -### 1.3.1 (2013-01-11) - - * Fixed LogstashFormatter to be usable with stream handlers - * Fixed GelfMessageFormatter levels on Windows - -### 1.3.0 (2013-01-08) - - * Added PSR-3 compliance, the `Monolog\Logger` class is now an instance of `Psr\Log\LoggerInterface` - * Added PsrLogMessageProcessor that you can selectively enable for full PSR-3 compliance - * Added LogstashFormatter (combine with SocketHandler or StreamHandler to send logs to Logstash) - * Added PushoverHandler to send mobile notifications - * Added CouchDBHandler and DoctrineCouchDBHandler - * Added RavenHandler to send data to Sentry servers - * Added support for the new MongoClient class in MongoDBHandler - * Added microsecond precision to log records' timestamps - * Added `$flushOnOverflow` param to BufferHandler to flush by batches instead of losing - the oldest entries - * Fixed normalization of objects with cyclic references - -### 1.2.1 (2012-08-29) - - * Added new $logopts arg to SyslogHandler to provide custom openlog options - * Fixed fatal error in SyslogHandler - -### 1.2.0 (2012-08-18) - - * Added AmqpHandler (for use with AMQP servers) - * Added CubeHandler - * Added NativeMailerHandler::addHeader() to send custom headers in mails - * Added the possibility to specify more than one recipient in NativeMailerHandler - * Added the possibility to specify float timeouts in SocketHandler - * Added NOTICE and EMERGENCY levels to conform with RFC 5424 - * Fixed the log records to use the php default timezone instead of UTC - * Fixed BufferHandler not being flushed properly on PHP fatal errors - * Fixed normalization of exotic resource types - * Fixed the default format of the SyslogHandler to avoid duplicating datetimes in syslog - -### 1.1.0 (2012-04-23) - - * Added Monolog\Logger::isHandling() to check if a handler will - handle the given log level - * Added ChromePHPHandler - * Added MongoDBHandler - * Added GelfHandler (for use with Graylog2 servers) - * Added SocketHandler (for use with syslog-ng for example) - * Added NormalizerFormatter - * Added the possibility to change the activation strategy of the FingersCrossedHandler - * Added possibility to show microseconds in logs - * Added `server` and `referer` to WebProcessor output - -### 1.0.2 (2011-10-24) - - * Fixed bug in IE with large response headers and FirePHPHandler - -### 1.0.1 (2011-08-25) - - * Added MemoryPeakUsageProcessor and MemoryUsageProcessor - * Added Monolog\Logger::getName() to get a logger's channel name - -### 1.0.0 (2011-07-06) - - * Added IntrospectionProcessor to get info from where the logger was called - * Fixed WebProcessor in CLI - -### 1.0.0-RC1 (2011-07-01) - - * Initial release diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/LICENSE b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/LICENSE deleted file mode 100644 index aa2a0426c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011-2020 Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/README.md b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/README.md deleted file mode 100644 index d7151de4f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/README.md +++ /dev/null @@ -1,120 +0,0 @@ -![Monolog](logo.jpg) - -# Monolog - Logging for PHP [![Continuous Integration](https://github.com/Seldaek/monolog/workflows/Continuous%20Integration/badge.svg?branch=main)](https://github.com/Seldaek/monolog/actions) - -[![Total Downloads](https://img.shields.io/packagist/dt/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) -[![Latest Stable Version](https://img.shields.io/packagist/v/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) - ->**Note** This is the **documentation for Monolog 3.x**, if you are using older releases ->see the documentation for [Monolog 2.x](https://github.com/Seldaek/monolog/blob/2.x/README.md) or [Monolog 1.x](https://github.com/Seldaek/monolog/blob/1.x/README.md) - -Monolog sends your logs to files, sockets, inboxes, databases and various -web services. See the complete list of handlers below. Special handlers -allow you to build advanced logging strategies. - -This library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) -interface that you can type-hint against in your own libraries to keep -a maximum of interoperability. You can also use it in your applications to -make sure you can always use another compatible logger at a later time. -As of 1.11.0 Monolog public APIs will also accept PSR-3 log levels. -Internally Monolog still uses its own level scheme since it predates PSR-3. - -## Installation - -Install the latest version with - -```bash -$ composer require monolog/monolog -``` - -## Basic Usage - -```php -pushHandler(new StreamHandler('path/to/your.log', Level::Warning)); - -// add records to the log -$log->warning('Foo'); -$log->error('Bar'); -``` - -## Documentation - -- [Usage Instructions](doc/01-usage.md) -- [Handlers, Formatters and Processors](doc/02-handlers-formatters-processors.md) -- [Utility Classes](doc/03-utilities.md) -- [Extending Monolog](doc/04-extending.md) -- [Log Record Structure](doc/message-structure.md) - -## Support Monolog Financially - -Get supported Monolog and help fund the project with the [Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-monolog-monolog?utm_source=packagist-monolog-monolog&utm_medium=referral&utm_campaign=enterprise) or via [GitHub sponsorship](https://github.com/sponsors/Seldaek). - -Tidelift delivers commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. - -## Third Party Packages - -Third party handlers, formatters and processors are -[listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You -can also add your own there if you publish one. - -## About - -### Requirements - -- Monolog `^3.0` works with PHP 8.1 or above. -- Monolog `^2.5` works with PHP 7.2 or above. -- Monolog `^1.25` works with PHP 5.3 up to 8.1, but is not very maintained anymore and will not receive PHP support fixes anymore. - -### Support - -Monolog 1.x support is somewhat limited at this point and only important fixes will be done. You should migrate to Monolog 2 or 3 where possible to benefit from all the latest features and fixes. - -### Submitting bugs and feature requests - -Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues) - -### Framework Integrations - -- Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) - can be used very easily with Monolog since it implements the interface. -- [Symfony](http://symfony.com) comes out of the box with Monolog. -- [Laravel](http://laravel.com/) comes out of the box with Monolog. -- [Lumen](http://lumen.laravel.com/) comes out of the box with Monolog. -- [PPI](https://github.com/ppi/framework) comes out of the box with Monolog. -- [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin. -- [Slim](http://www.slimframework.com/) is usable with Monolog via the [Slim-Monolog](https://github.com/Flynsarmy/Slim-Monolog) log writer. -- [XOOPS 2.6](http://xoops.org/) comes out of the box with Monolog. -- [Aura.Web_Project](https://github.com/auraphp/Aura.Web_Project) comes out of the box with Monolog. -- [Nette Framework](http://nette.org/en/) is usable with Monolog via the [contributte/monolog](https://github.com/contributte/monolog) or [orisai/nette-monolog](https://github.com/orisai/nette-monolog) extensions. -- [Proton Micro Framework](https://github.com/alexbilbie/Proton) comes out of the box with Monolog. -- [FuelPHP](http://fuelphp.com/) comes out of the box with Monolog. -- [Equip Framework](https://github.com/equip/framework) comes out of the box with Monolog. -- [Yii 2](http://www.yiiframework.com/) is usable with Monolog via the [yii2-monolog](https://github.com/merorafael/yii2-monolog) or [yii2-psr-log-target](https://github.com/samdark/yii2-psr-log-target) plugins. -- [Hawkbit Micro Framework](https://github.com/HawkBitPhp/hawkbit) comes out of the box with Monolog. -- [SilverStripe 4](https://www.silverstripe.org/) comes out of the box with Monolog. -- [Drupal](https://www.drupal.org/) is usable with Monolog via the [monolog](https://www.drupal.org/project/monolog) module. -- [Aimeos ecommerce framework](https://aimeos.org/) is usable with Monolog via the [ai-monolog](https://github.com/aimeos/ai-monolog) extension. -- [Magento](https://magento.com/) comes out of the box with Monolog. -- [Spiral Framework](https://spiral.dev) comes out of the box with Monolog bridge. - -### Author - -Jordi Boggiano - -
-See also the list of [contributors](https://github.com/Seldaek/monolog/contributors) who participated in this project. - -### License - -Monolog is licensed under the MIT License - see the [LICENSE](LICENSE) file for details - -### Acknowledgements - -This library is heavily inspired by Python's [Logbook](https://logbook.readthedocs.io/en/stable/) -library, although most concepts have been adjusted to fit to the PHP world. diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/composer.json b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/composer.json deleted file mode 100644 index 4ccd07211..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/composer.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "monolog/monolog", - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "keywords": ["log", "logging", "psr-3"], - "homepage": "https://github.com/Seldaek/monolog", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "require": { - "php": ">=8.1", - "psr/log": "^2.0 || ^3.0" - }, - "require-dev": { - "ext-json": "*", - "aws/aws-sdk-php": "^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "graylog2/gelf-php": "^1.4.2 || ^2.0", - "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.1", - "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-openssl": "Required to send log messages using SSL" - }, - "autoload": { - "psr-4": {"Monolog\\": "src/Monolog"} - }, - "autoload-dev": { - "psr-4": {"Monolog\\": "tests/Monolog"} - }, - "provide": { - "psr/log-implementation": "3.0.0" - }, - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "scripts": { - "test": "@php vendor/bin/phpunit", - "phpstan": "@php vendor/bin/phpstan analyse" - }, - "config": { - "lock": false, - "sort-packages": true, - "platform-check": false - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php deleted file mode 100644 index c519e0537..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Attribute; - -/** - * A reusable attribute to help configure a class or a method as a processor. - * - * Using it offers no guarantee: it needs to be leveraged by a Monolog third-party consumer. - * - * Using it with the Monolog library only has no effect at all: processors should still be turned into a callable if - * needed and manually pushed to the loggers and to the processable handlers. - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class AsMonologProcessor -{ - /** - * @param string|null $channel The logging channel the processor should be pushed to. - * @param string|null $handler The handler the processor should be pushed to. - * @param string|null $method The method that processes the records (if the attribute is used at the class level). - * @param int|null $priority The priority of the processor so the order can be determined. - */ - public function __construct( - public readonly ?string $channel = null, - public readonly ?string $handler = null, - public readonly ?string $method = null, - public readonly ?int $priority = null - ) { - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php deleted file mode 100644 index 274b73ea1..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use DateTimeZone; - -/** - * Overrides default json encoding of date time objects - * - * @author Menno Holtkamp - * @author Jordi Boggiano - */ -class DateTimeImmutable extends \DateTimeImmutable implements \JsonSerializable -{ - private bool $useMicroseconds; - - public function __construct(bool $useMicroseconds, ?DateTimeZone $timezone = null) - { - $this->useMicroseconds = $useMicroseconds; - - parent::__construct('now', $timezone); - } - - public function jsonSerialize(): string - { - if ($this->useMicroseconds) { - return $this->format('Y-m-d\TH:i:s.uP'); - } - - return $this->format('Y-m-d\TH:i:sP'); - } - - public function __toString(): string - { - return $this->jsonSerialize(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/ErrorHandler.php deleted file mode 100644 index 08d414b34..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/ErrorHandler.php +++ /dev/null @@ -1,279 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Closure; -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; - -/** - * Monolog error handler - * - * A facility to enable logging of runtime errors, exceptions and fatal errors. - * - * Quick setup: ErrorHandler::register($logger); - * - * @author Jordi Boggiano - */ -class ErrorHandler -{ - private Closure|null $previousExceptionHandler = null; - - /** @var array an array of class name to LogLevel::* constant mapping */ - private array $uncaughtExceptionLevelMap = []; - - /** @var Closure|true|null */ - private Closure|bool|null $previousErrorHandler = null; - - /** @var array an array of E_* constant to LogLevel::* constant mapping */ - private array $errorLevelMap = []; - - private bool $handleOnlyReportedErrors = true; - - private bool $hasFatalErrorHandler = false; - - private string $fatalLevel = LogLevel::ALERT; - - private string|null $reservedMemory = null; - - /** @var ?array{type: int, message: string, file: string, line: int, trace: mixed} */ - private array|null $lastFatalData = null; - - private const FATAL_ERRORS = [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR]; - - public function __construct( - private LoggerInterface $logger - ) { - } - - /** - * Registers a new ErrorHandler for a given Logger - * - * By default it will handle errors, exceptions and fatal errors - * - * @param array|false $errorLevelMap an array of E_* constant to LogLevel::* constant mapping, or false to disable error handling - * @param array|false $exceptionLevelMap an array of class name to LogLevel::* constant mapping, or false to disable exception handling - * @param LogLevel::*|null|false $fatalLevel a LogLevel::* constant, null to use the default LogLevel::ALERT or false to disable fatal error handling - * @return static - */ - public static function register(LoggerInterface $logger, $errorLevelMap = [], $exceptionLevelMap = [], $fatalLevel = null): self - { - /** @phpstan-ignore-next-line */ - $handler = new static($logger); - if ($errorLevelMap !== false) { - $handler->registerErrorHandler($errorLevelMap); - } - if ($exceptionLevelMap !== false) { - $handler->registerExceptionHandler($exceptionLevelMap); - } - if ($fatalLevel !== false) { - $handler->registerFatalHandler($fatalLevel); - } - - return $handler; - } - - /** - * @param array $levelMap an array of class name to LogLevel::* constant mapping - * @return $this - */ - public function registerExceptionHandler(array $levelMap = [], bool $callPrevious = true): self - { - $prev = set_exception_handler(function (\Throwable $e): void { - $this->handleException($e); - }); - $this->uncaughtExceptionLevelMap = $levelMap; - foreach ($this->defaultExceptionLevelMap() as $class => $level) { - if (!isset($this->uncaughtExceptionLevelMap[$class])) { - $this->uncaughtExceptionLevelMap[$class] = $level; - } - } - if ($callPrevious && null !== $prev) { - $this->previousExceptionHandler = $prev(...); - } - - return $this; - } - - /** - * @param array $levelMap an array of E_* constant to LogLevel::* constant mapping - * @return $this - */ - public function registerErrorHandler(array $levelMap = [], bool $callPrevious = true, int $errorTypes = -1, bool $handleOnlyReportedErrors = true): self - { - $prev = set_error_handler($this->handleError(...), $errorTypes); - $this->errorLevelMap = array_replace($this->defaultErrorLevelMap(), $levelMap); - if ($callPrevious) { - $this->previousErrorHandler = $prev !== null ? $prev(...) : true; - } else { - $this->previousErrorHandler = null; - } - - $this->handleOnlyReportedErrors = $handleOnlyReportedErrors; - - return $this; - } - - /** - * @param LogLevel::*|null $level a LogLevel::* constant, null to use the default LogLevel::ALERT - * @param int $reservedMemorySize Amount of KBs to reserve in memory so that it can be freed when handling fatal errors giving Monolog some room in memory to get its job done - * @return $this - */ - public function registerFatalHandler($level = null, int $reservedMemorySize = 20): self - { - register_shutdown_function($this->handleFatalError(...)); - - $this->reservedMemory = str_repeat(' ', 1024 * $reservedMemorySize); - $this->fatalLevel = null === $level ? LogLevel::ALERT : $level; - $this->hasFatalErrorHandler = true; - - return $this; - } - - /** - * @return array - */ - protected function defaultExceptionLevelMap(): array - { - return [ - 'ParseError' => LogLevel::CRITICAL, - 'Throwable' => LogLevel::ERROR, - ]; - } - - /** - * @return array - */ - protected function defaultErrorLevelMap(): array - { - return [ - E_ERROR => LogLevel::CRITICAL, - E_WARNING => LogLevel::WARNING, - E_PARSE => LogLevel::ALERT, - E_NOTICE => LogLevel::NOTICE, - E_CORE_ERROR => LogLevel::CRITICAL, - E_CORE_WARNING => LogLevel::WARNING, - E_COMPILE_ERROR => LogLevel::ALERT, - E_COMPILE_WARNING => LogLevel::WARNING, - E_USER_ERROR => LogLevel::ERROR, - E_USER_WARNING => LogLevel::WARNING, - E_USER_NOTICE => LogLevel::NOTICE, - E_STRICT => LogLevel::NOTICE, - E_RECOVERABLE_ERROR => LogLevel::ERROR, - E_DEPRECATED => LogLevel::NOTICE, - E_USER_DEPRECATED => LogLevel::NOTICE, - ]; - } - - private function handleException(\Throwable $e): never - { - $level = LogLevel::ERROR; - foreach ($this->uncaughtExceptionLevelMap as $class => $candidate) { - if ($e instanceof $class) { - $level = $candidate; - break; - } - } - - $this->logger->log( - $level, - sprintf('Uncaught Exception %s: "%s" at %s line %s', Utils::getClass($e), $e->getMessage(), $e->getFile(), $e->getLine()), - ['exception' => $e] - ); - - if (null !== $this->previousExceptionHandler) { - ($this->previousExceptionHandler)($e); - } - - if (!headers_sent() && in_array(strtolower((string) ini_get('display_errors')), ['0', '', 'false', 'off', 'none', 'no'], true)) { - http_response_code(500); - } - - exit(255); - } - - private function handleError(int $code, string $message, string $file = '', int $line = 0): bool - { - if ($this->handleOnlyReportedErrors && 0 === (error_reporting() & $code)) { - return false; - } - - // fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries - if (!$this->hasFatalErrorHandler || !in_array($code, self::FATAL_ERRORS, true)) { - $level = $this->errorLevelMap[$code] ?? LogLevel::CRITICAL; - $this->logger->log($level, self::codeToString($code).': '.$message, ['code' => $code, 'message' => $message, 'file' => $file, 'line' => $line]); - } else { - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - array_shift($trace); // Exclude handleError from trace - $this->lastFatalData = ['type' => $code, 'message' => $message, 'file' => $file, 'line' => $line, 'trace' => $trace]; - } - - if ($this->previousErrorHandler === true) { - return false; - } - if ($this->previousErrorHandler instanceof Closure) { - return (bool) ($this->previousErrorHandler)($code, $message, $file, $line); - } - - return true; - } - - /** - * @private - */ - public function handleFatalError(): void - { - $this->reservedMemory = ''; - - if (is_array($this->lastFatalData)) { - $lastError = $this->lastFatalData; - } else { - $lastError = error_get_last(); - } - if (is_array($lastError) && in_array($lastError['type'], self::FATAL_ERRORS, true)) { - $trace = $lastError['trace'] ?? null; - $this->logger->log( - $this->fatalLevel, - 'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'], - ['code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $trace] - ); - - if ($this->logger instanceof Logger) { - foreach ($this->logger->getHandlers() as $handler) { - $handler->close(); - } - } - } - } - - private static function codeToString(int $code): string - { - return match ($code) { - E_ERROR => 'E_ERROR', - E_WARNING => 'E_WARNING', - E_PARSE => 'E_PARSE', - E_NOTICE => 'E_NOTICE', - E_CORE_ERROR => 'E_CORE_ERROR', - E_CORE_WARNING => 'E_CORE_WARNING', - E_COMPILE_ERROR => 'E_COMPILE_ERROR', - E_COMPILE_WARNING => 'E_COMPILE_WARNING', - E_USER_ERROR => 'E_USER_ERROR', - E_USER_WARNING => 'E_USER_WARNING', - E_USER_NOTICE => 'E_USER_NOTICE', - E_STRICT => 'E_STRICT', - E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', - E_DEPRECATED => 'E_DEPRECATED', - E_USER_DEPRECATED => 'E_USER_DEPRECATED', - default => 'Unknown PHP error', - }; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php deleted file mode 100644 index 3f1d45829..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Formats a log message according to the ChromePHP array format - * - * @author Christophe Coevoet - */ -class ChromePHPFormatter implements FormatterInterface -{ - /** - * Translates Monolog log levels to Wildfire levels. - * - * @return 'log'|'info'|'warn'|'error' - */ - private function toWildfireLevel(Level $level): string - { - return match ($level) { - Level::Debug => 'log', - Level::Info => 'info', - Level::Notice => 'info', - Level::Warning => 'warn', - Level::Error => 'error', - Level::Critical => 'error', - Level::Alert => 'error', - Level::Emergency => 'error', - }; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record) - { - // Retrieve the line and file if set and remove them from the formatted extra - $backtrace = 'unknown'; - if (isset($record->extra['file'], $record->extra['line'])) { - $backtrace = $record->extra['file'].' : '.$record->extra['line']; - unset($record->extra['file'], $record->extra['line']); - } - - $message = ['message' => $record->message]; - if (\count($record->context) > 0) { - $message['context'] = $record->context; - } - if (\count($record->extra) > 0) { - $message['extra'] = $record->extra; - } - if (count($message) === 1) { - $message = reset($message); - } - - return [ - $record->channel, - $message, - $backtrace, - $this->toWildfireLevel($record->level), - ]; - } - - /** - * @inheritDoc - */ - public function formatBatch(array $records) - { - $formatted = []; - - foreach ($records as $record) { - $formatted[] = $this->format($record); - } - - return $formatted; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php deleted file mode 100644 index 8c92eff22..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Elastica\Document; -use Monolog\LogRecord; - -/** - * Format a log message into an Elastica Document - * - * @author Jelle Vink - */ -class ElasticaFormatter extends NormalizerFormatter -{ - /** - * @var string Elastic search index name - */ - protected string $index; - - /** - * @var string|null Elastic search document type - */ - protected string|null $type; - - /** - * @param string $index Elastic Search index name - * @param ?string $type Elastic Search document type, deprecated as of Elastica 7 - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(string $index, ?string $type) - { - // elasticsearch requires a ISO 8601 format date with optional millisecond precision. - parent::__construct('Y-m-d\TH:i:s.uP'); - - $this->index = $index; - $this->type = $type; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record) - { - $record = parent::format($record); - - return $this->getDocument($record); - } - - public function getIndex(): string - { - return $this->index; - } - - /** - * @deprecated since Elastica 7 type has no effect - */ - public function getType(): string - { - /** @phpstan-ignore-next-line */ - return $this->type; - } - - /** - * Convert a log message into an Elastica Document - * - * @param mixed[] $record - */ - protected function getDocument(array $record): Document - { - $document = new Document(); - $document->setData($record); - if (method_exists($document, 'setType')) { - $document->setType($this->type); - } - $document->setIndex($this->index); - - return $document; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php deleted file mode 100644 index b38aca079..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use DateTimeInterface; -use Monolog\LogRecord; - -/** - * Format a log message into an Elasticsearch record - * - * @author Avtandil Kikabidze - */ -class ElasticsearchFormatter extends NormalizerFormatter -{ - /** - * @var string Elasticsearch index name - */ - protected string $index; - - /** - * @var string Elasticsearch record type - */ - protected string $type; - - /** - * @param string $index Elasticsearch index name - * @param string $type Elasticsearch record type - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(string $index, string $type) - { - // Elasticsearch requires an ISO 8601 format date with optional millisecond precision. - parent::__construct(DateTimeInterface::ISO8601); - - $this->index = $index; - $this->type = $type; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record) - { - $record = parent::format($record); - - return $this->getDocument($record); - } - - /** - * Getter index - */ - public function getIndex(): string - { - return $this->index; - } - - /** - * Getter type - */ - public function getType(): string - { - return $this->type; - } - - /** - * Convert a log message into an Elasticsearch record - * - * @param mixed[] $record Log message - * @return mixed[] - */ - protected function getDocument(array $record): array - { - $record['_index'] = $this->index; - $record['_type'] = $this->type; - - return $record; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php deleted file mode 100644 index c64da7c06..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * formats the record to be used in the FlowdockHandler - * - * @author Dominik Liebler - * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 - */ -class FlowdockFormatter implements FormatterInterface -{ - private string $source; - - private string $sourceEmail; - - public function __construct(string $source, string $sourceEmail) - { - $this->source = $source; - $this->sourceEmail = $sourceEmail; - } - - /** - * @inheritDoc - * - * @return mixed[] - */ - public function format(LogRecord $record): array - { - $tags = [ - '#logs', - '#' . $record->level->toPsrLogLevel(), - '#' . $record->channel, - ]; - - foreach ($record->extra as $value) { - $tags[] = '#' . $value; - } - - $subject = sprintf( - 'in %s: %s - %s', - $this->source, - $record->level->getName(), - $this->getShortMessage($record->message) - ); - - return [ - 'source' => $this->source, - 'from_address' => $this->sourceEmail, - 'subject' => $subject, - 'content' => $record->message, - 'tags' => $tags, - 'project' => $this->source, - ]; - } - - /** - * @inheritDoc - * - * @return mixed[][] - */ - public function formatBatch(array $records): array - { - $formatted = []; - - foreach ($records as $record) { - $formatted[] = $this->format($record); - } - - return $formatted; - } - - public function getShortMessage(string $message): string - { - static $hasMbString; - - if (null === $hasMbString) { - $hasMbString = function_exists('mb_strlen'); - } - - $maxLength = 45; - - if ($hasMbString) { - if (mb_strlen($message, 'UTF-8') > $maxLength) { - $message = mb_substr($message, 0, $maxLength - 4, 'UTF-8') . ' ...'; - } - } else { - if (strlen($message) > $maxLength) { - $message = substr($message, 0, $maxLength - 4) . ' ...'; - } - } - - return $message; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php deleted file mode 100644 index 04495a614..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Class FluentdFormatter - * - * Serializes a log message to Fluentd unix socket protocol - * - * Fluentd config: - * - * - * type unix - * path /var/run/td-agent/td-agent.sock - * - * - * Monolog setup: - * - * $logger = new Monolog\Logger('fluent.tag'); - * $fluentHandler = new Monolog\Handler\SocketHandler('unix:///var/run/td-agent/td-agent.sock'); - * $fluentHandler->setFormatter(new Monolog\Formatter\FluentdFormatter()); - * $logger->pushHandler($fluentHandler); - * - * @author Andrius Putna - */ -class FluentdFormatter implements FormatterInterface -{ - /** - * @var bool $levelTag should message level be a part of the fluentd tag - */ - protected bool $levelTag = false; - - /** - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(bool $levelTag = false) - { - if (!function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s FluentdUnixFormatter'); - } - - $this->levelTag = $levelTag; - } - - public function isUsingLevelsInTag(): bool - { - return $this->levelTag; - } - - public function format(LogRecord $record): string - { - $tag = $record->channel; - if ($this->levelTag) { - $tag .= '.' . $record->level->toPsrLogLevel(); - } - - $message = [ - 'message' => $record->message, - 'context' => $record->context, - 'extra' => $record->extra, - ]; - - if (!$this->levelTag) { - $message['level'] = $record->level->value; - $message['level_name'] = $record->level->getName(); - } - - return Utils::jsonEncode([$tag, $record->datetime->getTimestamp(), $message]); - } - - public function formatBatch(array $records): string - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php deleted file mode 100644 index 3413a4b05..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * Interface for formatters - * - * @author Jordi Boggiano - */ -interface FormatterInterface -{ - /** - * Formats a log record. - * - * @param LogRecord $record A record to format - * @return mixed The formatted record - */ - public function format(LogRecord $record); - - /** - * Formats a set of log records. - * - * @param array $records A set of records to format - * @return mixed The formatted set of records - */ - public function formatBatch(array $records); -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php deleted file mode 100644 index 96cb60ffe..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php +++ /dev/null @@ -1,148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Level; -use Gelf\Message; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Serializes a log message to GELF - * @see http://docs.graylog.org/en/latest/pages/gelf.html - * - * @author Matt Lehner - */ -class GelfMessageFormatter extends NormalizerFormatter -{ - protected const DEFAULT_MAX_LENGTH = 32766; - - /** - * @var string the name of the system for the Gelf log message - */ - protected string $systemName; - - /** - * @var string a prefix for 'extra' fields from the Monolog record (optional) - */ - protected string $extraPrefix; - - /** - * @var string a prefix for 'context' fields from the Monolog record (optional) - */ - protected string $contextPrefix; - - /** - * @var int max length per field - */ - protected int $maxLength; - - /** - * Translates Monolog log levels to Graylog2 log priorities. - */ - private function getGraylog2Priority(Level $level): int - { - return match ($level) { - Level::Debug => 7, - Level::Info => 6, - Level::Notice => 5, - Level::Warning => 4, - Level::Error => 3, - Level::Critical => 2, - Level::Alert => 1, - Level::Emergency => 0, - }; - } - - /** - * @throws \RuntimeException - */ - public function __construct(?string $systemName = null, ?string $extraPrefix = null, string $contextPrefix = 'ctxt_', ?int $maxLength = null) - { - if (!class_exists(Message::class)) { - throw new \RuntimeException('Composer package graylog2/gelf-php is required to use Monolog\'s GelfMessageFormatter'); - } - - parent::__construct('U.u'); - - $this->systemName = (null === $systemName || $systemName === '') ? (string) gethostname() : $systemName; - - $this->extraPrefix = null === $extraPrefix ? '' : $extraPrefix; - $this->contextPrefix = $contextPrefix; - $this->maxLength = null === $maxLength ? self::DEFAULT_MAX_LENGTH : $maxLength; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record): Message - { - $context = $extra = []; - if (isset($record->context)) { - /** @var mixed[] $context */ - $context = parent::normalize($record->context); - } - if (isset($record->extra)) { - /** @var mixed[] $extra */ - $extra = parent::normalize($record->extra); - } - - $message = new Message(); - $message - ->setTimestamp($record->datetime) - ->setShortMessage($record->message) - ->setHost($this->systemName) - ->setLevel($this->getGraylog2Priority($record->level)); - - // message length + system name length + 200 for padding / metadata - $len = 200 + strlen($record->message) + strlen($this->systemName); - - if ($len > $this->maxLength) { - $message->setShortMessage(Utils::substr($record->message, 0, $this->maxLength)); - } - - if (isset($record->channel)) { - $message->setAdditional('facility', $record->channel); - } - - foreach ($extra as $key => $val) { - $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); - $len = strlen($this->extraPrefix . $key . $val); - if ($len > $this->maxLength) { - $message->setAdditional($this->extraPrefix . $key, Utils::substr((string) $val, 0, $this->maxLength)); - - continue; - } - $message->setAdditional($this->extraPrefix . $key, $val); - } - - foreach ($context as $key => $val) { - $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); - $len = strlen($this->contextPrefix . $key . $val); - if ($len > $this->maxLength) { - $message->setAdditional($this->contextPrefix . $key, Utils::substr((string) $val, 0, $this->maxLength)); - - continue; - } - $message->setAdditional($this->contextPrefix . $key, $val); - } - - if (!$message->hasAdditional('file') && isset($context['exception']['file'])) { - if (1 === preg_match("/^(.+):([0-9]+)$/", $context['exception']['file'], $matches)) { - $message->setAdditional('file', $matches[1]); - $message->setAdditional('line', $matches[2]); - } - } - - return $message; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php deleted file mode 100644 index c316b65ee..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Formats incoming records into an HTML table - * - * This is especially useful for html email logging - * - * @author Tiago Brito - */ -class HtmlFormatter extends NormalizerFormatter -{ - /** - * Translates Monolog log levels to html color priorities. - */ - protected function getLevelColor(Level $level): string - { - return match ($level) { - Level::Debug => '#CCCCCC', - Level::Info => '#28A745', - Level::Notice => '#17A2B8', - Level::Warning => '#FFC107', - Level::Error => '#FD7E14', - Level::Critical => '#DC3545', - Level::Alert => '#821722', - Level::Emergency => '#000000', - }; - } - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(?string $dateFormat = null) - { - parent::__construct($dateFormat); - } - - /** - * Creates an HTML table row - * - * @param string $th Row header content - * @param string $td Row standard cell content - * @param bool $escapeTd false if td content must not be html escaped - */ - protected function addRow(string $th, string $td = ' ', bool $escapeTd = true): string - { - $th = htmlspecialchars($th, ENT_NOQUOTES, 'UTF-8'); - if ($escapeTd) { - $td = '
'.htmlspecialchars($td, ENT_NOQUOTES, 'UTF-8').'
'; - } - - return "\n$th:\n".$td."\n"; - } - - /** - * Create a HTML h1 tag - * - * @param string $title Text to be in the h1 - */ - protected function addTitle(string $title, Level $level): string - { - $title = htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8'); - - return '

'.$title.'

'; - } - - /** - * Formats a log record. - * - * @return string The formatted record - */ - public function format(LogRecord $record): string - { - $output = $this->addTitle($record->level->getName(), $record->level); - $output .= ''; - - $output .= $this->addRow('Message', $record->message); - $output .= $this->addRow('Time', $this->formatDate($record->datetime)); - $output .= $this->addRow('Channel', $record->channel); - if (\count($record->context) > 0) { - $embeddedTable = '
'; - foreach ($record->context as $key => $value) { - $embeddedTable .= $this->addRow((string) $key, $this->convertToString($value)); - } - $embeddedTable .= '
'; - $output .= $this->addRow('Context', $embeddedTable, false); - } - if (\count($record->extra) > 0) { - $embeddedTable = ''; - foreach ($record->extra as $key => $value) { - $embeddedTable .= $this->addRow((string) $key, $this->convertToString($value)); - } - $embeddedTable .= '
'; - $output .= $this->addRow('Extra', $embeddedTable, false); - } - - return $output.''; - } - - /** - * Formats a set of log records. - * - * @return string The formatted set of records - */ - public function formatBatch(array $records): string - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } - - /** - * @param mixed $data - */ - protected function convertToString($data): string - { - if (null === $data || is_scalar($data)) { - return (string) $data; - } - - $data = $this->normalize($data); - - return Utils::jsonEncode($data, JSON_PRETTY_PRINT | Utils::DEFAULT_JSON_FLAGS, true); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php deleted file mode 100644 index ca3d7d27f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php +++ /dev/null @@ -1,216 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Stringable; -use Throwable; -use Monolog\LogRecord; - -/** - * Encodes whatever record data is passed to it as json - * - * This can be useful to log to databases or remote APIs - * - * @author Jordi Boggiano - */ -class JsonFormatter extends NormalizerFormatter -{ - public const BATCH_MODE_JSON = 1; - public const BATCH_MODE_NEWLINES = 2; - - /** @var self::BATCH_MODE_* */ - protected int $batchMode; - - protected bool $appendNewline; - - protected bool $ignoreEmptyContextAndExtra; - - protected bool $includeStacktraces = false; - - /** - * @param self::BATCH_MODE_* $batchMode - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(int $batchMode = self::BATCH_MODE_JSON, bool $appendNewline = true, bool $ignoreEmptyContextAndExtra = false, bool $includeStacktraces = false) - { - $this->batchMode = $batchMode; - $this->appendNewline = $appendNewline; - $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; - $this->includeStacktraces = $includeStacktraces; - - parent::__construct(); - } - - /** - * The batch mode option configures the formatting style for - * multiple records. By default, multiple records will be - * formatted as a JSON-encoded array. However, for - * compatibility with some API endpoints, alternative styles - * are available. - */ - public function getBatchMode(): int - { - return $this->batchMode; - } - - /** - * True if newlines are appended to every formatted record - */ - public function isAppendingNewlines(): bool - { - return $this->appendNewline; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record): string - { - $normalized = parent::format($record); - - if (isset($normalized['context']) && $normalized['context'] === []) { - if ($this->ignoreEmptyContextAndExtra) { - unset($normalized['context']); - } else { - $normalized['context'] = new \stdClass; - } - } - if (isset($normalized['extra']) && $normalized['extra'] === []) { - if ($this->ignoreEmptyContextAndExtra) { - unset($normalized['extra']); - } else { - $normalized['extra'] = new \stdClass; - } - } - - return $this->toJson($normalized, true) . ($this->appendNewline ? "\n" : ''); - } - - /** - * @inheritDoc - */ - public function formatBatch(array $records): string - { - return match ($this->batchMode) { - static::BATCH_MODE_NEWLINES => $this->formatBatchNewlines($records), - default => $this->formatBatchJson($records), - }; - } - - /** - * @return $this - */ - public function includeStacktraces(bool $include = true): self - { - $this->includeStacktraces = $include; - - return $this; - } - - /** - * Return a JSON-encoded array of records. - * - * @phpstan-param LogRecord[] $records - */ - protected function formatBatchJson(array $records): string - { - return $this->toJson($this->normalize($records), true); - } - - /** - * Use new lines to separate records instead of a - * JSON-encoded array. - * - * @phpstan-param LogRecord[] $records - */ - protected function formatBatchNewlines(array $records): string - { - $oldNewline = $this->appendNewline; - $this->appendNewline = false; - $formatted = array_map(fn (LogRecord $record) => $this->format($record), $records); - $this->appendNewline = $oldNewline; - - return implode("\n", $formatted); - } - - /** - * Normalizes given $data. - * - * @return null|scalar|array|object - */ - protected function normalize(mixed $data, int $depth = 0): mixed - { - if ($depth > $this->maxNormalizeDepth) { - return 'Over '.$this->maxNormalizeDepth.' levels deep, aborting normalization'; - } - - if (is_array($data)) { - $normalized = []; - - $count = 1; - foreach ($data as $key => $value) { - if ($count++ > $this->maxNormalizeItemCount) { - $normalized['...'] = 'Over '.$this->maxNormalizeItemCount.' items ('.count($data).' total), aborting normalization'; - break; - } - - $normalized[$key] = $this->normalize($value, $depth + 1); - } - - return $normalized; - } - - if (is_object($data)) { - if ($data instanceof \DateTimeInterface) { - return $this->formatDate($data); - } - - if ($data instanceof Throwable) { - return $this->normalizeException($data, $depth); - } - - // if the object has specific json serializability we want to make sure we skip the __toString treatment below - if ($data instanceof \JsonSerializable) { - return $data; - } - - if ($data instanceof Stringable) { - return $data->__toString(); - } - - return $data; - } - - if (is_resource($data)) { - return parent::normalize($data); - } - - return $data; - } - - /** - * Normalizes given exception with or without its own stack trace based on - * `includeStacktraces` property. - * - * @inheritDoc - */ - protected function normalizeException(Throwable $e, int $depth = 0): array - { - $data = parent::normalizeException($e, $depth); - if (!$this->includeStacktraces) { - unset($data['trace']); - } - - return $data; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php deleted file mode 100644 index 025572a5c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +++ /dev/null @@ -1,289 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Closure; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Formats incoming records into a one-line string - * - * This is especially useful for logging to files - * - * @author Jordi Boggiano - * @author Christophe Coevoet - */ -class LineFormatter extends NormalizerFormatter -{ - public const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"; - - protected string $format; - protected bool $allowInlineLineBreaks; - protected bool $ignoreEmptyContextAndExtra; - protected bool $includeStacktraces; - protected ?int $maxLevelNameLength = null; - protected string $indentStacktraces = ''; - protected Closure|null $stacktracesParser = null; - - /** - * @param string|null $format The format of the message - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @param bool $allowInlineLineBreaks Whether to allow inline line breaks in log entries - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(?string $format = null, ?string $dateFormat = null, bool $allowInlineLineBreaks = false, bool $ignoreEmptyContextAndExtra = false, bool $includeStacktraces = false) - { - $this->format = $format === null ? static::SIMPLE_FORMAT : $format; - $this->allowInlineLineBreaks = $allowInlineLineBreaks; - $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; - $this->includeStacktraces($includeStacktraces); - parent::__construct($dateFormat); - } - - /** - * @return $this - */ - public function includeStacktraces(bool $include = true, ?Closure $parser = null): self - { - $this->includeStacktraces = $include; - if ($this->includeStacktraces) { - $this->allowInlineLineBreaks = true; - $this->stacktracesParser = $parser; - } - - return $this; - } - - /** - * Indent stack traces to separate them a bit from the main log record messages - * - * @param string $indent The string used to indent, for example " " - * @return $this - */ - public function indentStacktraces(string $indent): self - { - $this->indentStacktraces = $indent; - - return $this; - } - - /** - * @return $this - */ - public function allowInlineLineBreaks(bool $allow = true): self - { - $this->allowInlineLineBreaks = $allow; - - return $this; - } - - /** - * @return $this - */ - public function ignoreEmptyContextAndExtra(bool $ignore = true): self - { - $this->ignoreEmptyContextAndExtra = $ignore; - - return $this; - } - - /** - * Allows cutting the level name to get fixed-length levels like INF for INFO, ERR for ERROR if you set this to 3 for example - * - * @param int|null $maxLevelNameLength Maximum characters for the level name. Set null for infinite length (default) - * @return $this - */ - public function setMaxLevelNameLength(?int $maxLevelNameLength = null): self - { - $this->maxLevelNameLength = $maxLevelNameLength; - - return $this; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record): string - { - $vars = parent::format($record); - - if ($this->maxLevelNameLength !== null) { - $vars['level_name'] = substr($vars['level_name'], 0, $this->maxLevelNameLength); - } - - $output = $this->format; - foreach ($vars['extra'] as $var => $val) { - if (false !== strpos($output, '%extra.'.$var.'%')) { - $output = str_replace('%extra.'.$var.'%', $this->stringify($val), $output); - unset($vars['extra'][$var]); - } - } - - foreach ($vars['context'] as $var => $val) { - if (false !== strpos($output, '%context.'.$var.'%')) { - $output = str_replace('%context.'.$var.'%', $this->stringify($val), $output); - unset($vars['context'][$var]); - } - } - - if ($this->ignoreEmptyContextAndExtra) { - if (\count($vars['context']) === 0) { - unset($vars['context']); - $output = str_replace('%context%', '', $output); - } - - if (\count($vars['extra']) === 0) { - unset($vars['extra']); - $output = str_replace('%extra%', '', $output); - } - } - - foreach ($vars as $var => $val) { - if (false !== strpos($output, '%'.$var.'%')) { - $output = str_replace('%'.$var.'%', $this->stringify($val), $output); - } - } - - // remove leftover %extra.xxx% and %context.xxx% if any - if (false !== strpos($output, '%')) { - $output = preg_replace('/%(?:extra|context)\..+?%/', '', $output); - if (null === $output) { - $pcreErrorCode = preg_last_error(); - - throw new \RuntimeException('Failed to run preg_replace: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); - } - } - - return $output; - } - - public function formatBatch(array $records): string - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } - - /** - * @param mixed $value - */ - public function stringify($value): string - { - return $this->replaceNewlines($this->convertToString($value)); - } - - protected function normalizeException(\Throwable $e, int $depth = 0): string - { - $str = $this->formatException($e); - - if (($previous = $e->getPrevious()) instanceof \Throwable) { - do { - $depth++; - if ($depth > $this->maxNormalizeDepth) { - $str .= "\n[previous exception] Over " . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; - break; - } - - $str .= "\n[previous exception] " . $this->formatException($previous); - } while ($previous = $previous->getPrevious()); - } - - return $str; - } - - /** - * @param mixed $data - */ - protected function convertToString($data): string - { - if (null === $data || is_bool($data)) { - return var_export($data, true); - } - - if (is_scalar($data)) { - return (string) $data; - } - - return $this->toJson($data, true); - } - - protected function replaceNewlines(string $str): string - { - if ($this->allowInlineLineBreaks) { - if (0 === strpos($str, '{') || 0 === strpos($str, '[')) { - $str = preg_replace('/(?getCode(); - if ($e instanceof \SoapFault) { - if (isset($e->faultcode)) { - $str .= ' faultcode: ' . $e->faultcode; - } - - if (isset($e->faultactor)) { - $str .= ' faultactor: ' . $e->faultactor; - } - - if (isset($e->detail)) { - if (is_string($e->detail)) { - $str .= ' detail: ' . $e->detail; - } elseif (is_object($e->detail) || is_array($e->detail)) { - $str .= ' detail: ' . $this->toJson($e->detail, true); - } - } - } - $str .= '): ' . $e->getMessage() . ' at ' . $e->getFile() . ':' . $e->getLine() . ')'; - - if ($this->includeStacktraces) { - $str .= $this->stacktracesParser($e); - } - - return $str; - } - - private function stacktracesParser(\Throwable $e): string - { - $trace = $e->getTraceAsString(); - - if ($this->stacktracesParser !== null) { - $trace = $this->stacktracesParserCustom($trace); - } - - if ($this->indentStacktraces !== '') { - $trace = str_replace("\n", "\n{$this->indentStacktraces}", $trace); - } - - return "\n{$this->indentStacktraces}[stacktrace]\n{$this->indentStacktraces}" . $trace . "\n"; - } - - private function stacktracesParserCustom(string $trace): string - { - return implode("\n", array_filter(array_map($this->stacktracesParser, explode("\n", $trace)))); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php deleted file mode 100644 index 5f0b6a453..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * Encodes message information into JSON in a format compatible with Loggly. - * - * @author Adam Pancutt - */ -class LogglyFormatter extends JsonFormatter -{ - /** - * Overrides the default batch mode to new lines for compatibility with the - * Loggly bulk API. - */ - public function __construct(int $batchMode = self::BATCH_MODE_NEWLINES, bool $appendNewline = false) - { - parent::__construct($batchMode, $appendNewline); - } - - /** - * Appends the 'timestamp' parameter for indexing by Loggly. - * - * @see https://www.loggly.com/docs/automated-parsing/#json - * @see \Monolog\Formatter\JsonFormatter::format() - */ - protected function normalizeRecord(LogRecord $record): array - { - $recordData = parent::normalizeRecord($record); - - $recordData["timestamp"] = $record->datetime->format("Y-m-d\TH:i:s.uO"); - unset($recordData["datetime"]); - - return $recordData; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php deleted file mode 100644 index 9e44c19f4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * Encodes message information into JSON in a format compatible with Logmatic. - * - * @author Julien Breux - */ -class LogmaticFormatter extends JsonFormatter -{ - protected const MARKERS = ["sourcecode", "php"]; - - protected string $hostname = ''; - - protected string $appName = ''; - - /** - * @return $this - */ - public function setHostname(string $hostname): self - { - $this->hostname = $hostname; - - return $this; - } - - /** - * @return $this - */ - public function setAppName(string $appName): self - { - $this->appName = $appName; - - return $this; - } - - /** - * Appends the 'hostname' and 'appname' parameter for indexing by Logmatic. - * - * @see http://doc.logmatic.io/docs/basics-to-send-data - * @see \Monolog\Formatter\JsonFormatter::format() - */ - public function normalizeRecord(LogRecord $record): array - { - $record = parent::normalizeRecord($record); - - if ($this->hostname !== '') { - $record["hostname"] = $this->hostname; - } - if ($this->appName !== '') { - $record["appname"] = $this->appName; - } - - $record["@marker"] = static::MARKERS; - - return $record; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php deleted file mode 100644 index abee3cd13..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * Serializes a log message to Logstash Event Format - * - * @see https://www.elastic.co/products/logstash - * @see https://github.com/elastic/logstash/blob/master/logstash-core/src/main/java/org/logstash/Event.java - * - * @author Tim Mower - */ -class LogstashFormatter extends NormalizerFormatter -{ - /** - * @var string the name of the system for the Logstash log message, used to fill the @source field - */ - protected string $systemName; - - /** - * @var string an application name for the Logstash log message, used to fill the @type field - */ - protected string $applicationName; - - /** - * @var string the key for 'extra' fields from the Monolog record - */ - protected string $extraKey; - - /** - * @var string the key for 'context' fields from the Monolog record - */ - protected string $contextKey; - - /** - * @param string $applicationName The application that sends the data, used as the "type" field of logstash - * @param string|null $systemName The system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine - * @param string $extraKey The key for extra keys inside logstash "fields", defaults to extra - * @param string $contextKey The key for context keys inside logstash "fields", defaults to context - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(string $applicationName, ?string $systemName = null, string $extraKey = 'extra', string $contextKey = 'context') - { - // logstash requires a ISO 8601 format date with optional millisecond precision. - parent::__construct('Y-m-d\TH:i:s.uP'); - - $this->systemName = $systemName === null ? (string) gethostname() : $systemName; - $this->applicationName = $applicationName; - $this->extraKey = $extraKey; - $this->contextKey = $contextKey; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record): string - { - $recordData = parent::format($record); - - $message = [ - '@timestamp' => $recordData['datetime'], - '@version' => 1, - 'host' => $this->systemName, - ]; - if (isset($recordData['message'])) { - $message['message'] = $recordData['message']; - } - if (isset($recordData['channel'])) { - $message['type'] = $recordData['channel']; - $message['channel'] = $recordData['channel']; - } - if (isset($recordData['level_name'])) { - $message['level'] = $recordData['level_name']; - } - if (isset($recordData['level'])) { - $message['monolog_level'] = $recordData['level']; - } - if ('' !== $this->applicationName) { - $message['type'] = $this->applicationName; - } - if (\count($recordData['extra']) > 0) { - $message[$this->extraKey] = $recordData['extra']; - } - if (\count($recordData['context']) > 0) { - $message[$this->contextKey] = $recordData['context']; - } - - return $this->toJson($message) . "\n"; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php deleted file mode 100644 index 9b7da8a9c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use MongoDB\BSON\Type; -use MongoDB\BSON\UTCDateTime; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Formats a record for use with the MongoDBHandler. - * - * @author Florian Plattner - */ -class MongoDBFormatter implements FormatterInterface -{ - private bool $exceptionTraceAsString; - private int $maxNestingLevel; - private bool $isLegacyMongoExt; - - /** - * @param int $maxNestingLevel 0 means infinite nesting, the $record itself is level 1, $record->context is 2 - * @param bool $exceptionTraceAsString set to false to log exception traces as a sub documents instead of strings - */ - public function __construct(int $maxNestingLevel = 3, bool $exceptionTraceAsString = true) - { - $this->maxNestingLevel = max($maxNestingLevel, 0); - $this->exceptionTraceAsString = $exceptionTraceAsString; - - $this->isLegacyMongoExt = extension_loaded('mongodb') && version_compare((string) phpversion('mongodb'), '1.1.9', '<='); - } - - /** - * @inheritDoc - * - * @return mixed[] - */ - public function format(LogRecord $record): array - { - /** @var mixed[] $res */ - $res = $this->formatArray($record->toArray()); - - return $res; - } - - /** - * @inheritDoc - * - * @return array - */ - public function formatBatch(array $records): array - { - $formatted = []; - foreach ($records as $key => $record) { - $formatted[$key] = $this->format($record); - } - - return $formatted; - } - - /** - * @param mixed[] $array - * @return mixed[]|string Array except when max nesting level is reached then a string "[...]" - */ - protected function formatArray(array $array, int $nestingLevel = 0) - { - if ($this->maxNestingLevel > 0 && $nestingLevel > $this->maxNestingLevel) { - return '[...]'; - } - - foreach ($array as $name => $value) { - if ($value instanceof \DateTimeInterface) { - $array[$name] = $this->formatDate($value, $nestingLevel + 1); - } elseif ($value instanceof \Throwable) { - $array[$name] = $this->formatException($value, $nestingLevel + 1); - } elseif (is_array($value)) { - $array[$name] = $this->formatArray($value, $nestingLevel + 1); - } elseif (is_object($value) && !$value instanceof Type) { - $array[$name] = $this->formatObject($value, $nestingLevel + 1); - } - } - - return $array; - } - - /** - * @param mixed $value - * @return mixed[]|string - */ - protected function formatObject($value, int $nestingLevel) - { - $objectVars = get_object_vars($value); - $objectVars['class'] = Utils::getClass($value); - - return $this->formatArray($objectVars, $nestingLevel); - } - - /** - * @return mixed[]|string - */ - protected function formatException(\Throwable $exception, int $nestingLevel) - { - $formattedException = [ - 'class' => Utils::getClass($exception), - 'message' => $exception->getMessage(), - 'code' => (int) $exception->getCode(), - 'file' => $exception->getFile() . ':' . $exception->getLine(), - ]; - - if ($this->exceptionTraceAsString === true) { - $formattedException['trace'] = $exception->getTraceAsString(); - } else { - $formattedException['trace'] = $exception->getTrace(); - } - - return $this->formatArray($formattedException, $nestingLevel); - } - - protected function formatDate(\DateTimeInterface $value, int $nestingLevel): UTCDateTime - { - if ($this->isLegacyMongoExt) { - return $this->legacyGetMongoDbDateTime($value); - } - - return $this->getMongoDbDateTime($value); - } - - private function getMongoDbDateTime(\DateTimeInterface $value): UTCDateTime - { - return new UTCDateTime((int) floor(((float) $value->format('U.u')) * 1000)); - } - - /** - * This is needed to support MongoDB Driver v1.19 and below - * - * See https://github.com/mongodb/mongo-php-driver/issues/426 - * - * It can probably be removed in 2.1 or later once MongoDB's 1.2 is released and widely adopted - */ - private function legacyGetMongoDbDateTime(\DateTimeInterface $value): UTCDateTime - { - $milliseconds = floor(((float) $value->format('U.u')) * 1000); - - $milliseconds = (PHP_INT_SIZE == 8) //64-bit OS? - ? (int) $milliseconds - : (string) $milliseconds; - - return new UTCDateTime($milliseconds); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php deleted file mode 100644 index a5c99156f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +++ /dev/null @@ -1,325 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\DateTimeImmutable; -use Monolog\Utils; -use Throwable; -use Monolog\LogRecord; - -/** - * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets - * - * @author Jordi Boggiano - */ -class NormalizerFormatter implements FormatterInterface -{ - public const SIMPLE_DATE = "Y-m-d\TH:i:sP"; - - protected string $dateFormat; - protected int $maxNormalizeDepth = 9; - protected int $maxNormalizeItemCount = 1000; - - private int $jsonEncodeOptions = Utils::DEFAULT_JSON_FLAGS; - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(?string $dateFormat = null) - { - $this->dateFormat = null === $dateFormat ? static::SIMPLE_DATE : $dateFormat; - if (!function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter'); - } - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record) - { - return $this->normalizeRecord($record); - } - - /** - * Normalize an arbitrary value to a scalar|array|null - * - * @return null|scalar|array - */ - public function normalizeValue(mixed $data): mixed - { - return $this->normalize($data); - } - - /** - * @inheritDoc - */ - public function formatBatch(array $records) - { - foreach ($records as $key => $record) { - $records[$key] = $this->format($record); - } - - return $records; - } - - public function getDateFormat(): string - { - return $this->dateFormat; - } - - /** - * @return $this - */ - public function setDateFormat(string $dateFormat): self - { - $this->dateFormat = $dateFormat; - - return $this; - } - - /** - * The maximum number of normalization levels to go through - */ - public function getMaxNormalizeDepth(): int - { - return $this->maxNormalizeDepth; - } - - /** - * @return $this - */ - public function setMaxNormalizeDepth(int $maxNormalizeDepth): self - { - $this->maxNormalizeDepth = $maxNormalizeDepth; - - return $this; - } - - /** - * The maximum number of items to normalize per level - */ - public function getMaxNormalizeItemCount(): int - { - return $this->maxNormalizeItemCount; - } - - /** - * @return $this - */ - public function setMaxNormalizeItemCount(int $maxNormalizeItemCount): self - { - $this->maxNormalizeItemCount = $maxNormalizeItemCount; - - return $this; - } - - /** - * Enables `json_encode` pretty print. - * - * @return $this - */ - public function setJsonPrettyPrint(bool $enable): self - { - if ($enable) { - $this->jsonEncodeOptions |= JSON_PRETTY_PRINT; - } else { - $this->jsonEncodeOptions &= ~JSON_PRETTY_PRINT; - } - - return $this; - } - - /** - * Provided as extension point - * - * Because normalize is called with sub-values of context data etc, normalizeRecord can be - * extended when data needs to be appended on the record array but not to other normalized data. - * - * @return array - */ - protected function normalizeRecord(LogRecord $record): array - { - /** @var array $normalized */ - $normalized = $this->normalize($record->toArray()); - - return $normalized; - } - - /** - * @return null|scalar|array - */ - protected function normalize(mixed $data, int $depth = 0): mixed - { - if ($depth > $this->maxNormalizeDepth) { - return 'Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; - } - - if (null === $data || is_scalar($data)) { - if (is_float($data)) { - if (is_infinite($data)) { - return ($data > 0 ? '' : '-') . 'INF'; - } - if (is_nan($data)) { - return 'NaN'; - } - } - - return $data; - } - - if (is_array($data)) { - $normalized = []; - - $count = 1; - foreach ($data as $key => $value) { - if ($count++ > $this->maxNormalizeItemCount) { - $normalized['...'] = 'Over ' . $this->maxNormalizeItemCount . ' items ('.count($data).' total), aborting normalization'; - break; - } - - $normalized[$key] = $this->normalize($value, $depth + 1); - } - - return $normalized; - } - - if ($data instanceof \DateTimeInterface) { - return $this->formatDate($data); - } - - if (is_object($data)) { - if ($data instanceof Throwable) { - return $this->normalizeException($data, $depth); - } - - if ($data instanceof \JsonSerializable) { - /** @var null|scalar|array $value */ - $value = $data->jsonSerialize(); - } elseif (\get_class($data) === '__PHP_Incomplete_Class') { - $accessor = new \ArrayObject($data); - $value = (string) $accessor['__PHP_Incomplete_Class_Name']; - } elseif (method_exists($data, '__toString')) { - /** @var string $value */ - $value = $data->__toString(); - } else { - // the rest is normalized by json encoding and decoding it - /** @var null|scalar|array $value */ - $value = json_decode($this->toJson($data, true), true); - } - - return [Utils::getClass($data) => $value]; - } - - if (is_resource($data)) { - return sprintf('[resource(%s)]', get_resource_type($data)); - } - - return '[unknown('.gettype($data).')]'; - } - - /** - * @return mixed[] - */ - protected function normalizeException(Throwable $e, int $depth = 0) - { - if ($depth > $this->maxNormalizeDepth) { - return ['Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization']; - } - - if ($e instanceof \JsonSerializable) { - return (array) $e->jsonSerialize(); - } - - $data = [ - 'class' => Utils::getClass($e), - 'message' => $e->getMessage(), - 'code' => (int) $e->getCode(), - 'file' => $e->getFile().':'.$e->getLine(), - ]; - - if ($e instanceof \SoapFault) { - if (isset($e->faultcode)) { - $data['faultcode'] = $e->faultcode; - } - - if (isset($e->faultactor)) { - $data['faultactor'] = $e->faultactor; - } - - if (isset($e->detail)) { - if (is_string($e->detail)) { - $data['detail'] = $e->detail; - } elseif (is_object($e->detail) || is_array($e->detail)) { - $data['detail'] = $this->toJson($e->detail, true); - } - } - } - - $trace = $e->getTrace(); - foreach ($trace as $frame) { - if (isset($frame['file'], $frame['line'])) { - $data['trace'][] = $frame['file'].':'.$frame['line']; - } - } - - if (($previous = $e->getPrevious()) instanceof \Throwable) { - $data['previous'] = $this->normalizeException($previous, $depth + 1); - } - - return $data; - } - - /** - * Return the JSON representation of a value - * - * @param mixed $data - * @throws \RuntimeException if encoding fails and errors are not ignored - * @return string if encoding fails and ignoreErrors is true 'null' is returned - */ - protected function toJson($data, bool $ignoreErrors = false): string - { - return Utils::jsonEncode($data, $this->jsonEncodeOptions, $ignoreErrors); - } - - protected function formatDate(\DateTimeInterface $date): string - { - // in case the date format isn't custom then we defer to the custom DateTimeImmutable - // formatting logic, which will pick the right format based on whether useMicroseconds is on - if ($this->dateFormat === self::SIMPLE_DATE && $date instanceof DateTimeImmutable) { - return (string) $date; - } - - return $date->format($this->dateFormat); - } - - /** - * @return $this - */ - public function addJsonEncodeOption(int $option): self - { - $this->jsonEncodeOptions |= $option; - - return $this; - } - - /** - * @return $this - */ - public function removeJsonEncodeOption(int $option): self - { - $this->jsonEncodeOptions &= ~$option; - - return $this; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php deleted file mode 100644 index 4bc20a08c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * Formats data into an associative array of scalar (+ null) values. - * Objects and arrays will be JSON encoded. - * - * @author Andrew Lawson - */ -class ScalarFormatter extends NormalizerFormatter -{ - /** - * @inheritDoc - * - * @phpstan-return array $record - */ - public function format(LogRecord $record): array - { - $result = []; - foreach ($record->toArray() as $key => $value) { - $result[$key] = $this->toScalar($value); - } - - return $result; - } - - protected function toScalar(mixed $value): string|int|float|bool|null - { - $normalized = $this->normalize($value); - - if (is_array($normalized)) { - return $this->toJson($normalized, true); - } - - return $normalized; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php deleted file mode 100644 index 2e28b3ab4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Serializes a log message according to Wildfire's header requirements - * - * @author Eric Clemmons (@ericclemmons) - * @author Christophe Coevoet - * @author Kirill chEbba Chebunin - */ -class WildfireFormatter extends NormalizerFormatter -{ - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(?string $dateFormat = null) - { - parent::__construct($dateFormat); - - // http headers do not like non-ISO-8559-1 characters - $this->removeJsonEncodeOption(JSON_UNESCAPED_UNICODE); - } - - /** - * Translates Monolog log levels to Wildfire levels. - * - * @return 'LOG'|'INFO'|'WARN'|'ERROR' - */ - private function toWildfireLevel(Level $level): string - { - return match ($level) { - Level::Debug => 'LOG', - Level::Info => 'INFO', - Level::Notice => 'INFO', - Level::Warning => 'WARN', - Level::Error => 'ERROR', - Level::Critical => 'ERROR', - Level::Alert => 'ERROR', - Level::Emergency => 'ERROR', - }; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record): string - { - // Retrieve the line and file if set and remove them from the formatted extra - $file = $line = ''; - if (isset($record->extra['file'])) { - $file = $record->extra['file']; - unset($record->extra['file']); - } - if (isset($record->extra['line'])) { - $line = $record->extra['line']; - unset($record->extra['line']); - } - - $message = ['message' => $record->message]; - $handleError = false; - if (count($record->context) > 0) { - $message['context'] = $this->normalize($record->context); - $handleError = true; - } - if (count($record->extra) > 0) { - $message['extra'] = $this->normalize($record->extra); - $handleError = true; - } - if (count($message) === 1) { - $message = reset($message); - } - - if (is_array($message) && isset($message['context']['table'])) { - $type = 'TABLE'; - $label = $record->channel .': '. $record->message; - $message = $message['context']['table']; - } else { - $type = $this->toWildfireLevel($record->level); - $label = $record->channel; - } - - // Create JSON object describing the appearance of the message in the console - $json = $this->toJson([ - [ - 'Type' => $type, - 'File' => $file, - 'Line' => $line, - 'Label' => $label, - ], - $message, - ], $handleError); - - // The message itself is a serialization of the above JSON object + it's length - return sprintf( - '%d|%s|', - strlen($json), - $json - ); - } - - /** - * @inheritDoc - * - * @phpstan-return never - */ - public function formatBatch(array $records) - { - throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter'); - } - - /** - * @inheritDoc - * - * @return null|scalar|array|object - */ - protected function normalize(mixed $data, int $depth = 0): mixed - { - if (is_object($data) && !$data instanceof \DateTimeInterface) { - return $data; - } - - return parent::normalize($data, $depth); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php deleted file mode 100644 index d3c2cbd7b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Logger; -use Monolog\ResettableInterface; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Base Handler class providing basic level/bubble support - * - * @author Jordi Boggiano - */ -abstract class AbstractHandler extends Handler implements ResettableInterface -{ - protected Level $level = Level::Debug; - protected bool $bubble = true; - - /** - * @param int|string|Level|LogLevel::* $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true) - { - $this->setLevel($level); - $this->bubble = $bubble; - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return $record->level->value >= $this->level->value; - } - - /** - * Sets minimum logging level at which this handler will be triggered. - * - * @param Level|LogLevel::* $level Level or level name - * @return $this - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function setLevel(int|string|Level $level): self - { - $this->level = Logger::toMonologLevel($level); - - return $this; - } - - /** - * Gets minimum logging level at which this handler will be triggered. - */ - public function getLevel(): Level - { - return $this->level; - } - - /** - * Sets the bubbling behavior. - * - * @param bool $bubble true means that this handler allows bubbling. - * false means that bubbling is not permitted. - * @return $this - */ - public function setBubble(bool $bubble): self - { - $this->bubble = $bubble; - - return $this; - } - - /** - * Gets the bubbling behavior. - * - * @return bool true means that this handler allows bubbling. - * false means that bubbling is not permitted. - */ - public function getBubble(): bool - { - return $this->bubble; - } - - /** - * @inheritDoc - */ - public function reset(): void - { - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php deleted file mode 100644 index de13a76be..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\LogRecord; - -/** - * Base Handler class providing the Handler structure, including processors and formatters - * - * Classes extending it should (in most cases) only implement write($record) - * - * @author Jordi Boggiano - * @author Christophe Coevoet - */ -abstract class AbstractProcessingHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - use FormattableHandlerTrait; - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - $record->formatted = $this->getFormatter()->format($record); - - $this->write($record); - - return false === $this->bubble; - } - - /** - * Writes the (already formatted) record down to the log of the implementing handler - */ - abstract protected function write(LogRecord $record): void; - - public function reset(): void - { - parent::reset(); - - $this->resetProcessors(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php deleted file mode 100644 index 695a1c07f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; - -/** - * Common syslog functionality - */ -abstract class AbstractSyslogHandler extends AbstractProcessingHandler -{ - protected int $facility; - - /** - * List of valid log facility names. - * @var array - */ - protected array $facilities = [ - 'auth' => \LOG_AUTH, - 'authpriv' => \LOG_AUTHPRIV, - 'cron' => \LOG_CRON, - 'daemon' => \LOG_DAEMON, - 'kern' => \LOG_KERN, - 'lpr' => \LOG_LPR, - 'mail' => \LOG_MAIL, - 'news' => \LOG_NEWS, - 'syslog' => \LOG_SYSLOG, - 'user' => \LOG_USER, - 'uucp' => \LOG_UUCP, - ]; - - /** - * Translates Monolog log levels to syslog log priorities. - */ - protected function toSyslogPriority(Level $level): int - { - return $level->toRFC5424Level(); - } - - /** - * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant - */ - public function __construct(string|int $facility = \LOG_USER, int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - - if (!defined('PHP_WINDOWS_VERSION_BUILD')) { - $this->facilities['local0'] = \LOG_LOCAL0; - $this->facilities['local1'] = \LOG_LOCAL1; - $this->facilities['local2'] = \LOG_LOCAL2; - $this->facilities['local3'] = \LOG_LOCAL3; - $this->facilities['local4'] = \LOG_LOCAL4; - $this->facilities['local5'] = \LOG_LOCAL5; - $this->facilities['local6'] = \LOG_LOCAL6; - $this->facilities['local7'] = \LOG_LOCAL7; - } else { - $this->facilities['local0'] = 128; // LOG_LOCAL0 - $this->facilities['local1'] = 136; // LOG_LOCAL1 - $this->facilities['local2'] = 144; // LOG_LOCAL2 - $this->facilities['local3'] = 152; // LOG_LOCAL3 - $this->facilities['local4'] = 160; // LOG_LOCAL4 - $this->facilities['local5'] = 168; // LOG_LOCAL5 - $this->facilities['local6'] = 176; // LOG_LOCAL6 - $this->facilities['local7'] = 184; // LOG_LOCAL7 - } - - // convert textual description of facility to syslog constant - if (is_string($facility) && array_key_exists(strtolower($facility), $this->facilities)) { - $facility = $this->facilities[strtolower($facility)]; - } elseif (!in_array($facility, array_values($this->facilities), true)) { - throw new \UnexpectedValueException('Unknown facility value "'.$facility.'" given'); - } - - $this->facility = $facility; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('%channel%.%level_name%: %message% %context% %extra%'); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php deleted file mode 100644 index 72265d4ba..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\JsonFormatter; -use PhpAmqpLib\Message\AMQPMessage; -use PhpAmqpLib\Channel\AMQPChannel; -use AMQPExchange; -use Monolog\LogRecord; - -class AmqpHandler extends AbstractProcessingHandler -{ - protected AMQPExchange|AMQPChannel $exchange; - - /** @var array */ - private array $extraAttributes = []; - - protected string $exchangeName; - - /** - * @param AMQPExchange|AMQPChannel $exchange AMQPExchange (php AMQP ext) or PHP AMQP lib channel, ready for use - * @param string|null $exchangeName Optional exchange name, for AMQPChannel (PhpAmqpLib) only - */ - public function __construct(AMQPExchange|AMQPChannel $exchange, ?string $exchangeName = null, int|string|Level $level = Level::Debug, bool $bubble = true) - { - if ($exchange instanceof AMQPChannel) { - $this->exchangeName = (string) $exchangeName; - } elseif ($exchangeName !== null) { - @trigger_error('The $exchangeName parameter can only be passed when using PhpAmqpLib, if using an AMQPExchange instance configure it beforehand', E_USER_DEPRECATED); - } - $this->exchange = $exchange; - - parent::__construct($level, $bubble); - } - - /** - * @return array - */ - public function getExtraAttributes(): array - { - return $this->extraAttributes; - } - - /** - * Configure extra attributes to pass to the AMQPExchange (if you are using the amqp extension) - * - * @param array $extraAttributes One of content_type, content_encoding, - * message_id, user_id, app_id, delivery_mode, - * priority, timestamp, expiration, type - * or reply_to, headers. - * @return $this - */ - public function setExtraAttributes(array $extraAttributes): self - { - $this->extraAttributes = $extraAttributes; - return $this; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $data = $record->formatted; - $routingKey = $this->getRoutingKey($record); - - if ($this->exchange instanceof AMQPExchange) { - $attributes = [ - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ]; - if (\count($this->extraAttributes) > 0) { - $attributes = array_merge($attributes, $this->extraAttributes); - } - $this->exchange->publish( - $data, - $routingKey, - 0, - $attributes - ); - } else { - $this->exchange->basic_publish( - $this->createAmqpMessage($data), - $this->exchangeName, - $routingKey - ); - } - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - if ($this->exchange instanceof AMQPExchange) { - parent::handleBatch($records); - - return; - } - - foreach ($records as $record) { - if (!$this->isHandling($record)) { - continue; - } - - $record = $this->processRecord($record); - $data = $this->getFormatter()->format($record); - - $this->exchange->batch_basic_publish( - $this->createAmqpMessage($data), - $this->exchangeName, - $this->getRoutingKey($record) - ); - } - - $this->exchange->publish_batch(); - } - - /** - * Gets the routing key for the AMQP exchange - */ - protected function getRoutingKey(LogRecord $record): string - { - $routingKey = sprintf('%s.%s', $record->level->name, $record->channel); - - return strtolower($routingKey); - } - - private function createAmqpMessage(string $data): AMQPMessage - { - $attributes = [ - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ]; - if (\count($this->extraAttributes) > 0) { - $attributes = array_merge($attributes, $this->extraAttributes); - } - return new AMQPMessage($data, $attributes); - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php deleted file mode 100644 index 5930ca488..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php +++ /dev/null @@ -1,301 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Monolog\Utils; -use Monolog\LogRecord; -use Monolog\Level; - -use function count; -use function headers_list; -use function stripos; - -/** - * Handler sending logs to browser's javascript console with no browser extension required - * - * @author Olivier Poitrey - */ -class BrowserConsoleHandler extends AbstractProcessingHandler -{ - protected static bool $initialized = false; - - /** @var LogRecord[] */ - protected static array $records = []; - - protected const FORMAT_HTML = 'html'; - protected const FORMAT_JS = 'js'; - protected const FORMAT_UNKNOWN = 'unknown'; - - /** - * @inheritDoc - * - * Formatted output may contain some formatting markers to be transferred to `console.log` using the %c format. - * - * Example of formatted string: - * - * You can do [[blue text]]{color: blue} or [[green background]]{background-color: green; color: white} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('[[%channel%]]{macro: autolabel} [[%level_name%]]{font-weight: bold} %message%'); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - // Accumulate records - static::$records[] = $record; - - // Register shutdown handler if not already done - if (!static::$initialized) { - static::$initialized = true; - $this->registerShutdownFunction(); - } - } - - /** - * Convert records to javascript console commands and send it to the browser. - * This method is automatically called on PHP shutdown if output is HTML or Javascript. - */ - public static function send(): void - { - $format = static::getResponseFormat(); - if ($format === self::FORMAT_UNKNOWN) { - return; - } - - if (count(static::$records) > 0) { - if ($format === self::FORMAT_HTML) { - static::writeOutput(''); - } else { // js format - static::writeOutput(self::generateScript()); - } - static::resetStatic(); - } - } - - public function close(): void - { - self::resetStatic(); - } - - public function reset(): void - { - parent::reset(); - - self::resetStatic(); - } - - /** - * Forget all logged records - */ - public static function resetStatic(): void - { - static::$records = []; - } - - /** - * Wrapper for register_shutdown_function to allow overriding - */ - protected function registerShutdownFunction(): void - { - if (PHP_SAPI !== 'cli') { - register_shutdown_function(['Monolog\Handler\BrowserConsoleHandler', 'send']); - } - } - - /** - * Wrapper for echo to allow overriding - */ - protected static function writeOutput(string $str): void - { - echo $str; - } - - /** - * Checks the format of the response - * - * If Content-Type is set to application/javascript or text/javascript -> js - * If Content-Type is set to text/html, or is unset -> html - * If Content-Type is anything else -> unknown - * - * @return string One of 'js', 'html' or 'unknown' - * @phpstan-return self::FORMAT_* - */ - protected static function getResponseFormat(): string - { - // Check content type - foreach (headers_list() as $header) { - if (stripos($header, 'content-type:') === 0) { - return static::getResponseFormatFromContentType($header); - } - } - - return self::FORMAT_HTML; - } - - /** - * @return string One of 'js', 'html' or 'unknown' - * @phpstan-return self::FORMAT_* - */ - protected static function getResponseFormatFromContentType(string $contentType): string - { - // This handler only works with HTML and javascript outputs - // text/javascript is obsolete in favour of application/javascript, but still used - if (stripos($contentType, 'application/javascript') !== false || stripos($contentType, 'text/javascript') !== false) { - return self::FORMAT_JS; - } - - if (stripos($contentType, 'text/html') !== false) { - return self::FORMAT_HTML; - } - - return self::FORMAT_UNKNOWN; - } - - private static function generateScript(): string - { - $script = []; - foreach (static::$records as $record) { - $context = self::dump('Context', $record->context); - $extra = self::dump('Extra', $record->extra); - - if (\count($context) === 0 && \count($extra) === 0) { - $script[] = self::call_array(self::getConsoleMethodForLevel($record->level), self::handleStyles($record->formatted)); - } else { - $script = array_merge( - $script, - [self::call_array('groupCollapsed', self::handleStyles($record->formatted))], - $context, - $extra, - [self::call('groupEnd')] - ); - } - } - - return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);"; - } - - private static function getConsoleMethodForLevel(Level $level): string - { - return match ($level) { - Level::Debug => 'debug', - Level::Info, Level::Notice => 'info', - Level::Warning => 'warn', - Level::Error, Level::Critical, Level::Alert, Level::Emergency => 'error', - }; - } - - /** - * @return string[] - */ - private static function handleStyles(string $formatted): array - { - $args = []; - $format = '%c' . $formatted; - preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); - - foreach (array_reverse($matches) as $match) { - $args[] = '"font-weight: normal"'; - $args[] = self::quote(self::handleCustomStyles($match[2][0], $match[1][0])); - - $pos = $match[0][1]; - $format = Utils::substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . Utils::substr($format, $pos + strlen($match[0][0])); - } - - $args[] = self::quote('font-weight: normal'); - $args[] = self::quote($format); - - return array_reverse($args); - } - - private static function handleCustomStyles(string $style, string $string): string - { - static $colors = ['blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey']; - static $labels = []; - - $style = preg_replace_callback('/macro\s*:(.*?)(?:;|$)/', function (array $m) use ($string, &$colors, &$labels) { - if (trim($m[1]) === 'autolabel') { - // Format the string as a label with consistent auto assigned background color - if (!isset($labels[$string])) { - $labels[$string] = $colors[count($labels) % count($colors)]; - } - $color = $labels[$string]; - - return "background-color: $color; color: white; border-radius: 3px; padding: 0 2px 0 2px"; - } - - return $m[1]; - }, $style); - - if (null === $style) { - $pcreErrorCode = preg_last_error(); - - throw new \RuntimeException('Failed to run preg_replace_callback: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); - } - - return $style; - } - - /** - * @param mixed[] $dict - * @return mixed[] - */ - private static function dump(string $title, array $dict): array - { - $script = []; - $dict = array_filter($dict); - if (\count($dict) === 0) { - return $script; - } - $script[] = self::call('log', self::quote('%c%s'), self::quote('font-weight: bold'), self::quote($title)); - foreach ($dict as $key => $value) { - $value = json_encode($value); - if (false === $value) { - $value = self::quote(''); - } - $script[] = self::call('log', self::quote('%s: %o'), self::quote((string) $key), $value); - } - - return $script; - } - - private static function quote(string $arg): string - { - return '"' . addcslashes($arg, "\"\n\\") . '"'; - } - - /** - * @param mixed $args - */ - private static function call(...$args): string - { - $method = array_shift($args); - if (!is_string($method)) { - throw new \UnexpectedValueException('Expected the first arg to be a string, got: '.var_export($method, true)); - } - - return self::call_array($method, $args); - } - - /** - * @param mixed[] $args - */ - private static function call_array(string $method, array $args): string - { - return 'c.' . $method . '(' . implode(', ', $args) . ');'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php deleted file mode 100644 index ff89faa8a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Buffers all records until closing the handler and then pass them as batch. - * - * This is useful for a MailHandler to send only one mail per request instead of - * sending one per log message. - * - * @author Christophe Coevoet - */ -class BufferHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - protected HandlerInterface $handler; - - protected int $bufferSize = 0; - - protected int $bufferLimit; - - protected bool $flushOnOverflow; - - /** @var LogRecord[] */ - protected array $buffer = []; - - protected bool $initialized = false; - - /** - * @param HandlerInterface $handler Handler. - * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded - */ - public function __construct(HandlerInterface $handler, int $bufferLimit = 0, int|string|Level $level = Level::Debug, bool $bubble = true, bool $flushOnOverflow = false) - { - parent::__construct($level, $bubble); - $this->handler = $handler; - $this->bufferLimit = $bufferLimit; - $this->flushOnOverflow = $flushOnOverflow; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if ($record->level->isLowerThan($this->level)) { - return false; - } - - if (!$this->initialized) { - // __destructor() doesn't get called on Fatal errors - register_shutdown_function([$this, 'close']); - $this->initialized = true; - } - - if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { - if ($this->flushOnOverflow) { - $this->flush(); - } else { - array_shift($this->buffer); - $this->bufferSize--; - } - } - - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - $this->buffer[] = $record; - $this->bufferSize++; - - return false === $this->bubble; - } - - public function flush(): void - { - if ($this->bufferSize === 0) { - return; - } - - $this->handler->handleBatch($this->buffer); - $this->clear(); - } - - public function __destruct() - { - // suppress the parent behavior since we already have register_shutdown_function() - // to call close(), and the reference contained there will prevent this from being - // GC'd until the end of the request - } - - /** - * @inheritDoc - */ - public function close(): void - { - $this->flush(); - - $this->handler->close(); - } - - /** - * Clears the buffer without flushing any messages down to the wrapped handler. - */ - public function clear(): void - { - $this->bufferSize = 0; - $this->buffer = []; - } - - public function reset(): void - { - $this->flush(); - - parent::reset(); - - $this->resetProcessors(); - - if ($this->handler instanceof ResettableInterface) { - $this->handler->reset(); - } - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php deleted file mode 100644 index 2f7f21d5f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\ChromePHPFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; -use Monolog\DateTimeImmutable; - -/** - * Handler sending logs to the ChromePHP extension (http://www.chromephp.com/) - * - * This also works out of the box with Firefox 43+ - * - * @author Christophe Coevoet - */ -class ChromePHPHandler extends AbstractProcessingHandler -{ - use WebRequestRecognizerTrait; - - /** - * Version of the extension - */ - protected const VERSION = '4.0'; - - /** - * Header name - */ - protected const HEADER_NAME = 'X-ChromeLogger-Data'; - - /** - * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+) - */ - protected const USER_AGENT_REGEX = '{\b(?:Chrome/\d+(?:\.\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}'; - - protected static bool $initialized = false; - - /** - * Tracks whether we sent too much data - * - * Chrome limits the headers to 4KB, so when we sent 3KB we stop sending - */ - protected static bool $overflowed = false; - - /** @var mixed[] */ - protected static array $json = [ - 'version' => self::VERSION, - 'columns' => ['label', 'log', 'backtrace', 'type'], - 'rows' => [], - ]; - - protected static bool $sendHeaders = true; - - /** - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - if (!function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s ChromePHPHandler'); - } - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - if (!$this->isWebRequest()) { - return; - } - - $messages = []; - - foreach ($records as $record) { - if ($record->level < $this->level) { - continue; - } - - $message = $this->processRecord($record); - $messages[] = $message; - } - - if (\count($messages) > 0) { - $messages = $this->getFormatter()->formatBatch($messages); - self::$json['rows'] = array_merge(self::$json['rows'], $messages); - $this->send(); - } - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ChromePHPFormatter(); - } - - /** - * Creates & sends header for a record - * - * @see sendHeader() - * @see send() - */ - protected function write(LogRecord $record): void - { - if (!$this->isWebRequest()) { - return; - } - - self::$json['rows'][] = $record->formatted; - - $this->send(); - } - - /** - * Sends the log header - * - * @see sendHeader() - */ - protected function send(): void - { - if (self::$overflowed || !self::$sendHeaders) { - return; - } - - if (!self::$initialized) { - self::$initialized = true; - - self::$sendHeaders = $this->headersAccepted(); - if (!self::$sendHeaders) { - return; - } - - self::$json['request_uri'] = $_SERVER['REQUEST_URI'] ?? ''; - } - - $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); - $data = base64_encode($json); - if (strlen($data) > 3 * 1024) { - self::$overflowed = true; - - $record = new LogRecord( - message: 'Incomplete logs, chrome header size limit reached', - level: Level::Warning, - channel: 'monolog', - datetime: new DateTimeImmutable(true), - ); - self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); - $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); - $data = base64_encode($json); - } - - if (trim($data) !== '') { - $this->sendHeader(static::HEADER_NAME, $data); - } - } - - /** - * Send header string to the client - */ - protected function sendHeader(string $header, string $content): void - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Verifies if the headers are accepted by the current user agent - */ - protected function headersAccepted(): bool - { - if (!isset($_SERVER['HTTP_USER_AGENT'])) { - return false; - } - - return preg_match(static::USER_AGENT_REGEX, $_SERVER['HTTP_USER_AGENT']) === 1; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php deleted file mode 100644 index 8d9c10e76..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\JsonFormatter; -use Monolog\Level; -use Monolog\LogRecord; - -/** - * CouchDB handler - * - * @author Markus Bachmann - * @phpstan-type Options array{ - * host: string, - * port: int, - * dbname: string, - * username: string|null, - * password: string|null - * } - * @phpstan-type InputOptions array{ - * host?: string, - * port?: int, - * dbname?: string, - * username?: string|null, - * password?: string|null - * } - */ -class CouchDBHandler extends AbstractProcessingHandler -{ - /** - * @var mixed[] - * @phpstan-var Options - */ - private array $options; - - /** - * @param mixed[] $options - * - * @phpstan-param InputOptions $options - */ - public function __construct(array $options = [], int|string|Level $level = Level::Debug, bool $bubble = true) - { - $this->options = array_merge([ - 'host' => 'localhost', - 'port' => 5984, - 'dbname' => 'logger', - 'username' => null, - 'password' => null, - ], $options); - - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $basicAuth = null; - if (null !== $this->options['username'] && null !== $this->options['password']) { - $basicAuth = sprintf('%s:%s@', $this->options['username'], $this->options['password']); - } - - $url = 'http://'.$basicAuth.$this->options['host'].':'.$this->options['port'].'/'.$this->options['dbname']; - $context = stream_context_create([ - 'http' => [ - 'method' => 'POST', - 'content' => $record->formatted, - 'ignore_errors' => true, - 'max_redirects' => 0, - 'header' => 'Content-type: application/json', - ], - ]); - - if (false === @file_get_contents($url, false, $context)) { - throw new \RuntimeException(sprintf('Could not connect to %s', $url)); - } - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php deleted file mode 100644 index 8388f5ade..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php +++ /dev/null @@ -1,167 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Logs to Cube. - * - * @link https://github.com/square/cube/wiki - * @author Wan Chen - * @deprecated Since 2.8.0 and 3.2.0, Cube appears abandoned and thus we will drop this handler in Monolog 4 - */ -class CubeHandler extends AbstractProcessingHandler -{ - private ?\Socket $udpConnection = null; - private ?\CurlHandle $httpConnection = null; - private string $scheme; - private string $host; - private int $port; - /** @var string[] */ - private array $acceptedSchemes = ['http', 'udp']; - - /** - * Create a Cube handler - * - * @throws \UnexpectedValueException when given url is not a valid url. - * A valid url must consist of three parts : protocol://host:port - * Only valid protocols used by Cube are http and udp - */ - public function __construct(string $url, int|string|Level $level = Level::Debug, bool $bubble = true) - { - $urlInfo = parse_url($url); - - if ($urlInfo === false || !isset($urlInfo['scheme'], $urlInfo['host'], $urlInfo['port'])) { - throw new \UnexpectedValueException('URL "'.$url.'" is not valid'); - } - - if (!in_array($urlInfo['scheme'], $this->acceptedSchemes, true)) { - throw new \UnexpectedValueException( - 'Invalid protocol (' . $urlInfo['scheme'] . ').' - . ' Valid options are ' . implode(', ', $this->acceptedSchemes) - ); - } - - $this->scheme = $urlInfo['scheme']; - $this->host = $urlInfo['host']; - $this->port = $urlInfo['port']; - - parent::__construct($level, $bubble); - } - - /** - * Establish a connection to an UDP socket - * - * @throws \LogicException when unable to connect to the socket - * @throws MissingExtensionException when there is no socket extension - */ - protected function connectUdp(): void - { - if (!extension_loaded('sockets')) { - throw new MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler'); - } - - $udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0); - if (false === $udpConnection) { - throw new \LogicException('Unable to create a socket'); - } - - $this->udpConnection = $udpConnection; - if (!socket_connect($this->udpConnection, $this->host, $this->port)) { - throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port); - } - } - - /** - * Establish a connection to an http server - * - * @throws \LogicException when unable to connect to the socket - * @throws MissingExtensionException when no curl extension - */ - protected function connectHttp(): void - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is required to use http URLs with the CubeHandler'); - } - - $httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put'); - if (false === $httpConnection) { - throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port); - } - - $this->httpConnection = $httpConnection; - curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST"); - curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $date = $record->datetime; - - $data = ['time' => $date->format('Y-m-d\TH:i:s.uO')]; - $context = $record->context; - - if (isset($context['type'])) { - $data['type'] = $context['type']; - unset($context['type']); - } else { - $data['type'] = $record->channel; - } - - $data['data'] = $context; - $data['data']['level'] = $record->level; - - if ($this->scheme === 'http') { - $this->writeHttp(Utils::jsonEncode($data)); - } else { - $this->writeUdp(Utils::jsonEncode($data)); - } - } - - private function writeUdp(string $data): void - { - if (null === $this->udpConnection) { - $this->connectUdp(); - } - - if (null === $this->udpConnection) { - throw new \LogicException('No UDP socket could be opened'); - } - - socket_send($this->udpConnection, $data, strlen($data), 0); - } - - private function writeHttp(string $data): void - { - if (null === $this->httpConnection) { - $this->connectHttp(); - } - - if (null === $this->httpConnection) { - throw new \LogicException('No connection could be established'); - } - - curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']'); - curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, [ - 'Content-Type: application/json', - 'Content-Length: ' . strlen('['.$data.']'), - ]); - - Curl\Util::execute($this->httpConnection, 5, false); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php deleted file mode 100644 index 4decf0e62..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\Curl; - -use CurlHandle; - -/** - * This class is marked as internal and it is not under the BC promise of the package. - * - * @internal - */ -final class Util -{ - /** @var array */ - private static array $retriableErrorCodes = [ - CURLE_COULDNT_RESOLVE_HOST, - CURLE_COULDNT_CONNECT, - CURLE_HTTP_NOT_FOUND, - CURLE_READ_ERROR, - CURLE_OPERATION_TIMEOUTED, - CURLE_HTTP_POST_ERROR, - CURLE_SSL_CONNECT_ERROR, - ]; - - /** - * Executes a CURL request with optional retries and exception on failure - * - * @param CurlHandle $ch curl handler - * @return bool|string @see curl_exec - */ - public static function execute(CurlHandle $ch, int $retries = 5, bool $closeAfterDone = true) - { - while ($retries--) { - $curlResponse = curl_exec($ch); - if ($curlResponse === false) { - $curlErrno = curl_errno($ch); - - if (false === in_array($curlErrno, self::$retriableErrorCodes, true) || $retries === 0) { - $curlError = curl_error($ch); - - if ($closeAfterDone) { - curl_close($ch); - } - - throw new \RuntimeException(sprintf('Curl error (code %d): %s', $curlErrno, $curlError)); - } - - continue; - } - - if ($closeAfterDone) { - curl_close($ch); - } - - return $curlResponse; - } - - return false; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php deleted file mode 100644 index b8ec90099..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Simple handler wrapper that deduplicates log records across multiple requests - * - * It also includes the BufferHandler functionality and will buffer - * all messages until the end of the request or flush() is called. - * - * This works by storing all log records' messages above $deduplicationLevel - * to the file specified by $deduplicationStore. When further logs come in at the end of the - * request (or when flush() is called), all those above $deduplicationLevel are checked - * against the existing stored logs. If they match and the timestamps in the stored log is - * not older than $time seconds, the new log record is discarded. If no log record is new, the - * whole data set is discarded. - * - * This is mainly useful in combination with Mail handlers or things like Slack or HipChat handlers - * that send messages to people, to avoid spamming with the same message over and over in case of - * a major component failure like a database server being down which makes all requests fail in the - * same way. - * - * @author Jordi Boggiano - */ -class DeduplicationHandler extends BufferHandler -{ - protected string $deduplicationStore; - - protected Level $deduplicationLevel; - - protected int $time; - - private bool $gc = false; - - /** - * @param HandlerInterface $handler Handler. - * @param string|null $deduplicationStore The file/path where the deduplication log should be kept - * @param int|string|Level|LogLevel::* $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes - * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $deduplicationLevel - */ - public function __construct(HandlerInterface $handler, ?string $deduplicationStore = null, int|string|Level $deduplicationLevel = Level::Error, int $time = 60, bool $bubble = true) - { - parent::__construct($handler, 0, Level::Debug, $bubble, false); - - $this->deduplicationStore = $deduplicationStore === null ? sys_get_temp_dir() . '/monolog-dedup-' . substr(md5(__FILE__), 0, 20) .'.log' : $deduplicationStore; - $this->deduplicationLevel = Logger::toMonologLevel($deduplicationLevel); - $this->time = $time; - } - - public function flush(): void - { - if ($this->bufferSize === 0) { - return; - } - - $passthru = null; - - foreach ($this->buffer as $record) { - if ($record->level->value >= $this->deduplicationLevel->value) { - $passthru = $passthru === true || !$this->isDuplicate($record); - if ($passthru) { - $this->appendRecord($record); - } - } - } - - // default of null is valid as well as if no record matches duplicationLevel we just pass through - if ($passthru === true || $passthru === null) { - $this->handler->handleBatch($this->buffer); - } - - $this->clear(); - - if ($this->gc) { - $this->collectLogs(); - } - } - - private function isDuplicate(LogRecord $record): bool - { - if (!file_exists($this->deduplicationStore)) { - return false; - } - - $store = file($this->deduplicationStore, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); - if (!is_array($store)) { - return false; - } - - $yesterday = time() - 86400; - $timestampValidity = $record->datetime->getTimestamp() - $this->time; - $expectedMessage = preg_replace('{[\r\n].*}', '', $record->message); - - for ($i = count($store) - 1; $i >= 0; $i--) { - list($timestamp, $level, $message) = explode(':', $store[$i], 3); - - if ($level === $record->level->getName() && $message === $expectedMessage && $timestamp > $timestampValidity) { - return true; - } - - if ($timestamp < $yesterday) { - $this->gc = true; - } - } - - return false; - } - - private function collectLogs(): void - { - if (!file_exists($this->deduplicationStore)) { - return; - } - - $handle = fopen($this->deduplicationStore, 'rw+'); - - if (false === $handle) { - throw new \RuntimeException('Failed to open file for reading and writing: ' . $this->deduplicationStore); - } - - flock($handle, LOCK_EX); - $validLogs = []; - - $timestampValidity = time() - $this->time; - - while (!feof($handle)) { - $log = fgets($handle); - if (is_string($log) && '' !== $log && substr($log, 0, 10) >= $timestampValidity) { - $validLogs[] = $log; - } - } - - ftruncate($handle, 0); - rewind($handle); - foreach ($validLogs as $log) { - fwrite($handle, $log); - } - - flock($handle, LOCK_UN); - fclose($handle); - - $this->gc = false; - } - - private function appendRecord(LogRecord $record): void - { - file_put_contents($this->deduplicationStore, $record->datetime->getTimestamp() . ':' . $record->level->getName() . ':' . preg_replace('{[\r\n].*}', '', $record->message) . "\n", FILE_APPEND); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php deleted file mode 100644 index eab9f1089..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; -use Doctrine\CouchDB\CouchDBClient; -use Monolog\LogRecord; - -/** - * CouchDB handler for Doctrine CouchDB ODM - * - * @author Markus Bachmann - */ -class DoctrineCouchDBHandler extends AbstractProcessingHandler -{ - private CouchDBClient $client; - - public function __construct(CouchDBClient $client, int|string|Level $level = Level::Debug, bool $bubble = true) - { - $this->client = $client; - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->client->postDocument($record->formatted); - } - - protected function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php deleted file mode 100644 index f1c5a9590..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Aws\Sdk; -use Aws\DynamoDb\DynamoDbClient; -use Monolog\Formatter\FormatterInterface; -use Aws\DynamoDb\Marshaler; -use Monolog\Formatter\ScalarFormatter; -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Amazon DynamoDB handler (http://aws.amazon.com/dynamodb/) - * - * @link https://github.com/aws/aws-sdk-php/ - * @author Andrew Lawson - */ -class DynamoDbHandler extends AbstractProcessingHandler -{ - public const DATE_FORMAT = 'Y-m-d\TH:i:s.uO'; - - protected DynamoDbClient $client; - - protected string $table; - - protected Marshaler $marshaler; - - public function __construct(DynamoDbClient $client, string $table, int|string|Level $level = Level::Debug, bool $bubble = true) - { - $this->marshaler = new Marshaler; - - $this->client = $client; - $this->table = $table; - - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $filtered = $this->filterEmptyFields($record->formatted); - $formatted = $this->marshaler->marshalItem($filtered); - - $this->client->putItem([ - 'TableName' => $this->table, - 'Item' => $formatted, - ]); - } - - /** - * @param mixed[] $record - * @return mixed[] - */ - protected function filterEmptyFields(array $record): array - { - return array_filter($record, function ($value) { - return [] !== $value; - }); - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ScalarFormatter(self::DATE_FORMAT); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php deleted file mode 100644 index d9b85b4d0..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Elastica\Document; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\ElasticaFormatter; -use Monolog\Level; -use Elastica\Client; -use Elastica\Exception\ExceptionInterface; -use Monolog\LogRecord; - -/** - * Elastic Search handler - * - * Usage example: - * - * $client = new \Elastica\Client(); - * $options = array( - * 'index' => 'elastic_index_name', - * 'type' => 'elastic_doc_type', Types have been removed in Elastica 7 - * ); - * $handler = new ElasticaHandler($client, $options); - * $log = new Logger('application'); - * $log->pushHandler($handler); - * - * @author Jelle Vink - * @phpstan-type Options array{ - * index: string, - * type: string, - * ignore_error: bool - * } - * @phpstan-type InputOptions array{ - * index?: string, - * type?: string, - * ignore_error?: bool - * } - */ -class ElasticaHandler extends AbstractProcessingHandler -{ - protected Client $client; - - /** - * @var mixed[] Handler config options - * @phpstan-var Options - */ - protected array $options; - - /** - * @param Client $client Elastica Client object - * @param mixed[] $options Handler configuration - * - * @phpstan-param InputOptions $options - */ - public function __construct(Client $client, array $options = [], int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - $this->client = $client; - $this->options = array_merge( - [ - 'index' => 'monolog', // Elastic index name - 'type' => 'record', // Elastic document type - 'ignore_error' => false, // Suppress Elastica exceptions - ], - $options - ); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->bulkSend([$record->formatted]); - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($formatter instanceof ElasticaFormatter) { - return parent::setFormatter($formatter); - } - - throw new \InvalidArgumentException('ElasticaHandler is only compatible with ElasticaFormatter'); - } - - /** - * @return mixed[] - * - * @phpstan-return Options - */ - public function getOptions(): array - { - return $this->options; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ElasticaFormatter($this->options['index'], $this->options['type']); - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $documents = $this->getFormatter()->formatBatch($records); - $this->bulkSend($documents); - } - - /** - * Use Elasticsearch bulk API to send list of documents - * - * @param Document[] $documents - * - * @throws \RuntimeException - */ - protected function bulkSend(array $documents): void - { - try { - $this->client->addDocuments($documents); - } catch (ExceptionInterface $e) { - if (!$this->options['ignore_error']) { - throw new \RuntimeException("Error sending messages to Elasticsearch", 0, $e); - } - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php deleted file mode 100644 index 74cc7b6e6..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php +++ /dev/null @@ -1,230 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Elastic\Elasticsearch\Response\Elasticsearch; -use Throwable; -use RuntimeException; -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\ElasticsearchFormatter; -use InvalidArgumentException; -use Elasticsearch\Common\Exceptions\RuntimeException as ElasticsearchRuntimeException; -use Elasticsearch\Client; -use Monolog\LogRecord; -use Elastic\Elasticsearch\Exception\InvalidArgumentException as ElasticInvalidArgumentException; -use Elastic\Elasticsearch\Client as Client8; - -/** - * Elasticsearch handler - * - * @link https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html - * - * Simple usage example: - * - * $client = \Elasticsearch\ClientBuilder::create() - * ->setHosts($hosts) - * ->build(); - * - * $options = array( - * 'index' => 'elastic_index_name', - * 'type' => 'elastic_doc_type', - * ); - * $handler = new ElasticsearchHandler($client, $options); - * $log = new Logger('application'); - * $log->pushHandler($handler); - * - * @author Avtandil Kikabidze - * @phpstan-type Options array{ - * index: string, - * type: string, - * ignore_error: bool, - * op_type: 'index'|'create' - * } - * @phpstan-type InputOptions array{ - * index?: string, - * type?: string, - * ignore_error?: bool, - * op_type?: 'index'|'create' - * } - */ -class ElasticsearchHandler extends AbstractProcessingHandler -{ - protected Client|Client8 $client; - - /** - * @var mixed[] Handler config options - * @phpstan-var Options - */ - protected array $options; - - /** - * @var bool - */ - private $needsType; - - /** - * @param Client|Client8 $client Elasticsearch Client object - * @param mixed[] $options Handler configuration - * - * @phpstan-param InputOptions $options - */ - public function __construct(Client|Client8 $client, array $options = [], int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - $this->client = $client; - $this->options = array_merge( - [ - 'index' => 'monolog', // Elastic index name - 'type' => '_doc', // Elastic document type - 'ignore_error' => false, // Suppress Elasticsearch exceptions - 'op_type' => 'index', // Elastic op_type (index or create) (https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#docs-index-api-op_type) - ], - $options - ); - - if ($client instanceof Client8 || $client::VERSION[0] === '7') { - $this->needsType = false; - // force the type to _doc for ES8/ES7 - $this->options['type'] = '_doc'; - } else { - $this->needsType = true; - } - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->bulkSend([$record->formatted]); - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($formatter instanceof ElasticsearchFormatter) { - return parent::setFormatter($formatter); - } - - throw new InvalidArgumentException('ElasticsearchHandler is only compatible with ElasticsearchFormatter'); - } - - /** - * Getter options - * - * @return mixed[] - * - * @phpstan-return Options - */ - public function getOptions(): array - { - return $this->options; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ElasticsearchFormatter($this->options['index'], $this->options['type']); - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $documents = $this->getFormatter()->formatBatch($records); - $this->bulkSend($documents); - } - - /** - * Use Elasticsearch bulk API to send list of documents - * - * @param array> $records Records + _index/_type keys - * @throws \RuntimeException - */ - protected function bulkSend(array $records): void - { - try { - $params = [ - 'body' => [], - ]; - - foreach ($records as $record) { - $params['body'][] = [ - $this->options['op_type'] => $this->needsType ? [ - '_index' => $record['_index'], - '_type' => $record['_type'], - ] : [ - '_index' => $record['_index'], - ], - ]; - unset($record['_index'], $record['_type']); - - $params['body'][] = $record; - } - - /** @var Elasticsearch */ - $responses = $this->client->bulk($params); - - if ($responses['errors'] === true) { - throw $this->createExceptionFromResponses($responses); - } - } catch (Throwable $e) { - if (! $this->options['ignore_error']) { - throw new RuntimeException('Error sending messages to Elasticsearch', 0, $e); - } - } - } - - /** - * Creates elasticsearch exception from responses array - * - * Only the first error is converted into an exception. - * - * @param mixed[]|Elasticsearch $responses returned by $this->client->bulk() - */ - protected function createExceptionFromResponses($responses): Throwable - { - foreach ($responses['items'] ?? [] as $item) { - if (isset($item['index']['error'])) { - return $this->createExceptionFromError($item['index']['error']); - } - } - - if (class_exists(ElasticInvalidArgumentException::class)) { - return new ElasticInvalidArgumentException('Elasticsearch failed to index one or more records.'); - } - - return new ElasticsearchRuntimeException('Elasticsearch failed to index one or more records.'); - } - - /** - * Creates elasticsearch exception from error array - * - * @param mixed[] $error - */ - protected function createExceptionFromError(array $error): Throwable - { - $previous = isset($error['caused_by']) ? $this->createExceptionFromError($error['caused_by']) : null; - - if (class_exists(ElasticInvalidArgumentException::class)) { - return new ElasticInvalidArgumentException($error['type'] . ': ' . $error['reason'], 0, $previous); - } - - return new ElasticsearchRuntimeException($error['type'] . ': ' . $error['reason'], 0, $previous); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php deleted file mode 100644 index 571c439e1..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Stores to PHP error_log() handler. - * - * @author Elan Ruusamäe - */ -class ErrorLogHandler extends AbstractProcessingHandler -{ - public const OPERATING_SYSTEM = 0; - public const SAPI = 4; - - protected int $messageType; - protected bool $expandNewlines; - - /** - * @param int $messageType Says where the error should go. - * @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries - * - * @throws \InvalidArgumentException If an unsupported message type is set - */ - public function __construct(int $messageType = self::OPERATING_SYSTEM, int|string|Level $level = Level::Debug, bool $bubble = true, bool $expandNewlines = false) - { - parent::__construct($level, $bubble); - - if (false === in_array($messageType, self::getAvailableTypes(), true)) { - $message = sprintf('The given message type "%s" is not supported', print_r($messageType, true)); - - throw new \InvalidArgumentException($message); - } - - $this->messageType = $messageType; - $this->expandNewlines = $expandNewlines; - } - - /** - * @return int[] With all available types - */ - public static function getAvailableTypes(): array - { - return [ - self::OPERATING_SYSTEM, - self::SAPI, - ]; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('[%datetime%] %channel%.%level_name%: %message% %context% %extra%'); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if (!$this->expandNewlines) { - error_log((string) $record->formatted, $this->messageType); - - return; - } - - $lines = preg_split('{[\r\n]+}', (string) $record->formatted); - if ($lines === false) { - $pcreErrorCode = preg_last_error(); - - throw new \RuntimeException('Failed to preg_split formatted string: ' . $pcreErrorCode . ' / '. Utils::pcreLastErrorMessage($pcreErrorCode)); - } - foreach ($lines as $line) { - error_log($line, $this->messageType); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php deleted file mode 100644 index 58318bee7..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Throwable; -use Monolog\LogRecord; - -/** - * Forwards records to at most one handler - * - * If a handler fails, the exception is suppressed and the record is forwarded to the next handler. - * - * As soon as one handler handles a record successfully, the handling stops there. - */ -class FallbackGroupHandler extends GroupHandler -{ - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - foreach ($this->handlers as $handler) { - try { - $handler->handle(clone $record); - break; - } catch (Throwable $e) { - // What throwable? - } - } - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - if (\count($this->processors) > 0) { - $processed = []; - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - $records = $processed; - } - - foreach ($this->handlers as $handler) { - try { - $handler->handleBatch(array_map(fn ($record) => clone $record, $records)); - break; - } catch (Throwable $e) { - // What throwable? - } - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php deleted file mode 100644 index 5fa558e19..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php +++ /dev/null @@ -1,202 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Closure; -use Monolog\Level; -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Simple handler wrapper that filters records based on a list of levels - * - * It can be configured with an exact list of levels to allow, or a min/max level. - * - * @author Hennadiy Verkh - * @author Jordi Boggiano - */ -class FilterHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * Handler or factory Closure($record, $this) - * - * @phpstan-var (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface - */ - protected Closure|HandlerInterface $handler; - - /** - * Minimum level for logs that are passed to handler - * - * @var bool[] Map of Level value => true - * @phpstan-var array, true> - */ - protected array $acceptedLevels; - - /** - * Whether the messages that are handled can bubble up the stack or not - */ - protected bool $bubble; - - /** - * @phpstan-param (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface $handler - * - * @param Closure|HandlerInterface $handler Handler or factory Closure($record|null, $filterHandler). - * @param int|string|Level|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided - * @param int|string|Level|LogLevel::* $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @phpstan-param value-of|value-of|Level|LogLevel::*|array|value-of|Level|LogLevel::*> $minLevelOrList - * @phpstan-param value-of|value-of|Level|LogLevel::* $maxLevel - */ - public function __construct(Closure|HandlerInterface $handler, int|string|Level|array $minLevelOrList = Level::Debug, int|string|Level $maxLevel = Level::Emergency, bool $bubble = true) - { - $this->handler = $handler; - $this->bubble = $bubble; - $this->setAcceptedLevels($minLevelOrList, $maxLevel); - } - - /** - * @phpstan-return list List of levels - */ - public function getAcceptedLevels(): array - { - return array_map(fn (int $level) => Level::from($level), array_keys($this->acceptedLevels)); - } - - /** - * @param int|string|Level|LogLevel::*|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided - * @param int|string|Level|LogLevel::* $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array - * @return $this - * - * @phpstan-param value-of|value-of|Level|LogLevel::*|array|value-of|Level|LogLevel::*> $minLevelOrList - * @phpstan-param value-of|value-of|Level|LogLevel::* $maxLevel - */ - public function setAcceptedLevels(int|string|Level|array $minLevelOrList = Level::Debug, int|string|Level $maxLevel = Level::Emergency): self - { - if (is_array($minLevelOrList)) { - $acceptedLevels = array_map(Logger::toMonologLevel(...), $minLevelOrList); - } else { - $minLevelOrList = Logger::toMonologLevel($minLevelOrList); - $maxLevel = Logger::toMonologLevel($maxLevel); - $acceptedLevels = array_values(array_filter(Level::cases(), fn (Level $level) => $level->value >= $minLevelOrList->value && $level->value <= $maxLevel->value)); - } - $this->acceptedLevels = []; - foreach ($acceptedLevels as $level) { - $this->acceptedLevels[$level->value] = true; - } - - return $this; - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return isset($this->acceptedLevels[$record->level->value]); - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - $this->getHandler($record)->handle($record); - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $filtered = []; - foreach ($records as $record) { - if ($this->isHandling($record)) { - $filtered[] = $record; - } - } - - if (count($filtered) > 0) { - $this->getHandler($filtered[count($filtered) - 1])->handleBatch($filtered); - } - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory, this will trigger the handler's instantiation. - */ - public function getHandler(LogRecord $record = null): HandlerInterface - { - if (!$this->handler instanceof HandlerInterface) { - $handler = ($this->handler)($record, $this); - if (!$handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory Closure should return a HandlerInterface"); - } - $this->handler = $handler; - } - - return $this->handler; - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - public function reset(): void - { - $this->resetProcessors(); - - if ($this->getHandler() instanceof ResettableInterface) { - $this->getHandler()->reset(); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php deleted file mode 100644 index e8a1b0b0d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\LogRecord; - -/** - * Interface for activation strategies for the FingersCrossedHandler. - * - * @author Johannes M. Schmitt - */ -interface ActivationStrategyInterface -{ - /** - * Returns whether the given record activates the handler. - */ - public function isHandlerActivated(LogRecord $record): bool; -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php deleted file mode 100644 index 383e19af9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Channel and Error level based monolog activation strategy. Allows to trigger activation - * based on level per channel. e.g. trigger activation on level 'ERROR' by default, except - * for records of the 'sql' channel; those should trigger activation on level 'WARN'. - * - * Example: - * - * - * $activationStrategy = new ChannelLevelActivationStrategy( - * Level::Critical, - * array( - * 'request' => Level::Alert, - * 'sensitive' => Level::Error, - * ) - * ); - * $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy); - * - * - * @author Mike Meessen - */ -class ChannelLevelActivationStrategy implements ActivationStrategyInterface -{ - private Level $defaultActionLevel; - - /** - * @var array - */ - private array $channelToActionLevel; - - /** - * @param int|string|Level|LogLevel::* $defaultActionLevel The default action level to be used if the record's category doesn't match any - * @param array $channelToActionLevel An array that maps channel names to action levels. - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $defaultActionLevel - * @phpstan-param array|value-of|Level|LogLevel::*> $channelToActionLevel - */ - public function __construct(int|string|Level $defaultActionLevel, array $channelToActionLevel = []) - { - $this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel); - $this->channelToActionLevel = array_map(Logger::toMonologLevel(...), $channelToActionLevel); - } - - public function isHandlerActivated(LogRecord $record): bool - { - if (isset($this->channelToActionLevel[$record->channel])) { - return $record->level->value >= $this->channelToActionLevel[$record->channel]->value; - } - - return $record->level->value >= $this->defaultActionLevel->value; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php deleted file mode 100644 index c3ca2967a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\Level; -use Monolog\LogRecord; -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Error level based activation strategy. - * - * @author Johannes M. Schmitt - */ -class ErrorLevelActivationStrategy implements ActivationStrategyInterface -{ - private Level $actionLevel; - - /** - * @param int|string|Level $actionLevel Level or name or value - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $actionLevel - */ - public function __construct(int|string|Level $actionLevel) - { - $this->actionLevel = Logger::toMonologLevel($actionLevel); - } - - public function isHandlerActivated(LogRecord $record): bool - { - return $record->level->value >= $this->actionLevel->value; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php deleted file mode 100644 index 1c3df386d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +++ /dev/null @@ -1,242 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Closure; -use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; -use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; -use Monolog\Level; -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Buffers all records until a certain level is reached - * - * The advantage of this approach is that you don't get any clutter in your log files. - * Only requests which actually trigger an error (or whatever your actionLevel is) will be - * in the logs, but they will contain all records, not only those above the level threshold. - * - * You can then have a passthruLevel as well which means that at the end of the request, - * even if it did not get activated, it will still send through log records of e.g. at least a - * warning level. - * - * You can find the various activation strategies in the - * Monolog\Handler\FingersCrossed\ namespace. - * - * @author Jordi Boggiano - */ -class FingersCrossedHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * Handler or factory Closure($record, $this) - * - * @phpstan-var (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface - */ - protected Closure|HandlerInterface $handler; - - protected ActivationStrategyInterface $activationStrategy; - - protected bool $buffering = true; - - protected int $bufferSize; - - /** @var LogRecord[] */ - protected array $buffer = []; - - protected bool $stopBuffering; - - protected Level|null $passthruLevel = null; - - protected bool $bubble; - - /** - * @phpstan-param (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface $handler - * - * @param Closure|HandlerInterface $handler Handler or factory Closure($record|null, $fingersCrossedHandler). - * @param int|string|Level|LogLevel::* $activationStrategy Strategy which determines when this handler takes action, or a level name/value at which the handler is activated - * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) - * @param int|string|Level|LogLevel::*|null $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered - * - * @phpstan-param value-of|value-of|Level|LogLevel::*|ActivationStrategyInterface $activationStrategy - * @phpstan-param value-of|value-of|Level|LogLevel::* $passthruLevel - */ - public function __construct(Closure|HandlerInterface $handler, int|string|Level|ActivationStrategyInterface $activationStrategy = null, int $bufferSize = 0, bool $bubble = true, bool $stopBuffering = true, int|string|Level|null $passthruLevel = null) - { - if (null === $activationStrategy) { - $activationStrategy = new ErrorLevelActivationStrategy(Level::Warning); - } - - // convert simple int activationStrategy to an object - if (!$activationStrategy instanceof ActivationStrategyInterface) { - $activationStrategy = new ErrorLevelActivationStrategy($activationStrategy); - } - - $this->handler = $handler; - $this->activationStrategy = $activationStrategy; - $this->bufferSize = $bufferSize; - $this->bubble = $bubble; - $this->stopBuffering = $stopBuffering; - - if ($passthruLevel !== null) { - $this->passthruLevel = Logger::toMonologLevel($passthruLevel); - } - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return true; - } - - /** - * Manually activate this logger regardless of the activation strategy - */ - public function activate(): void - { - if ($this->stopBuffering) { - $this->buffering = false; - } - - $this->getHandler(end($this->buffer) ?: null)->handleBatch($this->buffer); - $this->buffer = []; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - if ($this->buffering) { - $this->buffer[] = $record; - if ($this->bufferSize > 0 && count($this->buffer) > $this->bufferSize) { - array_shift($this->buffer); - } - if ($this->activationStrategy->isHandlerActivated($record)) { - $this->activate(); - } - } else { - $this->getHandler($record)->handle($record); - } - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function close(): void - { - $this->flushBuffer(); - - $this->getHandler()->close(); - } - - public function reset(): void - { - $this->flushBuffer(); - - $this->resetProcessors(); - - if ($this->getHandler() instanceof ResettableInterface) { - $this->getHandler()->reset(); - } - } - - /** - * Clears the buffer without flushing any messages down to the wrapped handler. - * - * It also resets the handler to its initial buffering state. - */ - public function clear(): void - { - $this->buffer = []; - $this->reset(); - } - - /** - * Resets the state of the handler. Stops forwarding records to the wrapped handler. - */ - private function flushBuffer(): void - { - if (null !== $this->passthruLevel) { - $passthruLevel = $this->passthruLevel; - $this->buffer = array_filter($this->buffer, static function ($record) use ($passthruLevel) { - return $passthruLevel->includes($record->level); - }); - if (count($this->buffer) > 0) { - $this->getHandler(end($this->buffer))->handleBatch($this->buffer); - } - } - - $this->buffer = []; - $this->buffering = true; - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory, this will trigger the handler's instantiation. - */ - public function getHandler(LogRecord $record = null): HandlerInterface - { - if (!$this->handler instanceof HandlerInterface) { - $handler = ($this->handler)($record, $this); - if (!$handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory Closure should return a HandlerInterface"); - } - $this->handler = $handler; - } - - return $this->handler; - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php deleted file mode 100644 index 6b9e5103a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\WildfireFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol. - * - * @author Eric Clemmons (@ericclemmons) - */ -class FirePHPHandler extends AbstractProcessingHandler -{ - use WebRequestRecognizerTrait; - - /** - * WildFire JSON header message format - */ - protected const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; - - /** - * FirePHP structure for parsing messages & their presentation - */ - protected const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; - - /** - * Must reference a "known" plugin, otherwise headers won't display in FirePHP - */ - protected const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; - - /** - * Header prefix for Wildfire to recognize & parse headers - */ - protected const HEADER_PREFIX = 'X-Wf'; - - /** - * Whether or not Wildfire vendor-specific headers have been generated & sent yet - */ - protected static bool $initialized = false; - - /** - * Shared static message index between potentially multiple handlers - */ - protected static int $messageIndex = 1; - - protected static bool $sendHeaders = true; - - /** - * Base header creation function used by init headers & record headers - * - * @param array $meta Wildfire Plugin, Protocol & Structure Indexes - * @param string $message Log message - * - * @return array Complete header string ready for the client as key and message as value - * - * @phpstan-return non-empty-array - */ - protected function createHeader(array $meta, string $message): array - { - $header = sprintf('%s-%s', static::HEADER_PREFIX, join('-', $meta)); - - return [$header => $message]; - } - - /** - * Creates message header from record - * - * @return array - * - * @phpstan-return non-empty-array - * - * @see createHeader() - */ - protected function createRecordHeader(LogRecord $record): array - { - // Wildfire is extensible to support multiple protocols & plugins in a single request, - // but we're not taking advantage of that (yet), so we're using "1" for simplicity's sake. - return $this->createHeader( - [1, 1, 1, self::$messageIndex++], - $record->formatted - ); - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new WildfireFormatter(); - } - - /** - * Wildfire initialization headers to enable message parsing - * - * @see createHeader() - * @see sendHeader() - * - * @return array - */ - protected function getInitHeaders(): array - { - // Initial payload consists of required headers for Wildfire - return array_merge( - $this->createHeader(['Protocol', 1], static::PROTOCOL_URI), - $this->createHeader([1, 'Structure', 1], static::STRUCTURE_URI), - $this->createHeader([1, 'Plugin', 1], static::PLUGIN_URI) - ); - } - - /** - * Send header string to the client - */ - protected function sendHeader(string $header, string $content): void - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Creates & sends header for a record, ensuring init headers have been sent prior - * - * @see sendHeader() - * @see sendInitHeaders() - */ - protected function write(LogRecord $record): void - { - if (!self::$sendHeaders || !$this->isWebRequest()) { - return; - } - - // WildFire-specific headers must be sent prior to any messages - if (!self::$initialized) { - self::$initialized = true; - - self::$sendHeaders = $this->headersAccepted(); - if (!self::$sendHeaders) { - return; - } - - foreach ($this->getInitHeaders() as $header => $content) { - $this->sendHeader($header, $content); - } - } - - $header = $this->createRecordHeader($record); - if (trim(current($header)) !== '') { - $this->sendHeader(key($header), current($header)); - } - } - - /** - * Verifies if the headers are accepted by the current user agent - */ - protected function headersAccepted(): bool - { - if (isset($_SERVER['HTTP_USER_AGENT']) && 1 === preg_match('{\bFirePHP/\d+\.\d+\b}', $_SERVER['HTTP_USER_AGENT'])) { - return true; - } - - return isset($_SERVER['HTTP_X_FIREPHP_VERSION']); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php deleted file mode 100644 index 220648223..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Sends logs to Fleep.io using Webhook integrations - * - * You'll need a Fleep.io account to use this handler. - * - * @see https://fleep.io/integrations/webhooks/ Fleep Webhooks Documentation - * @author Ando Roots - */ -class FleepHookHandler extends SocketHandler -{ - protected const FLEEP_HOST = 'fleep.io'; - - protected const FLEEP_HOOK_URI = '/hook/'; - - /** - * @var string Webhook token (specifies the conversation where logs are sent) - */ - protected string $token; - - /** - * Construct a new Fleep.io Handler. - * - * For instructions on how to create a new web hook in your conversations - * see https://fleep.io/integrations/webhooks/ - * - * @param string $token Webhook token - * @throws MissingExtensionException if OpenSSL is missing - */ - public function __construct( - string $token, - $level = Level::Debug, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FleepHookHandler'); - } - - $this->token = $token; - - $connectionString = 'ssl://' . static::FLEEP_HOST . ':443'; - parent::__construct( - $connectionString, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - } - - /** - * Returns the default formatter to use with this handler - * - * Overloaded to remove empty context and extra arrays from the end of the log message. - * - * @return LineFormatter - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(null, null, true, true); - } - - /** - * Handles a log record - */ - public function write(LogRecord $record): void - { - parent::write($record); - $this->closeSocket(); - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST " . static::FLEEP_HOOK_URI . $this->token . " HTTP/1.1\r\n"; - $header .= "Host: " . static::FLEEP_HOST . "\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - /** - * Builds the body of API call - */ - private function buildContent(LogRecord $record): string - { - $dataArray = [ - 'message' => $record->formatted, - ]; - - return http_build_query($dataArray); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php deleted file mode 100644 index d24bec40b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\Formatter\FlowdockFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Sends notifications through the Flowdock push API - * - * This must be configured with a FlowdockFormatter instance via setFormatter() - * - * Notes: - * API token - Flowdock API token - * - * @author Dominik Liebler - * @see https://www.flowdock.com/api/push - * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 - */ -class FlowdockHandler extends SocketHandler -{ - protected string $apiToken; - - /** - * @throws MissingExtensionException if OpenSSL is missing - */ - public function __construct( - string $apiToken, - $level = Level::Debug, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FlowdockHandler'); - } - - parent::__construct( - 'ssl://api.flowdock.com:443', - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->apiToken = $apiToken; - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if (!$formatter instanceof FlowdockFormatter) { - throw new \InvalidArgumentException('The FlowdockHandler requires an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); - } - - return parent::setFormatter($formatter); - } - - /** - * Gets the default formatter. - */ - protected function getDefaultFormatter(): FormatterInterface - { - throw new \InvalidArgumentException('The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - parent::write($record); - - $this->closeSocket(); - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the body of API call - */ - private function buildContent(LogRecord $record): string - { - return Utils::jsonEncode($record->formatted); - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST /v1/messages/team_inbox/" . $this->apiToken . " HTTP/1.1\r\n"; - $header .= "Host: api.flowdock.com\r\n"; - $header .= "Content-Type: application/json\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php deleted file mode 100644 index 72da59e1c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; - -/** - * Interface to describe loggers that have a formatter - * - * @author Jordi Boggiano - */ -interface FormattableHandlerInterface -{ - /** - * Sets the formatter. - * - * @return HandlerInterface self - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface; - - /** - * Gets the formatter. - */ - public function getFormatter(): FormatterInterface; -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php deleted file mode 100644 index c044e0786..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; - -/** - * Helper trait for implementing FormattableInterface - * - * @author Jordi Boggiano - */ -trait FormattableHandlerTrait -{ - protected FormatterInterface|null $formatter = null; - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $this->formatter = $formatter; - - return $this; - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - if (null === $this->formatter) { - $this->formatter = $this->getDefaultFormatter(); - } - - return $this->formatter; - } - - /** - * Gets the default formatter. - * - * Overwrite this if the LineFormatter is not a good default for your handler. - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php deleted file mode 100644 index ba5bb975d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Gelf\PublisherInterface; -use Monolog\Level; -use Monolog\Formatter\GelfMessageFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Handler to send messages to a Graylog2 (http://www.graylog2.org) server - * - * @author Matt Lehner - * @author Benjamin Zikarsky - */ -class GelfHandler extends AbstractProcessingHandler -{ - /** - * @var PublisherInterface the publisher object that sends the message to the server - */ - protected PublisherInterface $publisher; - - /** - * @param PublisherInterface $publisher a gelf publisher object - */ - public function __construct(PublisherInterface $publisher, int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->publisher = $publisher; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->publisher->publish($record->formatted); - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new GelfMessageFormatter(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php deleted file mode 100644 index 0423dc346..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php +++ /dev/null @@ -1,130 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\ResettableInterface; -use Monolog\LogRecord; - -/** - * Forwards records to multiple handlers - * - * @author Lenar Lõhmus - */ -class GroupHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface -{ - use ProcessableHandlerTrait; - - /** @var HandlerInterface[] */ - protected array $handlers; - protected bool $bubble; - - /** - * @param HandlerInterface[] $handlers Array of Handlers. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @throws \InvalidArgumentException if an unsupported handler is set - */ - public function __construct(array $handlers, bool $bubble = true) - { - foreach ($handlers as $handler) { - if (!$handler instanceof HandlerInterface) { - throw new \InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.'); - } - } - - $this->handlers = $handlers; - $this->bubble = $bubble; - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - foreach ($this->handlers as $handler) { - $handler->handle(clone $record); - } - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - if (\count($this->processors) > 0) { - $processed = []; - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - $records = $processed; - } - - foreach ($this->handlers as $handler) { - $handler->handleBatch(array_map(fn ($record) => clone $record, $records)); - } - } - - public function reset(): void - { - $this->resetProcessors(); - - foreach ($this->handlers as $handler) { - if ($handler instanceof ResettableInterface) { - $handler->reset(); - } - } - } - - public function close(): void - { - parent::close(); - - foreach ($this->handlers as $handler) { - $handler->close(); - } - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - foreach ($this->handlers as $handler) { - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - } - } - - return $this; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/Handler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/Handler.php deleted file mode 100644 index e89f969b8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/Handler.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Base Handler class providing basic close() support as well as handleBatch - * - * @author Jordi Boggiano - */ -abstract class Handler implements HandlerInterface -{ - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - foreach ($records as $record) { - $this->handle($record); - } - } - - /** - * @inheritDoc - */ - public function close(): void - { - } - - public function __destruct() - { - try { - $this->close(); - } catch (\Throwable $e) { - // do nothing - } - } - - public function __sleep() - { - $this->close(); - - $reflClass = new \ReflectionClass($this); - - $keys = []; - foreach ($reflClass->getProperties() as $reflProp) { - if (!$reflProp->isStatic()) { - $keys[] = $reflProp->getName(); - } - } - - return $keys; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php deleted file mode 100644 index 83905c323..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\LogRecord; - -/** - * Interface that all Monolog Handlers must implement - * - * @author Jordi Boggiano - */ -interface HandlerInterface -{ - /** - * Checks whether the given record will be handled by this handler. - * - * This is mostly done for performance reasons, to avoid calling processors for nothing. - * - * Handlers should still check the record levels within handle(), returning false in isHandling() - * is no guarantee that handle() will not be called, and isHandling() might not be called - * for a given record. - * - * @param LogRecord $record Partial log record having only a level initialized - */ - public function isHandling(LogRecord $record): bool; - - /** - * Handles a record. - * - * All records may be passed to this method, and the handler should discard - * those that it does not want to handle. - * - * The return value of this function controls the bubbling process of the handler stack. - * Unless the bubbling is interrupted (by returning true), the Logger class will keep on - * calling further handlers in the stack with a given log record. - * - * @param LogRecord $record The record to handle - * @return bool true means that this handler handled the record, and that bubbling is not permitted. - * false means the record was either not processed or that this handler allows bubbling. - */ - public function handle(LogRecord $record): bool; - - /** - * Handles a set of records at once. - * - * @param array $records The records to handle - */ - public function handleBatch(array $records): void; - - /** - * Closes the handler. - * - * Ends a log cycle and frees all resources used by the handler. - * - * Closing a Handler means flushing all buffers and freeing any open resources/handles. - * - * Implementations have to be idempotent (i.e. it should be possible to call close several times without breakage) - * and ideally handlers should be able to reopen themselves on handle() after they have been closed. - * - * This is useful at the end of a request and will be called automatically when the object - * is destroyed if you extend Monolog\Handler\Handler. - * - * If you are thinking of calling this method yourself, most likely you should be - * calling ResettableInterface::reset instead. Have a look. - */ - public function close(): void; -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php deleted file mode 100644 index 541ec2541..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * This simple wrapper class can be used to extend handlers functionality. - * - * Example: A custom filtering that can be applied to any handler. - * - * Inherit from this class and override handle() like this: - * - * public function handle(LogRecord $record) - * { - * if ($record meets certain conditions) { - * return false; - * } - * return $this->handler->handle($record); - * } - * - * @author Alexey Karapetov - */ -class HandlerWrapper implements HandlerInterface, ProcessableHandlerInterface, FormattableHandlerInterface, ResettableInterface -{ - protected HandlerInterface $handler; - - public function __construct(HandlerInterface $handler) - { - $this->handler = $handler; - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return $this->handler->isHandling($record); - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - return $this->handler->handle($record); - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $this->handler->handleBatch($records); - } - - /** - * @inheritDoc - */ - public function close(): void - { - $this->handler->close(); - } - - /** - * @inheritDoc - */ - public function pushProcessor(callable $callback): HandlerInterface - { - if ($this->handler instanceof ProcessableHandlerInterface) { - $this->handler->pushProcessor($callback); - - return $this; - } - - throw new \LogicException('The wrapped handler does not implement ' . ProcessableHandlerInterface::class); - } - - /** - * @inheritDoc - */ - public function popProcessor(): callable - { - if ($this->handler instanceof ProcessableHandlerInterface) { - return $this->handler->popProcessor(); - } - - throw new \LogicException('The wrapped handler does not implement ' . ProcessableHandlerInterface::class); - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class); - } - - public function reset(): void - { - if ($this->handler instanceof ResettableInterface) { - $this->handler->reset(); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php deleted file mode 100644 index 418f2ba03..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * IFTTTHandler uses cURL to trigger IFTTT Maker actions - * - * Register a secret key and trigger/event name at https://ifttt.com/maker - * - * value1 will be the channel from monolog's Logger constructor, - * value2 will be the level name (ERROR, WARNING, ..) - * value3 will be the log record's message - * - * @author Nehal Patel - */ -class IFTTTHandler extends AbstractProcessingHandler -{ - private string $eventName; - private string $secretKey; - - /** - * @param string $eventName The name of the IFTTT Maker event that should be triggered - * @param string $secretKey A valid IFTTT secret key - * - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct(string $eventName, string $secretKey, int|string|Level $level = Level::Error, bool $bubble = true) - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the IFTTTHandler'); - } - - $this->eventName = $eventName; - $this->secretKey = $secretKey; - - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - public function write(LogRecord $record): void - { - $postData = [ - "value1" => $record->channel, - "value2" => $record["level_name"], - "value3" => $record->message, - ]; - $postString = Utils::jsonEncode($postData); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $postString); - curl_setopt($ch, CURLOPT_HTTPHEADER, [ - "Content-Type: application/json", - ]); - - Curl\Util::execute($ch); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php deleted file mode 100644 index abb2f88f7..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Inspired on LogEntriesHandler. - * - * @author Robert Kaufmann III - * @author Gabriel Machado - */ -class InsightOpsHandler extends SocketHandler -{ - protected string $logToken; - - /** - * @param string $token Log token supplied by InsightOps - * @param string $region Region where InsightOps account is hosted. Could be 'us' or 'eu'. - * @param bool $useSSL Whether or not SSL encryption should be used - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - string $region = 'us', - bool $useSSL = true, - $level = Level::Debug, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for InsightOpsHandler'); - } - - $endpoint = $useSSL - ? 'ssl://' . $region . '.data.logs.insight.rapid7.com:443' - : $region . '.data.logs.insight.rapid7.com:80'; - - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->logToken = $token; - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - return $this->logToken . ' ' . $record->formatted; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php deleted file mode 100644 index 00259834e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * @author Robert Kaufmann III - */ -class LogEntriesHandler extends SocketHandler -{ - protected string $logToken; - - /** - * @param string $token Log token supplied by LogEntries - * @param bool $useSSL Whether or not SSL encryption should be used. - * @param string $host Custom hostname to send the data to if needed - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - bool $useSSL = true, - $level = Level::Debug, - bool $bubble = true, - string $host = 'data.logentries.com', - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler'); - } - - $endpoint = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80'; - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->logToken = $token; - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - return $this->logToken . ' ' . $record->formatted; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php deleted file mode 100644 index 6a9a20e01..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php +++ /dev/null @@ -1,157 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LogglyFormatter; -use function array_key_exists; -use CurlHandle; -use Monolog\LogRecord; - -/** - * Sends errors to Loggly. - * - * @author Przemek Sobstel - * @author Adam Pancutt - * @author Gregory Barchard - */ -class LogglyHandler extends AbstractProcessingHandler -{ - protected const HOST = 'logs-01.loggly.com'; - protected const ENDPOINT_SINGLE = 'inputs'; - protected const ENDPOINT_BATCH = 'bulk'; - - /** - * Caches the curl handlers for every given endpoint. - * - * @var CurlHandle[] - */ - protected array $curlHandlers = []; - - protected string $token; - - /** @var string[] */ - protected array $tag = []; - - /** - * @param string $token API token supplied by Loggly - * - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct(string $token, int|string|Level $level = Level::Debug, bool $bubble = true) - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the LogglyHandler'); - } - - $this->token = $token; - - parent::__construct($level, $bubble); - } - - /** - * Loads and returns the shared curl handler for the given endpoint. - */ - protected function getCurlHandler(string $endpoint): CurlHandle - { - if (!array_key_exists($endpoint, $this->curlHandlers)) { - $this->curlHandlers[$endpoint] = $this->loadCurlHandle($endpoint); - } - - return $this->curlHandlers[$endpoint]; - } - - /** - * Starts a fresh curl session for the given endpoint and returns its handler. - */ - private function loadCurlHandle(string $endpoint): CurlHandle - { - $url = sprintf("https://%s/%s/%s/", static::HOST, $endpoint, $this->token); - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - return $ch; - } - - /** - * @param string[]|string $tag - * @return $this - */ - public function setTag(string|array $tag): self - { - if ('' === $tag || [] === $tag) { - $this->tag = []; - } else { - $this->tag = is_array($tag) ? $tag : [$tag]; - } - - return $this; - } - - /** - * @param string[]|string $tag - * @return $this - */ - public function addTag(string|array $tag): self - { - if ('' !== $tag) { - $tag = is_array($tag) ? $tag : [$tag]; - $this->tag = array_unique(array_merge($this->tag, $tag)); - } - - return $this; - } - - protected function write(LogRecord $record): void - { - $this->send($record->formatted, static::ENDPOINT_SINGLE); - } - - public function handleBatch(array $records): void - { - $level = $this->level; - - $records = array_filter($records, function ($record) use ($level) { - return ($record->level->value >= $level->value); - }); - - if (\count($records) > 0) { - $this->send($this->getFormatter()->formatBatch($records), static::ENDPOINT_BATCH); - } - } - - protected function send(string $data, string $endpoint): void - { - $ch = $this->getCurlHandler($endpoint); - - $headers = ['Content-Type: application/json']; - - if (\count($this->tag) > 0) { - $headers[] = 'X-LOGGLY-TAG: '.implode(',', $this->tag); - } - - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - - Curl\Util::execute($ch, 5, false); - } - - protected function getDefaultFormatter(): FormatterInterface - { - return new LogglyFormatter(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php deleted file mode 100644 index 876b1a953..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LogmaticFormatter; -use Monolog\LogRecord; - -/** - * @author Julien Breux - */ -class LogmaticHandler extends SocketHandler -{ - private string $logToken; - - private string $hostname; - - private string $appName; - - /** - * @param string $token Log token supplied by Logmatic. - * @param string $hostname Host name supplied by Logmatic. - * @param string $appName Application name supplied by Logmatic. - * @param bool $useSSL Whether or not SSL encryption should be used. - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - string $hostname = '', - string $appName = '', - bool $useSSL = true, - $level = Level::Debug, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use SSL encrypted connection for LogmaticHandler'); - } - - $endpoint = $useSSL ? 'ssl://api.logmatic.io:10515' : 'api.logmatic.io:10514'; - $endpoint .= '/v1/'; - - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->logToken = $token; - $this->hostname = $hostname; - $this->appName = $appName; - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - return $this->logToken . ' ' . $record->formatted; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - $formatter = new LogmaticFormatter(); - - if ($this->hostname !== '') { - $formatter->setHostname($this->hostname); - } - if ($this->appName !== '') { - $formatter->setAppName($this->appName); - } - - return $formatter; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php deleted file mode 100644 index b6c822772..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\HtmlFormatter; -use Monolog\LogRecord; - -/** - * Base class for all mail handlers - * - * @author Gyula Sallai - */ -abstract class MailHandler extends AbstractProcessingHandler -{ - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $messages = []; - - foreach ($records as $record) { - if ($record->level->isLowerThan($this->level)) { - continue; - } - - $message = $this->processRecord($record); - $messages[] = $message; - } - - if (\count($messages) > 0) { - $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); - } - } - - /** - * Send a mail with the given content - * - * @param string $content formatted email body to be sent - * @param array $records the array of log records that formed this content - * - * @phpstan-param non-empty-array $records - */ - abstract protected function send(string $content, array $records): void; - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->send((string) $record->formatted, [$record]); - } - - /** - * @phpstan-param non-empty-array $records - */ - protected function getHighestRecord(array $records): LogRecord - { - $highestRecord = null; - foreach ($records as $record) { - if ($highestRecord === null || $record->level->isHigherThan($highestRecord->level)) { - $highestRecord = $record; - } - } - - return $highestRecord; - } - - protected function isHtmlBody(string $body): bool - { - return ($body[0] ?? null) === '<'; - } - - /** - * Gets the default formatter. - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new HtmlFormatter(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php deleted file mode 100644 index 64e16c9de..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Swift; -use Swift_Message; - -/** - * MandrillHandler uses cURL to send the emails to the Mandrill API - * - * @author Adam Nicholson - */ -class MandrillHandler extends MailHandler -{ - protected Swift_Message $message; - protected string $apiKey; - - /** - * @phpstan-param (Swift_Message|callable(): Swift_Message) $message - * - * @param string $apiKey A valid Mandrill API key - * @param callable|Swift_Message $message An example message for real messages, only the body will be replaced - * - * @throws \InvalidArgumentException if not a Swift Message is set - */ - public function __construct(string $apiKey, callable|Swift_Message $message, int|string|Level $level = Level::Error, bool $bubble = true) - { - parent::__construct($level, $bubble); - - if (!$message instanceof Swift_Message) { - $message = $message(); - } - if (!$message instanceof Swift_Message) { - throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it'); - } - $this->message = $message; - $this->apiKey = $apiKey; - } - - /** - * @inheritDoc - */ - protected function send(string $content, array $records): void - { - $mime = 'text/plain'; - if ($this->isHtmlBody($content)) { - $mime = 'text/html'; - } - - $message = clone $this->message; - $message->setBody($content, $mime); - /** @phpstan-ignore-next-line */ - if (version_compare(Swift::VERSION, '6.0.0', '>=')) { - $message->setDate(new \DateTimeImmutable()); - } else { - /** @phpstan-ignore-next-line */ - $message->setDate(time()); - } - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json'); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ - 'key' => $this->apiKey, - 'raw_message' => (string) $message, - 'async' => false, - ])); - - Curl\Util::execute($ch); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php deleted file mode 100644 index 3965aeea5..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Exception can be thrown if an extension for a handler is missing - * - * @author Christian Bergau - */ -class MissingExtensionException extends \Exception -{ -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php deleted file mode 100644 index 33ab68c6d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use MongoDB\Driver\BulkWrite; -use MongoDB\Driver\Manager; -use MongoDB\Client; -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\MongoDBFormatter; -use Monolog\LogRecord; - -/** - * Logs to a MongoDB database. - * - * Usage example: - * - * $log = new \Monolog\Logger('application'); - * $client = new \MongoDB\Client('mongodb://localhost:27017'); - * $mongodb = new \Monolog\Handler\MongoDBHandler($client, 'logs', 'prod'); - * $log->pushHandler($mongodb); - * - * The above examples uses the MongoDB PHP library's client class; however, the - * MongoDB\Driver\Manager class from ext-mongodb is also supported. - */ -class MongoDBHandler extends AbstractProcessingHandler -{ - private \MongoDB\Collection $collection; - - private Client|Manager $manager; - - private string|null $namespace = null; - - /** - * Constructor. - * - * @param Client|Manager $mongodb MongoDB library or driver client - * @param string $database Database name - * @param string $collection Collection name - */ - public function __construct(Client|Manager $mongodb, string $database, string $collection, int|string|Level $level = Level::Debug, bool $bubble = true) - { - if ($mongodb instanceof Client) { - $this->collection = $mongodb->selectCollection($database, $collection); - } else { - $this->manager = $mongodb; - $this->namespace = $database . '.' . $collection; - } - - parent::__construct($level, $bubble); - } - - protected function write(LogRecord $record): void - { - if (isset($this->collection)) { - $this->collection->insertOne($record->formatted); - } - - if (isset($this->manager, $this->namespace)) { - $bulk = new BulkWrite; - $bulk->insert($record->formatted); - $this->manager->executeBulkWrite($this->namespace, $bulk); - } - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new MongoDBFormatter; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php deleted file mode 100644 index 70d6004e1..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php +++ /dev/null @@ -1,173 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\LineFormatter; - -/** - * NativeMailerHandler uses the mail() function to send the emails - * - * @author Christophe Coevoet - * @author Mark Garrett - */ -class NativeMailerHandler extends MailHandler -{ - /** - * The email addresses to which the message will be sent - * @var string[] - */ - protected array $to; - - /** - * The subject of the email - */ - protected string $subject; - - /** - * Optional headers for the message - * @var string[] - */ - protected array $headers = []; - - /** - * Optional parameters for the message - * @var string[] - */ - protected array $parameters = []; - - /** - * The wordwrap length for the message - */ - protected int $maxColumnWidth; - - /** - * The Content-type for the message - */ - protected string|null $contentType = null; - - /** - * The encoding for the message - */ - protected string $encoding = 'utf-8'; - - /** - * @param string|string[] $to The receiver of the mail - * @param string $subject The subject of the mail - * @param string $from The sender of the mail - * @param int $maxColumnWidth The maximum column width that the message lines will have - */ - public function __construct(string|array $to, string $subject, string $from, int|string|Level $level = Level::Error, bool $bubble = true, int $maxColumnWidth = 70) - { - parent::__construct($level, $bubble); - $this->to = (array) $to; - $this->subject = $subject; - $this->addHeader(sprintf('From: %s', $from)); - $this->maxColumnWidth = $maxColumnWidth; - } - - /** - * Add headers to the message - * - * @param string|string[] $headers Custom added headers - * @return $this - */ - public function addHeader($headers): self - { - foreach ((array) $headers as $header) { - if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) { - throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons'); - } - $this->headers[] = $header; - } - - return $this; - } - - /** - * Add parameters to the message - * - * @param string|string[] $parameters Custom added parameters - * @return $this - */ - public function addParameter($parameters): self - { - $this->parameters = array_merge($this->parameters, (array) $parameters); - - return $this; - } - - /** - * @inheritDoc - */ - protected function send(string $content, array $records): void - { - $contentType = $this->getContentType() ?? ($this->isHtmlBody($content) ? 'text/html' : 'text/plain'); - - if ($contentType !== 'text/html') { - $content = wordwrap($content, $this->maxColumnWidth); - } - - $headers = ltrim(implode("\r\n", $this->headers) . "\r\n", "\r\n"); - $headers .= 'Content-type: ' . $contentType . '; charset=' . $this->getEncoding() . "\r\n"; - if ($contentType === 'text/html' && false === strpos($headers, 'MIME-Version:')) { - $headers .= 'MIME-Version: 1.0' . "\r\n"; - } - - $subjectFormatter = new LineFormatter($this->subject); - $subject = $subjectFormatter->format($this->getHighestRecord($records)); - - $parameters = implode(' ', $this->parameters); - foreach ($this->to as $to) { - mail($to, $subject, $content, $headers, $parameters); - } - } - - public function getContentType(): ?string - { - return $this->contentType; - } - - public function getEncoding(): string - { - return $this->encoding; - } - - /** - * @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML messages. - * @return $this - */ - public function setContentType(string $contentType): self - { - if (strpos($contentType, "\n") !== false || strpos($contentType, "\r") !== false) { - throw new \InvalidArgumentException('The content type can not contain newline characters to prevent email header injection'); - } - - $this->contentType = $contentType; - - return $this; - } - - /** - * @return $this - */ - public function setEncoding(string $encoding): self - { - if (strpos($encoding, "\n") !== false || strpos($encoding, "\r") !== false) { - throw new \InvalidArgumentException('The encoding can not contain newline characters to prevent email header injection'); - } - - $this->encoding = $encoding; - - return $this; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php deleted file mode 100644 index b8cb3785b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Class to record a log on a NewRelic application. - * Enabling New Relic High Security mode may prevent capture of useful information. - * - * This handler requires a NormalizerFormatter to function and expects an array in $record->formatted - * - * @see https://docs.newrelic.com/docs/agents/php-agent - * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security - */ -class NewRelicHandler extends AbstractProcessingHandler -{ - /** - * @inheritDoc - */ - public function __construct( - int|string|Level $level = Level::Error, - bool $bubble = true, - - /** - * Name of the New Relic application that will receive logs from this handler. - */ - protected string|null $appName = null, - - /** - * Some context and extra data is passed into the handler as arrays of values. Do we send them as is - * (useful if we are using the API), or explode them for display on the NewRelic RPM website? - */ - protected bool $explodeArrays = false, - - /** - * Name of the current transaction - */ - protected string|null $transactionName = null - ) { - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if (!$this->isNewRelicEnabled()) { - throw new MissingExtensionException('The newrelic PHP extension is required to use the NewRelicHandler'); - } - - if (null !== ($appName = $this->getAppName($record->context))) { - $this->setNewRelicAppName($appName); - } - - if (null !== ($transactionName = $this->getTransactionName($record->context))) { - $this->setNewRelicTransactionName($transactionName); - unset($record->formatted['context']['transaction_name']); - } - - if (isset($record->context['exception']) && $record->context['exception'] instanceof \Throwable) { - newrelic_notice_error($record->message, $record->context['exception']); - unset($record->formatted['context']['exception']); - } else { - newrelic_notice_error($record->message); - } - - if (isset($record->formatted['context']) && is_array($record->formatted['context'])) { - foreach ($record->formatted['context'] as $key => $parameter) { - if (is_array($parameter) && $this->explodeArrays) { - foreach ($parameter as $paramKey => $paramValue) { - $this->setNewRelicParameter('context_' . $key . '_' . $paramKey, $paramValue); - } - } else { - $this->setNewRelicParameter('context_' . $key, $parameter); - } - } - } - - if (isset($record->formatted['extra']) && is_array($record->formatted['extra'])) { - foreach ($record->formatted['extra'] as $key => $parameter) { - if (is_array($parameter) && $this->explodeArrays) { - foreach ($parameter as $paramKey => $paramValue) { - $this->setNewRelicParameter('extra_' . $key . '_' . $paramKey, $paramValue); - } - } else { - $this->setNewRelicParameter('extra_' . $key, $parameter); - } - } - } - } - - /** - * Checks whether the NewRelic extension is enabled in the system. - */ - protected function isNewRelicEnabled(): bool - { - return extension_loaded('newrelic'); - } - - /** - * Returns the appname where this log should be sent. Each log can override the default appname, set in this - * handler's constructor, by providing the appname in it's context. - * - * @param mixed[] $context - */ - protected function getAppName(array $context): ?string - { - if (isset($context['appname'])) { - return $context['appname']; - } - - return $this->appName; - } - - /** - * Returns the name of the current transaction. Each log can override the default transaction name, set in this - * handler's constructor, by providing the transaction_name in it's context - * - * @param mixed[] $context - */ - protected function getTransactionName(array $context): ?string - { - if (isset($context['transaction_name'])) { - return $context['transaction_name']; - } - - return $this->transactionName; - } - - /** - * Sets the NewRelic application that should receive this log. - */ - protected function setNewRelicAppName(string $appName): void - { - newrelic_set_appname($appName); - } - - /** - * Overwrites the name of the current transaction - */ - protected function setNewRelicTransactionName(string $transactionName): void - { - newrelic_name_transaction($transactionName); - } - - /** - * @param mixed $value - */ - protected function setNewRelicParameter(string $key, $value): void - { - if (null === $value || is_scalar($value)) { - newrelic_add_custom_parameter($key, $value); - } else { - newrelic_add_custom_parameter($key, Utils::jsonEncode($value, null, true)); - } - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php deleted file mode 100644 index d9fea180c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\LogRecord; - -/** - * No-op - * - * This handler handles anything, but does nothing, and does not stop bubbling to the rest of the stack. - * This can be used for testing, or to disable a handler when overriding a configuration without - * influencing the rest of the stack. - * - * @author Roel Harbers - */ -class NoopHandler extends Handler -{ - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return true; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - return false; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php deleted file mode 100644 index 1aa84e4f8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Psr\Log\LogLevel; -use Monolog\Logger; -use Monolog\LogRecord; - -/** - * Blackhole - * - * Any record it can handle will be thrown away. This can be used - * to put on top of an existing stack to override it temporarily. - * - * @author Jordi Boggiano - */ -class NullHandler extends Handler -{ - private Level $level; - - /** - * @param string|int|Level $level The minimum logging level at which this handler will be triggered - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function __construct(string|int|Level $level = Level::Debug) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return $record->level->value >= $this->level->value; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - return $record->level->value >= $this->level->value; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php deleted file mode 100644 index a72b7a11d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Handler to only pass log messages when a certain threshold of number of messages is reached. - * - * This can be useful in cases of processing a batch of data, but you're for example only interested - * in case it fails catastrophically instead of a warning for 1 or 2 events. Worse things can happen, right? - * - * Usage example: - * - * ``` - * $log = new Logger('application'); - * $handler = new SomeHandler(...) - * - * // Pass all warnings to the handler when more than 10 & all error messages when more then 5 - * $overflow = new OverflowHandler($handler, [Level::Warning->value => 10, Level::Error->value => 5]); - * - * $log->pushHandler($overflow); - *``` - * - * @author Kris Buist - */ -class OverflowHandler extends AbstractHandler implements FormattableHandlerInterface -{ - private HandlerInterface $handler; - - /** @var array */ - private array $thresholdMap = []; - - /** - * Buffer of all messages passed to the handler before the threshold was reached - * - * @var mixed[][] - */ - private array $buffer = []; - - /** - * @param array $thresholdMap Dictionary of log level value => threshold - */ - public function __construct( - HandlerInterface $handler, - array $thresholdMap = [], - $level = Level::Debug, - bool $bubble = true - ) { - $this->handler = $handler; - foreach ($thresholdMap as $thresholdLevel => $threshold) { - $this->thresholdMap[$thresholdLevel] = $threshold; - } - parent::__construct($level, $bubble); - } - - /** - * Handles a record. - * - * All records may be passed to this method, and the handler should discard - * those that it does not want to handle. - * - * The return value of this function controls the bubbling process of the handler stack. - * Unless the bubbling is interrupted (by returning true), the Logger class will keep on - * calling further handlers in the stack with a given log record. - * - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if ($record->level->isLowerThan($this->level)) { - return false; - } - - $level = $record->level->value; - - if (!isset($this->thresholdMap[$level])) { - $this->thresholdMap[$level] = 0; - } - - if ($this->thresholdMap[$level] > 0) { - // The overflow threshold is not yet reached, so we're buffering the record and lowering the threshold by 1 - $this->thresholdMap[$level]--; - $this->buffer[$level][] = $record; - - return false === $this->bubble; - } - - if ($this->thresholdMap[$level] == 0) { - // This current message is breaking the threshold. Flush the buffer and continue handling the current record - foreach ($this->buffer[$level] ?? [] as $buffered) { - $this->handler->handle($buffered); - } - $this->thresholdMap[$level]--; - unset($this->buffer[$level]); - } - - $this->handler->handle($record); - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php deleted file mode 100644 index 8aa78e4c4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php +++ /dev/null @@ -1,303 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\Utils; -use PhpConsole\Connector; -use PhpConsole\Handler as VendorPhpConsoleHandler; -use PhpConsole\Helper; -use Monolog\LogRecord; -use PhpConsole\Storage; - -/** - * Monolog handler for Google Chrome extension "PHP Console" - * - * Display PHP error/debug log messages in Google Chrome console and notification popups, executes PHP code remotely - * - * Usage: - * 1. Install Google Chrome extension [now dead and removed from the chrome store] - * 2. See overview https://github.com/barbushin/php-console#overview - * 3. Install PHP Console library https://github.com/barbushin/php-console#installation - * 4. Example (result will looks like http://i.hizliresim.com/vg3Pz4.png) - * - * $logger = new \Monolog\Logger('all', array(new \Monolog\Handler\PHPConsoleHandler())); - * \Monolog\ErrorHandler::register($logger); - * echo $undefinedVar; - * $logger->debug('SELECT * FROM users', array('db', 'time' => 0.012)); - * PC::debug($_SERVER); // PHP Console debugger for any type of vars - * - * @author Sergey Barbushin https://www.linkedin.com/in/barbushin - * @phpstan-type Options array{ - * enabled: bool, - * classesPartialsTraceIgnore: string[], - * debugTagsKeysInContext: array, - * useOwnErrorsHandler: bool, - * useOwnExceptionsHandler: bool, - * sourcesBasePath: string|null, - * registerHelper: bool, - * serverEncoding: string|null, - * headersLimit: int|null, - * password: string|null, - * enableSslOnlyMode: bool, - * ipMasks: string[], - * enableEvalListener: bool, - * dumperDetectCallbacks: bool, - * dumperLevelLimit: int, - * dumperItemsCountLimit: int, - * dumperItemSizeLimit: int, - * dumperDumpSizeLimit: int, - * detectDumpTraceAndSource: bool, - * dataStorage: Storage|null - * } - * @phpstan-type InputOptions array{ - * enabled?: bool, - * classesPartialsTraceIgnore?: string[], - * debugTagsKeysInContext?: array, - * useOwnErrorsHandler?: bool, - * useOwnExceptionsHandler?: bool, - * sourcesBasePath?: string|null, - * registerHelper?: bool, - * serverEncoding?: string|null, - * headersLimit?: int|null, - * password?: string|null, - * enableSslOnlyMode?: bool, - * ipMasks?: string[], - * enableEvalListener?: bool, - * dumperDetectCallbacks?: bool, - * dumperLevelLimit?: int, - * dumperItemsCountLimit?: int, - * dumperItemSizeLimit?: int, - * dumperDumpSizeLimit?: int, - * detectDumpTraceAndSource?: bool, - * dataStorage?: Storage|null - * } - * - * @deprecated Since 2.8.0 and 3.2.0, PHPConsole is abandoned and thus we will drop this handler in Monolog 4 - */ -class PHPConsoleHandler extends AbstractProcessingHandler -{ - /** - * @phpstan-var Options - */ - private array $options = [ - 'enabled' => true, // bool Is PHP Console server enabled - 'classesPartialsTraceIgnore' => ['Monolog\\'], // array Hide calls of classes started with... - 'debugTagsKeysInContext' => [0, 'tag'], // bool Is PHP Console server enabled - 'useOwnErrorsHandler' => false, // bool Enable errors handling - 'useOwnExceptionsHandler' => false, // bool Enable exceptions handling - 'sourcesBasePath' => null, // string Base path of all project sources to strip in errors source paths - 'registerHelper' => true, // bool Register PhpConsole\Helper that allows short debug calls like PC::debug($var, 'ta.g.s') - 'serverEncoding' => null, // string|null Server internal encoding - 'headersLimit' => null, // int|null Set headers size limit for your web-server - 'password' => null, // string|null Protect PHP Console connection by password - 'enableSslOnlyMode' => false, // bool Force connection by SSL for clients with PHP Console installed - 'ipMasks' => [], // array Set IP masks of clients that will be allowed to connect to PHP Console: array('192.168.*.*', '127.0.0.1') - 'enableEvalListener' => false, // bool Enable eval request to be handled by eval dispatcher(if enabled, 'password' option is also required) - 'dumperDetectCallbacks' => false, // bool Convert callback items in dumper vars to (callback SomeClass::someMethod) strings - 'dumperLevelLimit' => 5, // int Maximum dumped vars array or object nested dump level - 'dumperItemsCountLimit' => 100, // int Maximum dumped var same level array items or object properties number - 'dumperItemSizeLimit' => 5000, // int Maximum length of any string or dumped array item - 'dumperDumpSizeLimit' => 500000, // int Maximum approximate size of dumped vars result formatted in JSON - 'detectDumpTraceAndSource' => false, // bool Autodetect and append trace data to debug - 'dataStorage' => null, // \PhpConsole\Storage|null Fixes problem with custom $_SESSION handler(see http://goo.gl/Ne8juJ) - ]; - - private Connector $connector; - - /** - * @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details - * @param Connector|null $connector Instance of \PhpConsole\Connector class (optional) - * @throws \RuntimeException - * @phpstan-param InputOptions $options - */ - public function __construct(array $options = [], ?Connector $connector = null, int|string|Level $level = Level::Debug, bool $bubble = true) - { - if (!class_exists('PhpConsole\Connector')) { - throw new \RuntimeException('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); - } - parent::__construct($level, $bubble); - $this->options = $this->initOptions($options); - $this->connector = $this->initConnector($connector); - } - - /** - * @param array $options - * @return array - * - * @phpstan-param InputOptions $options - * @phpstan-return Options - */ - private function initOptions(array $options): array - { - $wrongOptions = array_diff(array_keys($options), array_keys($this->options)); - if (\count($wrongOptions) > 0) { - throw new \RuntimeException('Unknown options: ' . implode(', ', $wrongOptions)); - } - - return array_replace($this->options, $options); - } - - private function initConnector(?Connector $connector = null): Connector - { - if (null === $connector) { - if ($this->options['dataStorage'] instanceof Storage) { - Connector::setPostponeStorage($this->options['dataStorage']); - } - $connector = Connector::getInstance(); - } - - if ($this->options['registerHelper'] && !Helper::isRegistered()) { - Helper::register(); - } - - if ($this->options['enabled'] && $connector->isActiveClient()) { - if ($this->options['useOwnErrorsHandler'] || $this->options['useOwnExceptionsHandler']) { - $handler = VendorPhpConsoleHandler::getInstance(); - $handler->setHandleErrors($this->options['useOwnErrorsHandler']); - $handler->setHandleExceptions($this->options['useOwnExceptionsHandler']); - $handler->start(); - } - if (null !== $this->options['sourcesBasePath']) { - $connector->setSourcesBasePath($this->options['sourcesBasePath']); - } - if (null !== $this->options['serverEncoding']) { - $connector->setServerEncoding($this->options['serverEncoding']); - } - if (null !== $this->options['password']) { - $connector->setPassword($this->options['password']); - } - if ($this->options['enableSslOnlyMode']) { - $connector->enableSslOnlyMode(); - } - if (\count($this->options['ipMasks']) > 0) { - $connector->setAllowedIpMasks($this->options['ipMasks']); - } - if (null !== $this->options['headersLimit'] && $this->options['headersLimit'] > 0) { - $connector->setHeadersLimit($this->options['headersLimit']); - } - if ($this->options['detectDumpTraceAndSource']) { - $connector->getDebugDispatcher()->detectTraceAndSource = true; - } - $dumper = $connector->getDumper(); - $dumper->levelLimit = $this->options['dumperLevelLimit']; - $dumper->itemsCountLimit = $this->options['dumperItemsCountLimit']; - $dumper->itemSizeLimit = $this->options['dumperItemSizeLimit']; - $dumper->dumpSizeLimit = $this->options['dumperDumpSizeLimit']; - $dumper->detectCallbacks = $this->options['dumperDetectCallbacks']; - if ($this->options['enableEvalListener']) { - $connector->startEvalRequestsListener(); - } - } - - return $connector; - } - - public function getConnector(): Connector - { - return $this->connector; - } - - /** - * @return array - */ - public function getOptions(): array - { - return $this->options; - } - - public function handle(LogRecord $record): bool - { - if ($this->options['enabled'] && $this->connector->isActiveClient()) { - return parent::handle($record); - } - - return !$this->bubble; - } - - /** - * Writes the record down to the log of the implementing handler - */ - protected function write(LogRecord $record): void - { - if ($record->level->isLowerThan(Level::Notice)) { - $this->handleDebugRecord($record); - } elseif (isset($record->context['exception']) && $record->context['exception'] instanceof \Throwable) { - $this->handleExceptionRecord($record); - } else { - $this->handleErrorRecord($record); - } - } - - private function handleDebugRecord(LogRecord $record): void - { - [$tags, $filteredContext] = $this->getRecordTags($record); - $message = $record->message; - if (\count($filteredContext) > 0) { - $message .= ' ' . Utils::jsonEncode($this->connector->getDumper()->dump(array_filter($filteredContext)), null, true); - } - $this->connector->getDebugDispatcher()->dispatchDebug($message, $tags, $this->options['classesPartialsTraceIgnore']); - } - - private function handleExceptionRecord(LogRecord $record): void - { - $this->connector->getErrorsDispatcher()->dispatchException($record->context['exception']); - } - - private function handleErrorRecord(LogRecord $record): void - { - $context = $record->context; - - $this->connector->getErrorsDispatcher()->dispatchError( - $context['code'] ?? null, - $context['message'] ?? $record->message, - $context['file'] ?? null, - $context['line'] ?? null, - $this->options['classesPartialsTraceIgnore'] - ); - } - - /** - * @return array{string, mixed[]} - */ - private function getRecordTags(LogRecord $record): array - { - $tags = null; - $filteredContext = []; - if ($record->context !== []) { - $filteredContext = $record->context; - foreach ($this->options['debugTagsKeysInContext'] as $key) { - if (isset($filteredContext[$key])) { - $tags = $filteredContext[$key]; - if ($key === 0) { - array_shift($filteredContext); - } else { - unset($filteredContext[$key]); - } - break; - } - } - } - - return [$tags ?? $record->level->toPsrLogLevel(), $filteredContext]; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('%message%'); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php deleted file mode 100644 index 9edc9ac54..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php +++ /dev/null @@ -1,186 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Stores to STDIN of any process, specified by a command. - * - * Usage example: - *
- * $log = new Logger('myLogger');
- * $log->pushHandler(new ProcessHandler('/usr/bin/php /var/www/monolog/someScript.php'));
- * 
- * - * @author Kolja Zuelsdorf - */ -class ProcessHandler extends AbstractProcessingHandler -{ - /** - * Holds the process to receive data on its STDIN. - * - * @var resource|bool|null - */ - private $process; - - private string $command; - - private ?string $cwd; - - /** - * @var resource[] - */ - private array $pipes = []; - - /** - * @var array - */ - protected const DESCRIPTOR_SPEC = [ - 0 => ['pipe', 'r'], // STDIN is a pipe that the child will read from - 1 => ['pipe', 'w'], // STDOUT is a pipe that the child will write to - 2 => ['pipe', 'w'], // STDERR is a pipe to catch the any errors - ]; - - /** - * @param string $command Command for the process to start. Absolute paths are recommended, - * especially if you do not use the $cwd parameter. - * @param string|null $cwd "Current working directory" (CWD) for the process to be executed in. - * @throws \InvalidArgumentException - */ - public function __construct(string $command, int|string|Level $level = Level::Debug, bool $bubble = true, ?string $cwd = null) - { - if ($command === '') { - throw new \InvalidArgumentException('The command argument must be a non-empty string.'); - } - if ($cwd === '') { - throw new \InvalidArgumentException('The optional CWD argument must be a non-empty string or null.'); - } - - parent::__construct($level, $bubble); - - $this->command = $command; - $this->cwd = $cwd; - } - - /** - * Writes the record down to the log of the implementing handler - * - * @throws \UnexpectedValueException - */ - protected function write(LogRecord $record): void - { - $this->ensureProcessIsStarted(); - - $this->writeProcessInput($record->formatted); - - $errors = $this->readProcessErrors(); - if ($errors !== '') { - throw new \UnexpectedValueException(sprintf('Errors while writing to process: %s', $errors)); - } - } - - /** - * Makes sure that the process is actually started, and if not, starts it, - * assigns the stream pipes, and handles startup errors, if any. - */ - private function ensureProcessIsStarted(): void - { - if (is_resource($this->process) === false) { - $this->startProcess(); - - $this->handleStartupErrors(); - } - } - - /** - * Starts the actual process and sets all streams to non-blocking. - */ - private function startProcess(): void - { - $this->process = proc_open($this->command, static::DESCRIPTOR_SPEC, $this->pipes, $this->cwd); - - foreach ($this->pipes as $pipe) { - stream_set_blocking($pipe, false); - } - } - - /** - * Selects the STDERR stream, handles upcoming startup errors, and throws an exception, if any. - * - * @throws \UnexpectedValueException - */ - private function handleStartupErrors(): void - { - $selected = $this->selectErrorStream(); - if (false === $selected) { - throw new \UnexpectedValueException('Something went wrong while selecting a stream.'); - } - - $errors = $this->readProcessErrors(); - - if (is_resource($this->process) === false || $errors !== '') { - throw new \UnexpectedValueException( - sprintf('The process "%s" could not be opened: ' . $errors, $this->command) - ); - } - } - - /** - * Selects the STDERR stream. - * - * @return int|bool - */ - protected function selectErrorStream() - { - $empty = []; - $errorPipes = [$this->pipes[2]]; - - return stream_select($errorPipes, $empty, $empty, 1); - } - - /** - * Reads the errors of the process, if there are any. - * - * @codeCoverageIgnore - * @return string Empty string if there are no errors. - */ - protected function readProcessErrors(): string - { - return (string) stream_get_contents($this->pipes[2]); - } - - /** - * Writes to the input stream of the opened process. - * - * @codeCoverageIgnore - */ - protected function writeProcessInput(string $string): void - { - fwrite($this->pipes[0], $string); - } - - /** - * @inheritDoc - */ - public function close(): void - { - if (is_resource($this->process)) { - foreach ($this->pipes as $pipe) { - fclose($pipe); - } - proc_close($this->process); - $this->process = null; - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php deleted file mode 100644 index 9fb290faa..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Processor\ProcessorInterface; -use Monolog\LogRecord; - -/** - * Interface to describe loggers that have processors - * - * @author Jordi Boggiano - */ -interface ProcessableHandlerInterface -{ - /** - * Adds a processor in the stack. - * - * @phpstan-param ProcessorInterface|(callable(LogRecord): LogRecord) $callback - * - * @param ProcessorInterface|callable $callback - * @return HandlerInterface self - */ - public function pushProcessor(callable $callback): HandlerInterface; - - /** - * Removes the processor on top of the stack and returns it. - * - * @phpstan-return ProcessorInterface|(callable(LogRecord): LogRecord) $callback - * - * @throws \LogicException In case the processor stack is empty - * @return callable|ProcessorInterface - */ - public function popProcessor(): callable; -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php deleted file mode 100644 index 74eeddddc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\ResettableInterface; -use Monolog\Processor\ProcessorInterface; -use Monolog\LogRecord; - -/** - * Helper trait for implementing ProcessableInterface - * - * @author Jordi Boggiano - */ -trait ProcessableHandlerTrait -{ - /** - * @var callable[] - * @phpstan-var array<(callable(LogRecord): LogRecord)|ProcessorInterface> - */ - protected array $processors = []; - - /** - * @inheritDoc - */ - public function pushProcessor(callable $callback): HandlerInterface - { - array_unshift($this->processors, $callback); - - return $this; - } - - /** - * @inheritDoc - */ - public function popProcessor(): callable - { - if (\count($this->processors) === 0) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - protected function processRecord(LogRecord $record): LogRecord - { - foreach ($this->processors as $processor) { - $record = $processor($record); - } - - return $record; - } - - protected function resetProcessors(): void - { - foreach ($this->processors as $processor) { - if ($processor instanceof ResettableInterface) { - $processor->reset(); - } - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php deleted file mode 100644 index 6599a83b4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Psr\Log\LoggerInterface; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Proxies log messages to an existing PSR-3 compliant logger. - * - * If a formatter is configured, the formatter's output MUST be a string and the - * formatted message will be fed to the wrapped PSR logger instead of the original - * log record's message. - * - * @author Michael Moussa - */ -class PsrHandler extends AbstractHandler implements FormattableHandlerInterface -{ - /** - * PSR-3 compliant logger - */ - protected LoggerInterface $logger; - - protected FormatterInterface|null $formatter = null; - - /** - * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied - */ - public function __construct(LoggerInterface $logger, int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->logger = $logger; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - if ($this->formatter !== null) { - $formatted = $this->formatter->format($record); - $this->logger->log($record->level->toPsrLogLevel(), (string) $formatted, $record->context); - } else { - $this->logger->log($record->level->toPsrLogLevel(), $record->message, $record->context); - } - - return false === $this->bubble; - } - - /** - * Sets the formatter. - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $this->formatter = $formatter; - - return $this; - } - - /** - * Gets the formatter. - */ - public function getFormatter(): FormatterInterface - { - if ($this->formatter === null) { - throw new \LogicException('No formatter has been set and this handler does not have a default formatter'); - } - - return $this->formatter; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php deleted file mode 100644 index 615f12194..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php +++ /dev/null @@ -1,246 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Logger; -use Monolog\Utils; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Sends notifications through the pushover api to mobile phones - * - * @author Sebastian Göttschkes - * @see https://www.pushover.net/api - */ -class PushoverHandler extends SocketHandler -{ - private string $token; - - /** @var array */ - private array $users; - - private string $title; - - private string|int|null $user = null; - - private int $retry; - - private int $expire; - - private Level $highPriorityLevel; - - private Level $emergencyLevel; - - private bool $useFormattedMessage = false; - - /** - * All parameters that can be sent to Pushover - * @see https://pushover.net/api - * @var array - */ - private array $parameterNames = [ - 'token' => true, - 'user' => true, - 'message' => true, - 'device' => true, - 'title' => true, - 'url' => true, - 'url_title' => true, - 'priority' => true, - 'timestamp' => true, - 'sound' => true, - 'retry' => true, - 'expire' => true, - 'callback' => true, - ]; - - /** - * Sounds the api supports by default - * @see https://pushover.net/api#sounds - * @var string[] - */ - private array $sounds = [ - 'pushover', 'bike', 'bugle', 'cashregister', 'classical', 'cosmic', 'falling', 'gamelan', 'incoming', - 'intermission', 'magic', 'mechanical', 'pianobar', 'siren', 'spacealarm', 'tugboat', 'alien', 'climb', - 'persistent', 'echo', 'updown', 'none', - ]; - - /** - * @param string $token Pushover api token - * @param string|array $users Pushover user id or array of ids the message will be sent to - * @param string|null $title Title sent to the Pushover API - * @param bool $useSSL Whether to connect via SSL. Required when pushing messages to users that are not - * the pushover.net app owner. OpenSSL is required for this option. - * @param int $retry The retry parameter specifies how often (in seconds) the Pushover servers will - * send the same notification to the user. - * @param int $expire The expire parameter specifies how many seconds your notification will continue - * to be retried for (every retry seconds). - * - * @param int|string|Level|LogLevel::* $highPriorityLevel The minimum logging level at which this handler will start - * sending "high priority" requests to the Pushover API - * @param int|string|Level|LogLevel::* $emergencyLevel The minimum logging level at which this handler will start - * sending "emergency" requests to the Pushover API - * - * - * @phpstan-param string|array $users - * @phpstan-param value-of|value-of|Level|LogLevel::* $highPriorityLevel - * @phpstan-param value-of|value-of|Level|LogLevel::* $emergencyLevel - */ - public function __construct( - string $token, - $users, - ?string $title = null, - int|string|Level $level = Level::Critical, - bool $bubble = true, - bool $useSSL = true, - int|string|Level $highPriorityLevel = Level::Critical, - int|string|Level $emergencyLevel = Level::Emergency, - int $retry = 30, - int $expire = 25200, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80'; - parent::__construct( - $connectionString, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->token = $token; - $this->users = (array) $users; - $this->title = $title ?? (string) gethostname(); - $this->highPriorityLevel = Logger::toMonologLevel($highPriorityLevel); - $this->emergencyLevel = Logger::toMonologLevel($emergencyLevel); - $this->retry = $retry; - $this->expire = $expire; - } - - protected function generateDataStream(LogRecord $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - private function buildContent(LogRecord $record): string - { - // Pushover has a limit of 512 characters on title and message combined. - $maxMessageLength = 512 - strlen($this->title); - - $message = ($this->useFormattedMessage) ? $record->formatted : $record->message; - $message = Utils::substr($message, 0, $maxMessageLength); - - $timestamp = $record->datetime->getTimestamp(); - - $dataArray = [ - 'token' => $this->token, - 'user' => $this->user, - 'message' => $message, - 'title' => $this->title, - 'timestamp' => $timestamp, - ]; - - if ($record->level->value >= $this->emergencyLevel->value) { - $dataArray['priority'] = 2; - $dataArray['retry'] = $this->retry; - $dataArray['expire'] = $this->expire; - } elseif ($record->level->value >= $this->highPriorityLevel->value) { - $dataArray['priority'] = 1; - } - - // First determine the available parameters - $context = array_intersect_key($record->context, $this->parameterNames); - $extra = array_intersect_key($record->extra, $this->parameterNames); - - // Least important info should be merged with subsequent info - $dataArray = array_merge($extra, $context, $dataArray); - - // Only pass sounds that are supported by the API - if (isset($dataArray['sound']) && !in_array($dataArray['sound'], $this->sounds, true)) { - unset($dataArray['sound']); - } - - return http_build_query($dataArray); - } - - private function buildHeader(string $content): string - { - $header = "POST /1/messages.json HTTP/1.1\r\n"; - $header .= "Host: api.pushover.net\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - protected function write(LogRecord $record): void - { - foreach ($this->users as $user) { - $this->user = $user; - - parent::write($record); - $this->closeSocket(); - } - - $this->user = null; - } - - /** - * @param int|string|Level|LogLevel::* $level - * @return $this - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function setHighPriorityLevel(int|string|Level $level): self - { - $this->highPriorityLevel = Logger::toMonologLevel($level); - - return $this; - } - - /** - * @param int|string|Level|LogLevel::* $level - * @return $this - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function setEmergencyLevel(int|string|Level $level): self - { - $this->emergencyLevel = Logger::toMonologLevel($level); - - return $this; - } - - /** - * Use the formatted message? - * - * @return $this - */ - public function useFormattedMessage(bool $useFormattedMessage): self - { - $this->useFormattedMessage = $useFormattedMessage; - - return $this; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php deleted file mode 100644 index 5eee5dc69..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\LogRecord; -use Predis\Client as Predis; -use Redis; - -/** - * Logs to a Redis key using rpush - * - * usage example: - * - * $log = new Logger('application'); - * $redis = new RedisHandler(new Predis\Client("tcp://localhost:6379"), "logs", "prod"); - * $log->pushHandler($redis); - * - * @author Thomas Tourlourat - */ -class RedisHandler extends AbstractProcessingHandler -{ - /** @var Predis|Redis */ - private Predis|Redis $redisClient; - private string $redisKey; - protected int $capSize; - - /** - * @param Predis|Redis $redis The redis instance - * @param string $key The key name to push records to - * @param int $capSize Number of entries to limit list size to, 0 = unlimited - */ - public function __construct(Predis|Redis $redis, string $key, int|string|Level $level = Level::Debug, bool $bubble = true, int $capSize = 0) - { - $this->redisClient = $redis; - $this->redisKey = $key; - $this->capSize = $capSize; - - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if ($this->capSize > 0) { - $this->writeCapped($record); - } else { - $this->redisClient->rpush($this->redisKey, $record->formatted); - } - } - - /** - * Write and cap the collection - * Writes the record to the redis list and caps its - */ - protected function writeCapped(LogRecord $record): void - { - if ($this->redisClient instanceof Redis) { - $mode = defined('Redis::MULTI') ? Redis::MULTI : 1; - $this->redisClient->multi($mode) - ->rPush($this->redisKey, $record->formatted) - ->ltrim($this->redisKey, -$this->capSize, -1) - ->exec(); - } else { - $redisKey = $this->redisKey; - $capSize = $this->capSize; - $this->redisClient->transaction(function ($tx) use ($record, $redisKey, $capSize) { - $tx->rpush($redisKey, $record->formatted); - $tx->ltrim($redisKey, -$capSize, -1); - }); - } - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php deleted file mode 100644 index fa8e9e9ff..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\LogRecord; -use Predis\Client as Predis; -use Redis; - -/** - * Sends the message to a Redis Pub/Sub channel using PUBLISH - * - * usage example: - * - * $log = new Logger('application'); - * $redis = new RedisPubSubHandler(new Predis\Client("tcp://localhost:6379"), "logs", Level::Warning); - * $log->pushHandler($redis); - * - * @author Gaëtan Faugère - */ -class RedisPubSubHandler extends AbstractProcessingHandler -{ - /** @var Predis|Redis */ - private Predis|Redis $redisClient; - private string $channelKey; - - /** - * @param Predis|Redis $redis The redis instance - * @param string $key The channel key to publish records to - */ - public function __construct(Predis|Redis $redis, string $key, int|string|Level $level = Level::Debug, bool $bubble = true) - { - $this->redisClient = $redis; - $this->channelKey = $key; - - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->redisClient->publish($this->channelKey, $record->formatted); - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php deleted file mode 100644 index 1d124723b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Rollbar\RollbarLogger; -use Throwable; -use Monolog\LogRecord; - -/** - * Sends errors to Rollbar - * - * If the context data contains a `payload` key, that is used as an array - * of payload options to RollbarLogger's log method. - * - * Rollbar's context info will contain the context + extra keys from the log record - * merged, and then on top of that a few keys: - * - * - level (rollbar level name) - * - monolog_level (monolog level name, raw level, as rollbar only has 5 but monolog 8) - * - channel - * - datetime (unix timestamp) - * - * @author Paul Statezny - */ -class RollbarHandler extends AbstractProcessingHandler -{ - protected RollbarLogger $rollbarLogger; - - /** - * Records whether any log records have been added since the last flush of the rollbar notifier - */ - private bool $hasRecords = false; - - protected bool $initialized = false; - - /** - * @param RollbarLogger $rollbarLogger RollbarLogger object constructed with valid token - */ - public function __construct(RollbarLogger $rollbarLogger, int|string|Level $level = Level::Error, bool $bubble = true) - { - $this->rollbarLogger = $rollbarLogger; - - parent::__construct($level, $bubble); - } - - /** - * Translates Monolog log levels to Rollbar levels. - * - * @return 'debug'|'info'|'warning'|'error'|'critical' - */ - protected function toRollbarLevel(Level $level): string - { - return match ($level) { - Level::Debug => 'debug', - Level::Info => 'info', - Level::Notice => 'info', - Level::Warning => 'warning', - Level::Error => 'error', - Level::Critical => 'critical', - Level::Alert => 'critical', - Level::Emergency => 'critical', - }; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if (!$this->initialized) { - // __destructor() doesn't get called on Fatal errors - register_shutdown_function([$this, 'close']); - $this->initialized = true; - } - - $context = $record->context; - $context = array_merge($context, $record->extra, [ - 'level' => $this->toRollbarLevel($record->level), - 'monolog_level' => $record->level->getName(), - 'channel' => $record->channel, - 'datetime' => $record->datetime->format('U'), - ]); - - if (isset($context['exception']) && $context['exception'] instanceof Throwable) { - $exception = $context['exception']; - unset($context['exception']); - $toLog = $exception; - } else { - $toLog = $record->message; - } - - // @phpstan-ignore-next-line - $this->rollbarLogger->log($context['level'], $toLog, $context); - - $this->hasRecords = true; - } - - public function flush(): void - { - if ($this->hasRecords) { - $this->rollbarLogger->flush(); - $this->hasRecords = false; - } - } - - /** - * @inheritDoc - */ - public function close(): void - { - $this->flush(); - } - - /** - * @inheritDoc - */ - public function reset(): void - { - $this->flush(); - - parent::reset(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php deleted file mode 100644 index 86240b44f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +++ /dev/null @@ -1,217 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use InvalidArgumentException; -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Stores logs to files that are rotated every day and a limited number of files are kept. - * - * This rotation is only intended to be used as a workaround. Using logrotate to - * handle the rotation is strongly encouraged when you can use it. - * - * @author Christophe Coevoet - * @author Jordi Boggiano - */ -class RotatingFileHandler extends StreamHandler -{ - public const FILE_PER_DAY = 'Y-m-d'; - public const FILE_PER_MONTH = 'Y-m'; - public const FILE_PER_YEAR = 'Y'; - - protected string $filename; - protected int $maxFiles; - protected bool|null $mustRotate = null; - protected \DateTimeImmutable $nextRotation; - protected string $filenameFormat; - protected string $dateFormat; - - /** - * @param int $maxFiles The maximal amount of files to keep (0 means unlimited) - * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param bool $useLocking Try to lock log file before doing any writes - */ - public function __construct(string $filename, int $maxFiles = 0, int|string|Level $level = Level::Debug, bool $bubble = true, ?int $filePermission = null, bool $useLocking = false, string $dateFormat = self::FILE_PER_DAY, string $filenameFormat = '{filename}-{date}') - { - $this->filename = Utils::canonicalizePath($filename); - $this->maxFiles = $maxFiles; - $this->setFilenameFormat($filenameFormat, $dateFormat); - $this->nextRotation = $this->getNextRotation(); - - parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking); - } - - /** - * @inheritDoc - */ - public function close(): void - { - parent::close(); - - if (true === $this->mustRotate) { - $this->rotate(); - } - } - - /** - * @inheritDoc - */ - public function reset(): void - { - parent::reset(); - - if (true === $this->mustRotate) { - $this->rotate(); - } - } - - /** - * @return $this - */ - public function setFilenameFormat(string $filenameFormat, string $dateFormat): self - { - $this->setDateFormat($dateFormat); - if (substr_count($filenameFormat, '{date}') === 0) { - throw new InvalidArgumentException( - 'Invalid filename format - format must contain at least `{date}`, because otherwise rotating is impossible.' - ); - } - $this->filenameFormat = $filenameFormat; - $this->url = $this->getTimedFilename(); - $this->close(); - - return $this; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - // on the first record written, if the log is new, we should rotate (once per day) - if (null === $this->mustRotate) { - $this->mustRotate = null === $this->url || !file_exists($this->url); - } - - if ($this->nextRotation <= $record->datetime) { - $this->mustRotate = true; - $this->close(); - } - - parent::write($record); - } - - /** - * Rotates the files. - */ - protected function rotate(): void - { - // update filename - $this->url = $this->getTimedFilename(); - $this->nextRotation = $this->getNextRotation(); - - // skip GC of old logs if files are unlimited - if (0 === $this->maxFiles) { - return; - } - - $logFiles = glob($this->getGlobPattern()); - if (false === $logFiles) { - // failed to glob - return; - } - - if ($this->maxFiles >= count($logFiles)) { - // no files to remove - return; - } - - // Sorting the files by name to remove the older ones - usort($logFiles, function ($a, $b) { - return strcmp($b, $a); - }); - - foreach (array_slice($logFiles, $this->maxFiles) as $file) { - if (is_writable($file)) { - // suppress errors here as unlink() might fail if two processes - // are cleaning up/rotating at the same time - set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline): bool { - return false; - }); - unlink($file); - restore_error_handler(); - } - } - - $this->mustRotate = false; - } - - protected function getTimedFilename(): string - { - $fileInfo = pathinfo($this->filename); - $timedFilename = str_replace( - ['{filename}', '{date}'], - [$fileInfo['filename'], date($this->dateFormat)], - ($fileInfo['dirname'] ?? '') . '/' . $this->filenameFormat - ); - - if (isset($fileInfo['extension'])) { - $timedFilename .= '.'.$fileInfo['extension']; - } - - return $timedFilename; - } - - protected function getGlobPattern(): string - { - $fileInfo = pathinfo($this->filename); - $glob = str_replace( - ['{filename}', '{date}'], - [$fileInfo['filename'], str_replace( - ['Y', 'y', 'm', 'd'], - ['[0-9][0-9][0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]'], - $this->dateFormat) - ], - ($fileInfo['dirname'] ?? '') . '/' . $this->filenameFormat - ); - if (isset($fileInfo['extension'])) { - $glob .= '.'.$fileInfo['extension']; - } - - return $glob; - } - - protected function setDateFormat(string $dateFormat): void - { - if (0 === preg_match('{^[Yy](([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { - throw new InvalidArgumentException( - 'Invalid date format - format must be one of '. - 'RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), RotatingFileHandler::FILE_PER_MONTH ("Y-m") '. - 'or RotatingFileHandler::FILE_PER_YEAR ("Y"), or you can set one of the '. - 'date formats using slashes, underscores and/or dots instead of dashes.' - ); - } - $this->dateFormat = $dateFormat; - } - - protected function getNextRotation(): \DateTimeImmutable - { - return match (str_replace(['/','_','.'], '-', $this->dateFormat)) { - self::FILE_PER_MONTH => (new \DateTimeImmutable('first day of next month'))->setTime(0, 0, 0), - self::FILE_PER_YEAR => (new \DateTimeImmutable('first day of January next year'))->setTime(0, 0, 0), - default => (new \DateTimeImmutable('tomorrow'))->setTime(0, 0, 0), - }; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php deleted file mode 100644 index 511ec5854..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Closure; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Sampling handler - * - * A sampled event stream can be useful for logging high frequency events in - * a production environment where you only need an idea of what is happening - * and are not concerned with capturing every occurrence. Since the decision to - * handle or not handle a particular event is determined randomly, the - * resulting sampled log is not guaranteed to contain 1/N of the events that - * occurred in the application, but based on the Law of large numbers, it will - * tend to be close to this ratio with a large number of attempts. - * - * @author Bryan Davis - * @author Kunal Mehta - */ -class SamplingHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * Handler or factory Closure($record, $this) - * - * @phpstan-var (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface - */ - protected Closure|HandlerInterface $handler; - - protected int $factor; - - /** - * @phpstan-param (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface $handler - * - * @param Closure|HandlerInterface $handler Handler or factory Closure($record|null, $samplingHandler). - * @param int $factor Sample factor (e.g. 10 means every ~10th record is sampled) - */ - public function __construct(Closure|HandlerInterface $handler, int $factor) - { - parent::__construct(); - $this->handler = $handler; - $this->factor = $factor; - } - - public function isHandling(LogRecord $record): bool - { - return $this->getHandler($record)->isHandling($record); - } - - public function handle(LogRecord $record): bool - { - if ($this->isHandling($record) && mt_rand(1, $this->factor) === 1) { - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - $this->getHandler($record)->handle($record); - } - - return false === $this->bubble; - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory, this will trigger the handler's instantiation. - */ - public function getHandler(LogRecord $record = null): HandlerInterface - { - if (!$this->handler instanceof HandlerInterface) { - $handler = ($this->handler)($record, $this); - if (!$handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory Closure should return a HandlerInterface"); - } - $this->handler = $handler; - } - - return $this->handler; - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php deleted file mode 100644 index b8f574bb4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; - -/** - * SendGridrHandler uses the SendGrid API v2 function to send Log emails, more information in https://sendgrid.com/docs/API_Reference/Web_API/mail.html - * - * @author Ricardo Fontanelli - */ -class SendGridHandler extends MailHandler -{ - /** - * The SendGrid API User - */ - protected string $apiUser; - - /** - * The SendGrid API Key - */ - protected string $apiKey; - - /** - * The email addresses to which the message will be sent - */ - protected string $from; - - /** - * The email addresses to which the message will be sent - * @var string[] - */ - protected array $to; - - /** - * The subject of the email - */ - protected string $subject; - - /** - * @param string $apiUser The SendGrid API User - * @param string $apiKey The SendGrid API Key - * @param string $from The sender of the email - * @param string|string[] $to The recipients of the email - * @param string $subject The subject of the mail - * - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct(string $apiUser, string $apiKey, string $from, string|array $to, string $subject, int|string|Level $level = Level::Error, bool $bubble = true) - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the SendGridHandler'); - } - - parent::__construct($level, $bubble); - $this->apiUser = $apiUser; - $this->apiKey = $apiKey; - $this->from = $from; - $this->to = (array) $to; - $this->subject = $subject; - } - - /** - * @inheritDoc - */ - protected function send(string $content, array $records): void - { - $message = []; - $message['api_user'] = $this->apiUser; - $message['api_key'] = $this->apiKey; - $message['from'] = $this->from; - foreach ($this->to as $recipient) { - $message['to[]'] = $recipient; - } - $message['subject'] = $this->subject; - $message['date'] = date('r'); - - if ($this->isHtmlBody($content)) { - $message['html'] = $content; - } else { - $message['text'] = $content; - } - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, 'https://api.sendgrid.com/api/mail.send.json'); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($message)); - Curl\Util::execute($ch, 2); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php deleted file mode 100644 index 147d8f80b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php +++ /dev/null @@ -1,381 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\Slack; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Slack record utility helping to log to Slack webhooks or API. - * - * @author Greg Kedzierski - * @author Haralan Dobrev - * @see https://api.slack.com/incoming-webhooks - * @see https://api.slack.com/docs/message-attachments - */ -class SlackRecord -{ - public const COLOR_DANGER = 'danger'; - - public const COLOR_WARNING = 'warning'; - - public const COLOR_GOOD = 'good'; - - public const COLOR_DEFAULT = '#e3e4e6'; - - /** - * Slack channel (encoded ID or name) - */ - private string|null $channel; - - /** - * Name of a bot - */ - private string|null $username; - - /** - * User icon e.g. 'ghost', 'http://example.com/user.png' - */ - private string|null $userIcon; - - /** - * Whether the message should be added to Slack as attachment (plain text otherwise) - */ - private bool $useAttachment; - - /** - * Whether the the context/extra messages added to Slack as attachments are in a short style - */ - private bool $useShortAttachment; - - /** - * Whether the attachment should include context and extra data - */ - private bool $includeContextAndExtra; - - /** - * Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * @var string[] - */ - private array $excludeFields; - - private FormatterInterface|null $formatter; - - private NormalizerFormatter $normalizerFormatter; - - /** - * @param string[] $excludeFields - */ - public function __construct( - ?string $channel = null, - ?string $username = null, - bool $useAttachment = true, - ?string $userIcon = null, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - array $excludeFields = [], - FormatterInterface $formatter = null - ) { - $this - ->setChannel($channel) - ->setUsername($username) - ->useAttachment($useAttachment) - ->setUserIcon($userIcon) - ->useShortAttachment($useShortAttachment) - ->includeContextAndExtra($includeContextAndExtra) - ->excludeFields($excludeFields) - ->setFormatter($formatter); - - if ($this->includeContextAndExtra) { - $this->normalizerFormatter = new NormalizerFormatter(); - } - } - - /** - * Returns required data in format that Slack - * is expecting. - * - * @phpstan-return mixed[] - */ - public function getSlackData(LogRecord $record): array - { - $dataArray = []; - - if ($this->username !== null) { - $dataArray['username'] = $this->username; - } - - if ($this->channel !== null) { - $dataArray['channel'] = $this->channel; - } - - if ($this->formatter !== null && !$this->useAttachment) { - $message = $this->formatter->format($record); - } else { - $message = $record->message; - } - - $recordData = $this->removeExcludedFields($record); - - if ($this->useAttachment) { - $attachment = [ - 'fallback' => $message, - 'text' => $message, - 'color' => $this->getAttachmentColor($record->level), - 'fields' => [], - 'mrkdwn_in' => ['fields'], - 'ts' => $recordData['datetime']->getTimestamp(), - 'footer' => $this->username, - 'footer_icon' => $this->userIcon, - ]; - - if ($this->useShortAttachment) { - $attachment['title'] = $recordData['level_name']; - } else { - $attachment['title'] = 'Message'; - $attachment['fields'][] = $this->generateAttachmentField('Level', $recordData['level_name']); - } - - if ($this->includeContextAndExtra) { - foreach (['extra', 'context'] as $key) { - if (!isset($recordData[$key]) || \count($recordData[$key]) === 0) { - continue; - } - - if ($this->useShortAttachment) { - $attachment['fields'][] = $this->generateAttachmentField( - $key, - $recordData[$key] - ); - } else { - // Add all extra fields as individual fields in attachment - $attachment['fields'] = array_merge( - $attachment['fields'], - $this->generateAttachmentFields($recordData[$key]) - ); - } - } - } - - $dataArray['attachments'] = [$attachment]; - } else { - $dataArray['text'] = $message; - } - - if ($this->userIcon !== null) { - if (false !== ($iconUrl = filter_var($this->userIcon, FILTER_VALIDATE_URL))) { - $dataArray['icon_url'] = $iconUrl; - } else { - $dataArray['icon_emoji'] = ":{$this->userIcon}:"; - } - } - - return $dataArray; - } - - /** - * Returns a Slack message attachment color associated with - * provided level. - */ - public function getAttachmentColor(Level $level): string - { - return match ($level) { - Level::Error, Level::Critical, Level::Alert, Level::Emergency => static::COLOR_DANGER, - Level::Warning => static::COLOR_WARNING, - Level::Info, Level::Notice => static::COLOR_GOOD, - Level::Debug => static::COLOR_DEFAULT - }; - } - - /** - * Stringifies an array of key/value pairs to be used in attachment fields - * - * @param mixed[] $fields - */ - public function stringify(array $fields): string - { - /** @var array $normalized */ - $normalized = $this->normalizerFormatter->normalizeValue($fields); - - $hasSecondDimension = \count(array_filter($normalized, 'is_array')) > 0; - $hasOnlyNonNumericKeys = \count(array_filter(array_keys($normalized), 'is_numeric')) === 0; - - return $hasSecondDimension || $hasOnlyNonNumericKeys - ? Utils::jsonEncode($normalized, JSON_PRETTY_PRINT|Utils::DEFAULT_JSON_FLAGS) - : Utils::jsonEncode($normalized, Utils::DEFAULT_JSON_FLAGS); - } - - /** - * Channel used by the bot when posting - * - * @param ?string $channel - * @return $this - */ - public function setChannel(?string $channel = null): self - { - $this->channel = $channel; - - return $this; - } - - /** - * Username used by the bot when posting - * - * @param ?string $username - * @return $this - */ - public function setUsername(?string $username = null): self - { - $this->username = $username; - - return $this; - } - - /** - * @return $this - */ - public function useAttachment(bool $useAttachment = true): self - { - $this->useAttachment = $useAttachment; - - return $this; - } - - /** - * @return $this - */ - public function setUserIcon(?string $userIcon = null): self - { - $this->userIcon = $userIcon; - - if (\is_string($userIcon)) { - $this->userIcon = trim($userIcon, ':'); - } - - return $this; - } - - /** - * @return $this - */ - public function useShortAttachment(bool $useShortAttachment = false): self - { - $this->useShortAttachment = $useShortAttachment; - - return $this; - } - - /** - * @return $this - */ - public function includeContextAndExtra(bool $includeContextAndExtra = false): self - { - $this->includeContextAndExtra = $includeContextAndExtra; - - if ($this->includeContextAndExtra) { - $this->normalizerFormatter = new NormalizerFormatter(); - } - - return $this; - } - - /** - * @param string[] $excludeFields - * @return $this - */ - public function excludeFields(array $excludeFields = []): self - { - $this->excludeFields = $excludeFields; - - return $this; - } - - /** - * @return $this - */ - public function setFormatter(?FormatterInterface $formatter = null): self - { - $this->formatter = $formatter; - - return $this; - } - - /** - * Generates attachment field - * - * @param string|mixed[] $value - * - * @return array{title: string, value: string, short: false} - */ - private function generateAttachmentField(string $title, $value): array - { - $value = is_array($value) - ? sprintf('```%s```', substr($this->stringify($value), 0, 1990)) - : $value; - - return [ - 'title' => ucfirst($title), - 'value' => $value, - 'short' => false, - ]; - } - - /** - * Generates a collection of attachment fields from array - * - * @param mixed[] $data - * - * @return array - */ - private function generateAttachmentFields(array $data): array - { - /** @var array $normalized */ - $normalized = $this->normalizerFormatter->normalizeValue($data); - - $fields = []; - foreach ($normalized as $key => $value) { - $fields[] = $this->generateAttachmentField((string) $key, $value); - } - - return $fields; - } - - /** - * Get a copy of record with fields excluded according to $this->excludeFields - * - * @return mixed[] - */ - private function removeExcludedFields(LogRecord $record): array - { - $recordData = $record->toArray(); - foreach ($this->excludeFields as $field) { - $keys = explode('.', $field); - $node = &$recordData; - $lastKey = end($keys); - foreach ($keys as $key) { - if (!isset($node[$key])) { - break; - } - if ($lastKey === $key) { - unset($node[$key]); - break; - } - $node = &$node[$key]; - } - } - - return $recordData; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php deleted file mode 100644 index 1d9a17712..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php +++ /dev/null @@ -1,267 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\Utils; -use Monolog\Handler\Slack\SlackRecord; -use Monolog\LogRecord; - -/** - * Sends notifications through Slack API - * - * @author Greg Kedzierski - * @see https://api.slack.com/ - */ -class SlackHandler extends SocketHandler -{ - /** - * Slack API token - */ - private string $token; - - /** - * Instance of the SlackRecord util class preparing data for Slack API. - */ - private SlackRecord $slackRecord; - - /** - * @param string $token Slack API token - * @param string $channel Slack channel (encoded ID or name) - * @param string|null $username Name of a bot - * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) - * @param string|null $iconEmoji The emoji name to use (or null) - * @param bool $useShortAttachment Whether the context/extra messages added to Slack as attachments are in a short style - * @param bool $includeContextAndExtra Whether the attachment should include context and extra data - * @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * @throws MissingExtensionException If no OpenSSL PHP extension configured - */ - public function __construct( - string $token, - string $channel, - ?string $username = null, - bool $useAttachment = true, - ?string $iconEmoji = null, - $level = Level::Critical, - bool $bubble = true, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - array $excludeFields = [], - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler'); - } - - parent::__construct( - 'ssl://slack.com:443', - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->slackRecord = new SlackRecord( - $channel, - $username, - $useAttachment, - $iconEmoji, - $useShortAttachment, - $includeContextAndExtra, - $excludeFields - ); - - $this->token = $token; - } - - public function getSlackRecord(): SlackRecord - { - return $this->slackRecord; - } - - public function getToken(): string - { - return $this->token; - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the body of API call - */ - private function buildContent(LogRecord $record): string - { - $dataArray = $this->prepareContentData($record); - - return http_build_query($dataArray); - } - - /** - * @return string[] - */ - protected function prepareContentData(LogRecord $record): array - { - $dataArray = $this->slackRecord->getSlackData($record); - $dataArray['token'] = $this->token; - - if (isset($dataArray['attachments']) && is_array($dataArray['attachments']) && \count($dataArray['attachments']) > 0) { - $dataArray['attachments'] = Utils::jsonEncode($dataArray['attachments']); - } - - return $dataArray; - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST /api/chat.postMessage HTTP/1.1\r\n"; - $header .= "Host: slack.com\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - parent::write($record); - $this->finalizeWrite(); - } - - /** - * Finalizes the request by reading some bytes and then closing the socket - * - * If we do not read some but close the socket too early, slack sometimes - * drops the request entirely. - */ - protected function finalizeWrite(): void - { - $res = $this->getResource(); - if (is_resource($res)) { - @fread($res, 2048); - } - $this->closeSocket(); - } - - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - parent::setFormatter($formatter); - $this->slackRecord->setFormatter($formatter); - - return $this; - } - - public function getFormatter(): FormatterInterface - { - $formatter = parent::getFormatter(); - $this->slackRecord->setFormatter($formatter); - - return $formatter; - } - - /** - * Channel used by the bot when posting - * - * @return $this - */ - public function setChannel(string $channel): self - { - $this->slackRecord->setChannel($channel); - - return $this; - } - - /** - * Username used by the bot when posting - * - * @return $this - */ - public function setUsername(string $username): self - { - $this->slackRecord->setUsername($username); - - return $this; - } - - /** - * @return $this - */ - public function useAttachment(bool $useAttachment): self - { - $this->slackRecord->useAttachment($useAttachment); - - return $this; - } - - /** - * @return $this - */ - public function setIconEmoji(string $iconEmoji): self - { - $this->slackRecord->setUserIcon($iconEmoji); - - return $this; - } - - /** - * @return $this - */ - public function useShortAttachment(bool $useShortAttachment): self - { - $this->slackRecord->useShortAttachment($useShortAttachment); - - return $this; - } - - /** - * @return $this - */ - public function includeContextAndExtra(bool $includeContextAndExtra): self - { - $this->slackRecord->includeContextAndExtra($includeContextAndExtra); - - return $this; - } - - /** - * @param string[] $excludeFields - * @return $this - */ - public function excludeFields(array $excludeFields): self - { - $this->slackRecord->excludeFields($excludeFields); - - return $this; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php deleted file mode 100644 index 6466ba3af..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\Utils; -use Monolog\Handler\Slack\SlackRecord; -use Monolog\LogRecord; - -/** - * Sends notifications through Slack Webhooks - * - * @author Haralan Dobrev - * @see https://api.slack.com/incoming-webhooks - */ -class SlackWebhookHandler extends AbstractProcessingHandler -{ - /** - * Slack Webhook token - */ - private string $webhookUrl; - - /** - * Instance of the SlackRecord util class preparing data for Slack API. - */ - private SlackRecord $slackRecord; - - /** - * @param string $webhookUrl Slack Webhook URL - * @param string|null $channel Slack channel (encoded ID or name) - * @param string|null $username Name of a bot - * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) - * @param string|null $iconEmoji The emoji name to use (or null) - * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style - * @param bool $includeContextAndExtra Whether the attachment should include context and extra data - * @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct( - string $webhookUrl, - ?string $channel = null, - ?string $username = null, - bool $useAttachment = true, - ?string $iconEmoji = null, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - $level = Level::Critical, - bool $bubble = true, - array $excludeFields = [] - ) { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the SlackWebhookHandler'); - } - - parent::__construct($level, $bubble); - - $this->webhookUrl = $webhookUrl; - - $this->slackRecord = new SlackRecord( - $channel, - $username, - $useAttachment, - $iconEmoji, - $useShortAttachment, - $includeContextAndExtra, - $excludeFields - ); - } - - public function getSlackRecord(): SlackRecord - { - return $this->slackRecord; - } - - public function getWebhookUrl(): string - { - return $this->webhookUrl; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $postData = $this->slackRecord->getSlackData($record); - $postString = Utils::jsonEncode($postData); - - $ch = curl_init(); - $options = [ - CURLOPT_URL => $this->webhookUrl, - CURLOPT_POST => true, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HTTPHEADER => ['Content-type: application/json'], - CURLOPT_POSTFIELDS => $postString, - ]; - if (defined('CURLOPT_SAFE_UPLOAD')) { - $options[CURLOPT_SAFE_UPLOAD] = true; - } - - curl_setopt_array($ch, $options); - - Curl\Util::execute($ch); - } - - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - parent::setFormatter($formatter); - $this->slackRecord->setFormatter($formatter); - - return $this; - } - - public function getFormatter(): FormatterInterface - { - $formatter = parent::getFormatter(); - $this->slackRecord->setFormatter($formatter); - - return $formatter; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php deleted file mode 100644 index 63f437f3f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php +++ /dev/null @@ -1,436 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Stores to any socket - uses fsockopen() or pfsockopen(). - * - * @author Pablo de Leon Belloc - * @see http://php.net/manual/en/function.fsockopen.php - */ -class SocketHandler extends AbstractProcessingHandler -{ - private string $connectionString; - private float $connectionTimeout; - /** @var resource|null */ - private $resource; - private float $timeout; - private float $writingTimeout; - private int|null $lastSentBytes = null; - private int|null $chunkSize; - private bool $persistent; - private int|null $errno = null; - private string|null $errstr = null; - private float|null $lastWritingAt = null; - - /** - * @param string $connectionString Socket connection string - * @param bool $persistent Flag to enable/disable persistent connections - * @param float $timeout Socket timeout to wait until the request is being aborted - * @param float $writingTimeout Socket timeout to wait until the request should've been sent/written - * @param float|null $connectionTimeout Socket connect timeout to wait until the connection should've been - * established - * @param int|null $chunkSize Sets the chunk size. Only has effect during connection in the writing cycle - * - * @throws \InvalidArgumentException If an invalid timeout value (less than 0) is passed. - */ - public function __construct( - string $connectionString, - $level = Level::Debug, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - parent::__construct($level, $bubble); - $this->connectionString = $connectionString; - - if ($connectionTimeout !== null) { - $this->validateTimeout($connectionTimeout); - } - - $this->connectionTimeout = $connectionTimeout ?? (float) ini_get('default_socket_timeout'); - $this->persistent = $persistent; - $this->validateTimeout($timeout); - $this->timeout = $timeout; - $this->validateTimeout($writingTimeout); - $this->writingTimeout = $writingTimeout; - $this->chunkSize = $chunkSize; - } - - /** - * Connect (if necessary) and write to the socket - * - * @inheritDoc - * - * @throws \UnexpectedValueException - * @throws \RuntimeException - */ - protected function write(LogRecord $record): void - { - $this->connectIfNotConnected(); - $data = $this->generateDataStream($record); - $this->writeToSocket($data); - } - - /** - * We will not close a PersistentSocket instance so it can be reused in other requests. - */ - public function close(): void - { - if (!$this->isPersistent()) { - $this->closeSocket(); - } - } - - /** - * Close socket, if open - */ - public function closeSocket(): void - { - if (is_resource($this->resource)) { - fclose($this->resource); - $this->resource = null; - } - } - - /** - * Set socket connection to be persistent. It only has effect before the connection is initiated. - * - * @return $this - */ - public function setPersistent(bool $persistent): self - { - $this->persistent = $persistent; - - return $this; - } - - /** - * Set connection timeout. Only has effect before we connect. - * - * @see http://php.net/manual/en/function.fsockopen.php - * @return $this - */ - public function setConnectionTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->connectionTimeout = $seconds; - - return $this; - } - - /** - * Set write timeout. Only has effect before we connect. - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - * @return $this - */ - public function setTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->timeout = $seconds; - - return $this; - } - - /** - * Set writing timeout. Only has effect during connection in the writing cycle. - * - * @param float $seconds 0 for no timeout - * @return $this - */ - public function setWritingTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->writingTimeout = $seconds; - - return $this; - } - - /** - * Set chunk size. Only has effect during connection in the writing cycle. - * - * @return $this - */ - public function setChunkSize(int $bytes): self - { - $this->chunkSize = $bytes; - - return $this; - } - - /** - * Get current connection string - */ - public function getConnectionString(): string - { - return $this->connectionString; - } - - /** - * Get persistent setting - */ - public function isPersistent(): bool - { - return $this->persistent; - } - - /** - * Get current connection timeout setting - */ - public function getConnectionTimeout(): float - { - return $this->connectionTimeout; - } - - /** - * Get current in-transfer timeout - */ - public function getTimeout(): float - { - return $this->timeout; - } - - /** - * Get current local writing timeout - */ - public function getWritingTimeout(): float - { - return $this->writingTimeout; - } - - /** - * Get current chunk size - */ - public function getChunkSize(): ?int - { - return $this->chunkSize; - } - - /** - * Check to see if the socket is currently available. - * - * UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details. - */ - public function isConnected(): bool - { - return is_resource($this->resource) - && !feof($this->resource); // on TCP - other party can close connection. - } - - /** - * Wrapper to allow mocking - * - * @return resource|false - */ - protected function pfsockopen() - { - return @pfsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - * - * @return resource|false - */ - protected function fsockopen() - { - return @fsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - */ - protected function streamSetTimeout(): bool - { - $seconds = floor($this->timeout); - $microseconds = round(($this->timeout - $seconds) * 1e6); - - if (!is_resource($this->resource)) { - throw new \LogicException('streamSetTimeout called but $this->resource is not a resource'); - } - - return stream_set_timeout($this->resource, (int) $seconds, (int) $microseconds); - } - - /** - * Wrapper to allow mocking - * - * @see http://php.net/manual/en/function.stream-set-chunk-size.php - * - * @return int|false - */ - protected function streamSetChunkSize(): int|bool - { - if (!is_resource($this->resource)) { - throw new \LogicException('streamSetChunkSize called but $this->resource is not a resource'); - } - - if (null === $this->chunkSize) { - throw new \LogicException('streamSetChunkSize called but $this->chunkSize is not set'); - } - - return stream_set_chunk_size($this->resource, $this->chunkSize); - } - - /** - * Wrapper to allow mocking - * - * @return int|false - */ - protected function fwrite(string $data): int|bool - { - if (!is_resource($this->resource)) { - throw new \LogicException('fwrite called but $this->resource is not a resource'); - } - - return @fwrite($this->resource, $data); - } - - /** - * Wrapper to allow mocking - * - * @return mixed[]|bool - */ - protected function streamGetMetadata(): array|bool - { - if (!is_resource($this->resource)) { - throw new \LogicException('streamGetMetadata called but $this->resource is not a resource'); - } - - return stream_get_meta_data($this->resource); - } - - private function validateTimeout(float $value): void - { - if ($value < 0) { - throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got $value)"); - } - } - - private function connectIfNotConnected(): void - { - if ($this->isConnected()) { - return; - } - $this->connect(); - } - - protected function generateDataStream(LogRecord $record): string - { - return (string) $record->formatted; - } - - /** - * @return resource|null - */ - protected function getResource() - { - return $this->resource; - } - - private function connect(): void - { - $this->createSocketResource(); - $this->setSocketTimeout(); - $this->setStreamChunkSize(); - } - - private function createSocketResource(): void - { - if ($this->isPersistent()) { - $resource = $this->pfsockopen(); - } else { - $resource = $this->fsockopen(); - } - if (is_bool($resource)) { - throw new \UnexpectedValueException("Failed connecting to $this->connectionString ($this->errno: $this->errstr)"); - } - $this->resource = $resource; - } - - private function setSocketTimeout(): void - { - if (!$this->streamSetTimeout()) { - throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); - } - } - - private function setStreamChunkSize(): void - { - if (null !== $this->chunkSize && false === $this->streamSetChunkSize()) { - throw new \UnexpectedValueException("Failed setting chunk size with stream_set_chunk_size()"); - } - } - - private function writeToSocket(string $data): void - { - $length = strlen($data); - $sent = 0; - $this->lastSentBytes = $sent; - while ($this->isConnected() && $sent < $length) { - if (0 == $sent) { - $chunk = $this->fwrite($data); - } else { - $chunk = $this->fwrite(substr($data, $sent)); - } - if ($chunk === false) { - throw new \RuntimeException("Could not write to socket"); - } - $sent += $chunk; - $socketInfo = $this->streamGetMetadata(); - if (is_array($socketInfo) && (bool) $socketInfo['timed_out']) { - throw new \RuntimeException("Write timed-out"); - } - - if ($this->writingIsTimedOut($sent)) { - throw new \RuntimeException("Write timed-out, no data sent for `{$this->writingTimeout}` seconds, probably we got disconnected (sent $sent of $length)"); - } - } - if (!$this->isConnected() && $sent < $length) { - throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)"); - } - } - - private function writingIsTimedOut(int $sent): bool - { - // convert to ms - if (0.0 == $this->writingTimeout) { - return false; - } - - if ($sent !== $this->lastSentBytes) { - $this->lastWritingAt = microtime(true); - $this->lastSentBytes = $sent; - - return false; - } else { - usleep(100); - } - - if ((microtime(true) - (float) $this->lastWritingAt) >= $this->writingTimeout) { - $this->closeSocket(); - - return true; - } - - return false; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php deleted file mode 100644 index b4512a601..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Aws\Sqs\SqsClient; -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Writes to any sqs queue. - * - * @author Martijn van Calker - */ -class SqsHandler extends AbstractProcessingHandler -{ - /** 256 KB in bytes - maximum message size in SQS */ - protected const MAX_MESSAGE_SIZE = 262144; - /** 100 KB in bytes - head message size for new error log */ - protected const HEAD_MESSAGE_SIZE = 102400; - - private SqsClient $client; - private string $queueUrl; - - public function __construct(SqsClient $sqsClient, string $queueUrl, int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->client = $sqsClient; - $this->queueUrl = $queueUrl; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if (!isset($record->formatted) || 'string' !== gettype($record->formatted)) { - throw new \InvalidArgumentException('SqsHandler accepts only formatted records as a string' . Utils::getRecordMessageForException($record)); - } - - $messageBody = $record->formatted; - if (strlen($messageBody) >= static::MAX_MESSAGE_SIZE) { - $messageBody = Utils::substr($messageBody, 0, static::HEAD_MESSAGE_SIZE); - } - - $this->client->sendMessage([ - 'QueueUrl' => $this->queueUrl, - 'MessageBody' => $messageBody, - ]); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php deleted file mode 100644 index a87577c8d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ /dev/null @@ -1,205 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Stores to any stream resource - * - * Can be used to store into php://stderr, remote and local files, etc. - * - * @author Jordi Boggiano - */ -class StreamHandler extends AbstractProcessingHandler -{ - protected const MAX_CHUNK_SIZE = 2147483647; - /** 10MB */ - protected const DEFAULT_CHUNK_SIZE = 10 * 1024 * 1024; - protected int $streamChunkSize; - /** @var resource|null */ - protected $stream; - protected string|null $url = null; - private string|null $errorMessage = null; - protected int|null $filePermission; - protected bool $useLocking; - /** @var true|null */ - private bool|null $dirCreated = null; - - /** - * @param resource|string $stream If a missing path can't be created, an UnexpectedValueException will be thrown on first write - * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param bool $useLocking Try to lock log file before doing any writes - * - * @throws \InvalidArgumentException If stream is not a resource or string - */ - public function __construct($stream, int|string|Level $level = Level::Debug, bool $bubble = true, ?int $filePermission = null, bool $useLocking = false) - { - parent::__construct($level, $bubble); - - if (($phpMemoryLimit = Utils::expandIniShorthandBytes(ini_get('memory_limit'))) !== false) { - if ($phpMemoryLimit > 0) { - // use max 10% of allowed memory for the chunk size, and at least 100KB - $this->streamChunkSize = min(static::MAX_CHUNK_SIZE, max((int) ($phpMemoryLimit / 10), 100 * 1024)); - } else { - // memory is unlimited, set to the default 10MB - $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; - } - } else { - // no memory limit information, set to the default 10MB - $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; - } - - if (is_resource($stream)) { - $this->stream = $stream; - - stream_set_chunk_size($this->stream, $this->streamChunkSize); - } elseif (is_string($stream)) { - $this->url = Utils::canonicalizePath($stream); - } else { - throw new \InvalidArgumentException('A stream must either be a resource or a string.'); - } - - $this->filePermission = $filePermission; - $this->useLocking = $useLocking; - } - - /** - * @inheritDoc - */ - public function close(): void - { - if (null !== $this->url && is_resource($this->stream)) { - fclose($this->stream); - } - $this->stream = null; - $this->dirCreated = null; - } - - /** - * Return the currently active stream if it is open - * - * @return resource|null - */ - public function getStream() - { - return $this->stream; - } - - /** - * Return the stream URL if it was configured with a URL and not an active resource - */ - public function getUrl(): ?string - { - return $this->url; - } - - public function getStreamChunkSize(): int - { - return $this->streamChunkSize; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if (!is_resource($this->stream)) { - $url = $this->url; - if (null === $url || '' === $url) { - throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().' . Utils::getRecordMessageForException($record)); - } - $this->createDir($url); - $this->errorMessage = null; - set_error_handler([$this, 'customErrorHandler']); - try { - $stream = fopen($url, 'a'); - if ($this->filePermission !== null) { - @chmod($url, $this->filePermission); - } - } finally { - restore_error_handler(); - } - if (!is_resource($stream)) { - $this->stream = null; - - throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $url) . Utils::getRecordMessageForException($record)); - } - stream_set_chunk_size($stream, $this->streamChunkSize); - $this->stream = $stream; - } - - $stream = $this->stream; - if ($this->useLocking) { - // ignoring errors here, there's not much we can do about them - flock($stream, LOCK_EX); - } - - $this->streamWrite($stream, $record); - - if ($this->useLocking) { - flock($stream, LOCK_UN); - } - } - - /** - * Write to stream - * @param resource $stream - */ - protected function streamWrite($stream, LogRecord $record): void - { - fwrite($stream, (string) $record->formatted); - } - - private function customErrorHandler(int $code, string $msg): bool - { - $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); - - return true; - } - - private function getDirFromStream(string $stream): ?string - { - $pos = strpos($stream, '://'); - if ($pos === false) { - return dirname($stream); - } - - if ('file://' === substr($stream, 0, 7)) { - return dirname(substr($stream, 7)); - } - - return null; - } - - private function createDir(string $url): void - { - // Do not try to create dir if it has already been tried. - if (true === $this->dirCreated) { - return; - } - - $dir = $this->getDirFromStream($url); - if (null !== $dir && !is_dir($dir)) { - $this->errorMessage = null; - set_error_handler([$this, 'customErrorHandler']); - $status = mkdir($dir, 0777, true); - restore_error_handler(); - if (false === $status && !is_dir($dir) && strpos((string) $this->errorMessage, 'File exists') === false) { - throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and it could not be created: '.$this->errorMessage, $dir)); - } - } - $this->dirCreated = true; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php deleted file mode 100644 index 99507a170..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Logs to syslog service. - * - * usage example: - * - * $log = new Logger('application'); - * $syslog = new SyslogHandler('myfacility', 'local6'); - * $formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%"); - * $syslog->setFormatter($formatter); - * $log->pushHandler($syslog); - * - * @author Sven Paulus - */ -class SyslogHandler extends AbstractSyslogHandler -{ - protected string $ident; - protected int $logopts; - - /** - * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant - * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID - */ - public function __construct(string $ident, string|int $facility = LOG_USER, int|string|Level $level = Level::Debug, bool $bubble = true, int $logopts = LOG_PID) - { - parent::__construct($facility, $level, $bubble); - - $this->ident = $ident; - $this->logopts = $logopts; - } - - /** - * @inheritDoc - */ - public function close(): void - { - closelog(); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - openlog($this->ident, $this->logopts, $this->facility); - syslog($this->toSyslogPriority($record->level), (string) $record->formatted); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php deleted file mode 100644 index 6a4833450..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\SyslogUdp; - -use Monolog\Utils; -use Socket; - -class UdpSocket -{ - protected const DATAGRAM_MAX_LENGTH = 65023; - - protected string $ip; - protected int $port; - protected ?Socket $socket = null; - - public function __construct(string $ip, int $port = 514) - { - $this->ip = $ip; - $this->port = $port; - } - - public function write(string $line, string $header = ""): void - { - $this->send($this->assembleMessage($line, $header)); - } - - public function close(): void - { - if ($this->socket instanceof Socket) { - socket_close($this->socket); - $this->socket = null; - } - } - - protected function getSocket(): Socket - { - if (null !== $this->socket) { - return $this->socket; - } - - $domain = AF_INET; - $protocol = SOL_UDP; - // Check if we are using unix sockets. - if ($this->port === 0) { - $domain = AF_UNIX; - $protocol = IPPROTO_IP; - } - - $socket = socket_create($domain, SOCK_DGRAM, $protocol); - if ($socket instanceof Socket) { - return $this->socket = $socket; - } - - throw new \RuntimeException('The UdpSocket to '.$this->ip.':'.$this->port.' could not be opened via socket_create'); - } - - protected function send(string $chunk): void - { - socket_sendto($this->getSocket(), $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port); - } - - protected function assembleMessage(string $line, string $header): string - { - $chunkSize = static::DATAGRAM_MAX_LENGTH - strlen($header); - - return $header . Utils::substr($line, 0, $chunkSize); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php deleted file mode 100644 index 607409353..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php +++ /dev/null @@ -1,154 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use DateTimeInterface; -use Monolog\Handler\SyslogUdp\UdpSocket; -use Monolog\Level; -use Monolog\LogRecord; -use Monolog\Utils; - -/** - * A Handler for logging to a remote syslogd server. - * - * @author Jesper Skovgaard Nielsen - * @author Dominik Kukacka - */ -class SyslogUdpHandler extends AbstractSyslogHandler -{ - const RFC3164 = 0; - const RFC5424 = 1; - const RFC5424e = 2; - - /** @var array */ - private array $dateFormats = [ - self::RFC3164 => 'M d H:i:s', - self::RFC5424 => \DateTime::RFC3339, - self::RFC5424e => \DateTime::RFC3339_EXTENDED, - ]; - - protected UdpSocket $socket; - protected string $ident; - /** @var self::RFC* */ - protected int $rfc; - - /** - * @param string $host Either IP/hostname or a path to a unix socket (port must be 0 then) - * @param int $port Port number, or 0 if $host is a unix socket - * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param string $ident Program name or tag for each log message. - * @param int $rfc RFC to format the message for. - * @throws MissingExtensionException when there is no socket extension - * - * @phpstan-param self::RFC* $rfc - */ - public function __construct(string $host, int $port = 514, string|int $facility = LOG_USER, int|string|Level $level = Level::Debug, bool $bubble = true, string $ident = 'php', int $rfc = self::RFC5424) - { - if (!extension_loaded('sockets')) { - throw new MissingExtensionException('The sockets extension is required to use the SyslogUdpHandler'); - } - - parent::__construct($facility, $level, $bubble); - - $this->ident = $ident; - $this->rfc = $rfc; - - $this->socket = new UdpSocket($host, $port); - } - - protected function write(LogRecord $record): void - { - $lines = $this->splitMessageIntoLines($record->formatted); - - $header = $this->makeCommonSyslogHeader($this->toSyslogPriority($record->level), $record->datetime); - - foreach ($lines as $line) { - $this->socket->write($line, $header); - } - } - - public function close(): void - { - $this->socket->close(); - } - - /** - * @param string|string[] $message - * @return string[] - */ - private function splitMessageIntoLines($message): array - { - if (is_array($message)) { - $message = implode("\n", $message); - } - - $lines = preg_split('/$\R?^/m', (string) $message, -1, PREG_SPLIT_NO_EMPTY); - if (false === $lines) { - $pcreErrorCode = preg_last_error(); - - throw new \RuntimeException('Could not preg_split: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); - } - - return $lines; - } - - /** - * Make common syslog header (see rfc5424 or rfc3164) - */ - protected function makeCommonSyslogHeader(int $severity, DateTimeInterface $datetime): string - { - $priority = $severity + $this->facility; - - $pid = getmypid(); - if (false === $pid) { - $pid = '-'; - } - - $hostname = gethostname(); - if (false === $hostname) { - $hostname = '-'; - } - - if ($this->rfc === self::RFC3164) { - // see https://github.com/phpstan/phpstan/issues/5348 - // @phpstan-ignore-next-line - $dateNew = $datetime->setTimezone(new \DateTimeZone('UTC')); - $date = $dateNew->format($this->dateFormats[$this->rfc]); - - return "<$priority>" . - $date . " " . - $hostname . " " . - $this->ident . "[" . $pid . "]: "; - } - - $date = $datetime->format($this->dateFormats[$this->rfc]); - - return "<$priority>1 " . - $date . " " . - $hostname . " " . - $this->ident . " " . - $pid . " - - "; - } - - /** - * Inject your own socket, mainly used for testing - * - * @return $this - */ - public function setSocket(UdpSocket $socket): self - { - $this->socket = $socket; - - return $this; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php deleted file mode 100644 index feaa002fa..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php +++ /dev/null @@ -1,297 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use RuntimeException; -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Handler sends logs to Telegram using Telegram Bot API. - * - * How to use: - * 1) Create a Telegram bot with https://telegram.me/BotFather; - * 2) Create a Telegram channel or a group where logs will be recorded; - * 3) Add the created bot from step 1 to the created channel/group from step 2. - * - * In order to create an instance of TelegramBotHandler use - * 1. The Telegram bot API key from step 1 - * 2. The channel name with the `@` prefix if you created a public channel (e.g. `@my_public_channel`), - * or the channel ID with the `-100` prefix if you created a private channel (e.g. `-1001234567890`), - * or the group ID from step 2 (e.g. `-1234567890`). - * - * @link https://core.telegram.org/bots/api - * - * @author Mazur Alexandr - */ -class TelegramBotHandler extends AbstractProcessingHandler -{ - private const BOT_API = 'https://api.telegram.org/bot'; - - /** - * The available values of parseMode according to the Telegram api documentation - */ - private const AVAILABLE_PARSE_MODES = [ - 'HTML', - 'MarkdownV2', - 'Markdown', // legacy mode without underline and strikethrough, use MarkdownV2 instead - ]; - - /** - * The maximum number of characters allowed in a message according to the Telegram api documentation - */ - private const MAX_MESSAGE_LENGTH = 4096; - - /** - * Telegram bot access token provided by BotFather. - * Create telegram bot with https://telegram.me/BotFather and use access token from it. - */ - private string $apiKey; - - /** - * Telegram channel name. - * Since to start with '@' symbol as prefix. - */ - private string $channel; - - /** - * The kind of formatting that is used for the message. - * See available options at https://core.telegram.org/bots/api#formatting-options - * or in AVAILABLE_PARSE_MODES - */ - private string|null $parseMode; - - /** - * Disables link previews for links in the message. - */ - private bool|null $disableWebPagePreview; - - /** - * Sends the message silently. Users will receive a notification with no sound. - */ - private bool|null $disableNotification; - - /** - * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. - * False - truncates a message that is too long. - */ - private bool $splitLongMessages; - - /** - * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). - */ - private bool $delayBetweenMessages; - - /** - * Telegram message thread id, unique identifier for the target message thread (topic) of the forum; for forum supergroups only - * See how to get the `message_thread_id` https://stackoverflow.com/a/75178418 - */ - private int|null $topic; - - /** - * @param string $apiKey Telegram bot access token provided by BotFather - * @param string $channel Telegram channel name - * @param bool $splitLongMessages Split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages - * @param bool $delayBetweenMessages Adds delay between sending a split message according to Telegram API - * @param int $topic Telegram message thread id, unique identifier for the target message thread (topic) of the forum - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct( - string $apiKey, - string $channel, - $level = Level::Debug, - bool $bubble = true, - string $parseMode = null, - bool $disableWebPagePreview = null, - bool $disableNotification = null, - bool $splitLongMessages = false, - bool $delayBetweenMessages = false, - int $topic = null - ) { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the TelegramBotHandler'); - } - - parent::__construct($level, $bubble); - - $this->apiKey = $apiKey; - $this->channel = $channel; - $this->setParseMode($parseMode); - $this->disableWebPagePreview($disableWebPagePreview); - $this->disableNotification($disableNotification); - $this->splitLongMessages($splitLongMessages); - $this->delayBetweenMessages($delayBetweenMessages); - $this->setTopic($topic); - } - - /** - * @return $this - */ - public function setParseMode(string $parseMode = null): self - { - if ($parseMode !== null && !in_array($parseMode, self::AVAILABLE_PARSE_MODES, true)) { - throw new \InvalidArgumentException('Unknown parseMode, use one of these: ' . implode(', ', self::AVAILABLE_PARSE_MODES) . '.'); - } - - $this->parseMode = $parseMode; - - return $this; - } - - /** - * @return $this - */ - public function disableWebPagePreview(bool $disableWebPagePreview = null): self - { - $this->disableWebPagePreview = $disableWebPagePreview; - - return $this; - } - - /** - * @return $this - */ - public function disableNotification(bool $disableNotification = null): self - { - $this->disableNotification = $disableNotification; - - return $this; - } - - /** - * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. - * False - truncates a message that is too long. - * - * @return $this - */ - public function splitLongMessages(bool $splitLongMessages = false): self - { - $this->splitLongMessages = $splitLongMessages; - - return $this; - } - - /** - * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). - * - * @return $this - */ - public function delayBetweenMessages(bool $delayBetweenMessages = false): self - { - $this->delayBetweenMessages = $delayBetweenMessages; - - return $this; - } - - /** - * @return $this - */ - public function setTopic(int $topic = null): self - { - $this->topic = $topic; - - return $this; - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $messages = []; - - foreach ($records as $record) { - if (!$this->isHandling($record)) { - continue; - } - - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - $messages[] = $record; - } - - if (\count($messages) > 0) { - $this->send((string) $this->getFormatter()->formatBatch($messages)); - } - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->send($record->formatted); - } - - /** - * Send request to @link https://api.telegram.org/bot on SendMessage action. - */ - protected function send(string $message): void - { - $messages = $this->handleMessageLength($message); - - foreach ($messages as $key => $msg) { - if ($this->delayBetweenMessages && $key > 0) { - sleep(1); - } - - $this->sendCurl($msg); - } - } - - protected function sendCurl(string $message): void - { - $ch = curl_init(); - $url = self::BOT_API . $this->apiKey . '/SendMessage'; - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - $params = [ - 'text' => $message, - 'chat_id' => $this->channel, - 'parse_mode' => $this->parseMode, - 'disable_web_page_preview' => $this->disableWebPagePreview, - 'disable_notification' => $this->disableNotification, - ]; - if ($this->topic !== null) { - $params['message_thread_id'] = $this->topic; - } - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params)); - - $result = Curl\Util::execute($ch); - if (!is_string($result)) { - throw new RuntimeException('Telegram API error. Description: No response'); - } - $result = json_decode($result, true); - - if ($result['ok'] === false) { - throw new RuntimeException('Telegram API error. Description: ' . $result['description']); - } - } - - /** - * Handle a message that is too long: truncates or splits into several - * @return string[] - */ - private function handleMessageLength(string $message): array - { - $truncatedMarker = ' (...truncated)'; - if (!$this->splitLongMessages && strlen($message) > self::MAX_MESSAGE_LENGTH) { - return [Utils::substr($message, 0, self::MAX_MESSAGE_LENGTH - strlen($truncatedMarker)) . $truncatedMarker]; - } - - return str_split($message, self::MAX_MESSAGE_LENGTH); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php deleted file mode 100644 index 8e356ef31..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php +++ /dev/null @@ -1,195 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Used for testing purposes. - * - * It records all records and gives you access to them for verification. - * - * @author Jordi Boggiano - * - * @method bool hasEmergency(string|array $recordAssertions) - * @method bool hasAlert(string|array $recordAssertions) - * @method bool hasCritical(string|array $recordAssertions) - * @method bool hasError(string|array $recordAssertions) - * @method bool hasWarning(string|array $recordAssertions) - * @method bool hasNotice(string|array $recordAssertions) - * @method bool hasInfo(string|array $recordAssertions) - * @method bool hasDebug(string|array $recordAssertions) - * - * @method bool hasEmergencyRecords() - * @method bool hasAlertRecords() - * @method bool hasCriticalRecords() - * @method bool hasErrorRecords() - * @method bool hasWarningRecords() - * @method bool hasNoticeRecords() - * @method bool hasInfoRecords() - * @method bool hasDebugRecords() - * - * @method bool hasEmergencyThatContains(string $message) - * @method bool hasAlertThatContains(string $message) - * @method bool hasCriticalThatContains(string $message) - * @method bool hasErrorThatContains(string $message) - * @method bool hasWarningThatContains(string $message) - * @method bool hasNoticeThatContains(string $message) - * @method bool hasInfoThatContains(string $message) - * @method bool hasDebugThatContains(string $message) - * - * @method bool hasEmergencyThatMatches(string $regex) - * @method bool hasAlertThatMatches(string $regex) - * @method bool hasCriticalThatMatches(string $regex) - * @method bool hasErrorThatMatches(string $regex) - * @method bool hasWarningThatMatches(string $regex) - * @method bool hasNoticeThatMatches(string $regex) - * @method bool hasInfoThatMatches(string $regex) - * @method bool hasDebugThatMatches(string $regex) - * - * @method bool hasEmergencyThatPasses(callable $predicate) - * @method bool hasAlertThatPasses(callable $predicate) - * @method bool hasCriticalThatPasses(callable $predicate) - * @method bool hasErrorThatPasses(callable $predicate) - * @method bool hasWarningThatPasses(callable $predicate) - * @method bool hasNoticeThatPasses(callable $predicate) - * @method bool hasInfoThatPasses(callable $predicate) - * @method bool hasDebugThatPasses(callable $predicate) - */ -class TestHandler extends AbstractProcessingHandler -{ - /** @var LogRecord[] */ - protected array $records = []; - /** @phpstan-var array, LogRecord[]> */ - protected array $recordsByLevel = []; - private bool $skipReset = false; - - /** - * @return array - */ - public function getRecords(): array - { - return $this->records; - } - - public function clear(): void - { - $this->records = []; - $this->recordsByLevel = []; - } - - public function reset(): void - { - if (!$this->skipReset) { - $this->clear(); - } - } - - public function setSkipReset(bool $skipReset): void - { - $this->skipReset = $skipReset; - } - - /** - * @param int|string|Level|LogLevel::* $level Logging level value or name - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function hasRecords(int|string|Level $level): bool - { - return isset($this->recordsByLevel[Logger::toMonologLevel($level)->value]); - } - - /** - * @param string|array $recordAssertions Either a message string or an array containing message and optionally context keys that will be checked against all records - * - * @phpstan-param array{message: string, context?: mixed[]}|string $recordAssertions - */ - public function hasRecord(string|array $recordAssertions, Level $level): bool - { - if (is_string($recordAssertions)) { - $recordAssertions = ['message' => $recordAssertions]; - } - - return $this->hasRecordThatPasses(function (LogRecord $rec) use ($recordAssertions) { - if ($rec->message !== $recordAssertions['message']) { - return false; - } - if (isset($recordAssertions['context']) && $rec->context !== $recordAssertions['context']) { - return false; - } - - return true; - }, $level); - } - - public function hasRecordThatContains(string $message, Level $level): bool - { - return $this->hasRecordThatPasses(fn (LogRecord $rec) => str_contains($rec->message, $message), $level); - } - - public function hasRecordThatMatches(string $regex, Level $level): bool - { - return $this->hasRecordThatPasses(fn (LogRecord $rec) => preg_match($regex, $rec->message) > 0, $level); - } - - /** - * @phpstan-param callable(LogRecord, int): mixed $predicate - */ - public function hasRecordThatPasses(callable $predicate, Level $level): bool - { - $level = Logger::toMonologLevel($level); - - if (!isset($this->recordsByLevel[$level->value])) { - return false; - } - - foreach ($this->recordsByLevel[$level->value] as $i => $rec) { - if ((bool) $predicate($rec, $i)) { - return true; - } - } - - return false; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->recordsByLevel[$record->level->value][] = $record; - $this->records[] = $record; - } - - /** - * @param mixed[] $args - */ - public function __call(string $method, array $args): bool - { - if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { - $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; - $level = constant(Level::class.'::' . $matches[2]); - $callback = [$this, $genericMethod]; - if (is_callable($callback)) { - $args[] = $level; - - return call_user_func_array($callback, $args); - } - } - - throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php deleted file mode 100644 index 9c12c3d56..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -trait WebRequestRecognizerTrait -{ - /** - * Checks if PHP's serving a web request - */ - protected function isWebRequest(): bool - { - return 'cli' !== \PHP_SAPI && 'phpdbg' !== \PHP_SAPI; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php deleted file mode 100644 index 932fa70e7..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\LogRecord; -use Throwable; - -/** - * Forwards records to multiple handlers suppressing failures of each handler - * and continuing through to give every handler a chance to succeed. - * - * @author Craig D'Amelio - */ -class WhatFailureGroupHandler extends GroupHandler -{ - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - foreach ($this->handlers as $handler) { - try { - $handler->handle(clone $record); - } catch (Throwable) { - // What failure? - } - } - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - if (\count($this->processors) > 0) { - $processed = []; - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - $records = $processed; - } - - foreach ($this->handlers as $handler) { - try { - $handler->handleBatch(array_map(fn ($record) => clone $record, $records)); - } catch (Throwable) { - // What failure? - } - } - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - foreach ($this->handlers as $handler) { - try { - $handler->close(); - } catch (\Throwable $e) { - // What failure? - } - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php deleted file mode 100644 index 1e71194bc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Handler sending logs to Zend Monitor - * - * @author Christian Bergau - * @author Jason Davis - */ -class ZendMonitorHandler extends AbstractProcessingHandler -{ - /** - * @throws MissingExtensionException - */ - public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true) - { - if (!function_exists('zend_monitor_custom_event')) { - throw new MissingExtensionException( - 'You must have Zend Server installed with Zend Monitor enabled in order to use this handler' - ); - } - - parent::__construct($level, $bubble); - } - - /** - * Translates Monolog log levels to ZendMonitor levels. - */ - protected function toZendMonitorLevel(Level $level): int - { - return match ($level) { - Level::Debug => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Level::Info => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Level::Notice => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Level::Warning => \ZEND_MONITOR_EVENT_SEVERITY_WARNING, - Level::Error => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Level::Critical => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Level::Alert => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Level::Emergency => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - }; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->writeZendMonitorCustomEvent( - $record->level->getName(), - $record->message, - $record->formatted, - $this->toZendMonitorLevel($record->level) - ); - } - - /** - * Write to Zend Monitor Events - * @param string $type Text displayed in "Class Name (custom)" field - * @param string $message Text displayed in "Error String" - * @param array $formatted Displayed in Custom Variables tab - * @param int $severity Set the event severity level (-1,0,1) - */ - protected function writeZendMonitorCustomEvent(string $type, string $message, array $formatted, int $severity): void - { - zend_monitor_custom_event($type, $message, $formatted, $severity); - } - - /** - * @inheritDoc - */ - public function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/LogRecord.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/LogRecord.php deleted file mode 100644 index df758c58b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/LogRecord.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use ArrayAccess; - -/** - * Monolog log record - * - * @author Jordi Boggiano - * @template-implements ArrayAccess<'message'|'level'|'context'|'level_name'|'channel'|'datetime'|'extra', int|string|\DateTimeImmutable|array> - */ -class LogRecord implements ArrayAccess -{ - private const MODIFIABLE_FIELDS = [ - 'extra' => true, - 'formatted' => true, - ]; - - public function __construct( - public readonly \DateTimeImmutable $datetime, - public readonly string $channel, - public readonly Level $level, - public readonly string $message, - /** @var array */ - public readonly array $context = [], - /** @var array */ - public array $extra = [], - public mixed $formatted = null, - ) { - } - - public function offsetSet(mixed $offset, mixed $value): void - { - if ($offset === 'extra') { - if (!is_array($value)) { - throw new \InvalidArgumentException('extra must be an array'); - } - - $this->extra = $value; - - return; - } - - if ($offset === 'formatted') { - $this->formatted = $value; - - return; - } - - throw new \LogicException('Unsupported operation: setting '.$offset); - } - - public function offsetExists(mixed $offset): bool - { - if ($offset === 'level_name') { - return true; - } - - return isset($this->{$offset}); - } - - public function offsetUnset(mixed $offset): void - { - throw new \LogicException('Unsupported operation'); - } - - public function &offsetGet(mixed $offset): mixed - { - if ($offset === 'level_name' || $offset === 'level') { - // avoid returning readonly props by ref as this is illegal - if ($offset === 'level_name') { - $copy = $this->level->getName(); - } else { - $copy = $this->level->value; - } - - return $copy; - } - - if (isset(self::MODIFIABLE_FIELDS[$offset])) { - return $this->{$offset}; - } - - // avoid returning readonly props by ref as this is illegal - $copy = $this->{$offset}; - - return $copy; - } - - /** - * @phpstan-return array{message: string, context: mixed[], level: value-of, level_name: value-of, channel: string, datetime: \DateTimeImmutable, extra: mixed[]} - */ - public function toArray(): array - { - return [ - 'message' => $this->message, - 'context' => $this->context, - 'level' => $this->level->value, - 'level_name' => $this->level->getName(), - 'channel' => $this->channel, - 'datetime' => $this->datetime, - 'extra' => $this->extra, - ]; - } - - public function with(mixed ...$args): self - { - foreach (['message', 'context', 'level', 'channel', 'datetime', 'extra'] as $prop) { - $args[$prop] ??= $this->{$prop}; - } - - return new self(...$args); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Logger.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Logger.php deleted file mode 100644 index b04194bf9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Logger.php +++ /dev/null @@ -1,749 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Closure; -use DateTimeZone; -use Fiber; -use Monolog\Handler\HandlerInterface; -use Monolog\Processor\ProcessorInterface; -use Psr\Log\LoggerInterface; -use Psr\Log\InvalidArgumentException; -use Psr\Log\LogLevel; -use Throwable; -use Stringable; -use WeakMap; - -/** - * Monolog log channel - * - * It contains a stack of Handlers and a stack of Processors, - * and uses them to store records that are added to it. - * - * @author Jordi Boggiano - * @final - */ -class Logger implements LoggerInterface, ResettableInterface -{ - /** - * Detailed debug information - * - * @deprecated Use \Monolog\Level::Debug - */ - public const DEBUG = 100; - - /** - * Interesting events - * - * Examples: User logs in, SQL logs. - * - * @deprecated Use \Monolog\Level::Info - */ - public const INFO = 200; - - /** - * Uncommon events - * - * @deprecated Use \Monolog\Level::Notice - */ - public const NOTICE = 250; - - /** - * Exceptional occurrences that are not errors - * - * Examples: Use of deprecated APIs, poor use of an API, - * undesirable things that are not necessarily wrong. - * - * @deprecated Use \Monolog\Level::Warning - */ - public const WARNING = 300; - - /** - * Runtime errors - * - * @deprecated Use \Monolog\Level::Error - */ - public const ERROR = 400; - - /** - * Critical conditions - * - * Example: Application component unavailable, unexpected exception. - * - * @deprecated Use \Monolog\Level::Critical - */ - public const CRITICAL = 500; - - /** - * Action must be taken immediately - * - * Example: Entire website down, database unavailable, etc. - * This should trigger the SMS alerts and wake you up. - * - * @deprecated Use \Monolog\Level::Alert - */ - public const ALERT = 550; - - /** - * Urgent alert. - * - * @deprecated Use \Monolog\Level::Emergency - */ - public const EMERGENCY = 600; - - /** - * Monolog API version - * - * This is only bumped when API breaks are done and should - * follow the major version of the library - */ - public const API = 3; - - /** - * Mapping between levels numbers defined in RFC 5424 and Monolog ones - * - * @phpstan-var array $rfc_5424_levels - */ - private const RFC_5424_LEVELS = [ - 7 => Level::Debug, - 6 => Level::Info, - 5 => Level::Notice, - 4 => Level::Warning, - 3 => Level::Error, - 2 => Level::Critical, - 1 => Level::Alert, - 0 => Level::Emergency, - ]; - - protected string $name; - - /** - * The handler stack - * - * @var list - */ - protected array $handlers; - - /** - * Processors that will process all log records - * - * To process records of a single handler instead, add the processor on that specific handler - * - * @var array<(callable(LogRecord): LogRecord)|ProcessorInterface> - */ - protected array $processors; - - protected bool $microsecondTimestamps = true; - - protected DateTimeZone $timezone; - - protected Closure|null $exceptionHandler = null; - - /** - * Keeps track of depth to prevent infinite logging loops - */ - private int $logDepth = 0; - - /** - * @var WeakMap, int> Keeps track of depth inside fibers to prevent infinite logging loops - */ - private WeakMap $fiberLogDepth; - - /** - * Whether to detect infinite logging loops - * This can be disabled via {@see useLoggingLoopDetection} if you have async handlers that do not play well with this - */ - private bool $detectCycles = true; - - /** - * @param string $name The logging channel, a simple descriptive name that is attached to all log records - * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. - * @param callable[] $processors Optional array of processors - * @param DateTimeZone|null $timezone Optional timezone, if not provided date_default_timezone_get() will be used - * - * @phpstan-param array<(callable(LogRecord): LogRecord)|ProcessorInterface> $processors - */ - public function __construct(string $name, array $handlers = [], array $processors = [], DateTimeZone|null $timezone = null) - { - $this->name = $name; - $this->setHandlers($handlers); - $this->processors = $processors; - $this->timezone = $timezone ?? new DateTimeZone(date_default_timezone_get()); - $this->fiberLogDepth = new \WeakMap(); - } - - public function getName(): string - { - return $this->name; - } - - /** - * Return a new cloned instance with the name changed - * - * @return static - */ - public function withName(string $name): self - { - $new = clone $this; - $new->name = $name; - - return $new; - } - - /** - * Pushes a handler on to the stack. - * - * @return $this - */ - public function pushHandler(HandlerInterface $handler): self - { - array_unshift($this->handlers, $handler); - - return $this; - } - - /** - * Pops a handler from the stack - * - * @throws \LogicException If empty handler stack - */ - public function popHandler(): HandlerInterface - { - if (0 === \count($this->handlers)) { - throw new \LogicException('You tried to pop from an empty handler stack.'); - } - - return array_shift($this->handlers); - } - - /** - * Set handlers, replacing all existing ones. - * - * If a map is passed, keys will be ignored. - * - * @param list $handlers - * @return $this - */ - public function setHandlers(array $handlers): self - { - $this->handlers = []; - foreach (array_reverse($handlers) as $handler) { - $this->pushHandler($handler); - } - - return $this; - } - - /** - * @return list - */ - public function getHandlers(): array - { - return $this->handlers; - } - - /** - * Adds a processor on to the stack. - * - * @phpstan-param ProcessorInterface|(callable(LogRecord): LogRecord) $callback - * @return $this - */ - public function pushProcessor(ProcessorInterface|callable $callback): self - { - array_unshift($this->processors, $callback); - - return $this; - } - - /** - * Removes the processor on top of the stack and returns it. - * - * @phpstan-return ProcessorInterface|(callable(LogRecord): LogRecord) - * @throws \LogicException If empty processor stack - */ - public function popProcessor(): callable - { - if (0 === \count($this->processors)) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - /** - * @return callable[] - * @phpstan-return array - */ - public function getProcessors(): array - { - return $this->processors; - } - - /** - * Control the use of microsecond resolution timestamps in the 'datetime' - * member of new records. - * - * As of PHP7.1 microseconds are always included by the engine, so - * there is no performance penalty and Monolog 2 enabled microseconds - * by default. This function lets you disable them though in case you want - * to suppress microseconds from the output. - * - * @param bool $micro True to use microtime() to create timestamps - * @return $this - */ - public function useMicrosecondTimestamps(bool $micro): self - { - $this->microsecondTimestamps = $micro; - - return $this; - } - - /** - * @return $this - */ - public function useLoggingLoopDetection(bool $detectCycles): self - { - $this->detectCycles = $detectCycles; - - return $this; - } - - /** - * Adds a log record. - * - * @param int $level The logging level (a Monolog or RFC 5424 level) - * @param string $message The log message - * @param mixed[] $context The log context - * @param DateTimeImmutable $datetime Optional log date to log into the past or future - * @return bool Whether the record has been processed - * - * @phpstan-param value-of|Level $level - */ - public function addRecord(int|Level $level, string $message, array $context = [], DateTimeImmutable $datetime = null): bool - { - if (is_int($level) && isset(self::RFC_5424_LEVELS[$level])) { - $level = self::RFC_5424_LEVELS[$level]; - } - - if ($this->detectCycles) { - if (null !== ($fiber = Fiber::getCurrent())) { - $logDepth = $this->fiberLogDepth[$fiber] = ($this->fiberLogDepth[$fiber] ?? 0) + 1; - } else { - $logDepth = ++$this->logDepth; - } - } else { - $logDepth = 0; - } - - if ($logDepth === 3) { - $this->warning('A possible infinite logging loop was detected and aborted. It appears some of your handler code is triggering logging, see the previous log record for a hint as to what may be the cause.'); - return false; - } elseif ($logDepth >= 5) { // log depth 4 is let through, so we can log the warning above - return false; - } - - try { - $recordInitialized = count($this->processors) === 0; - - $record = new LogRecord( - datetime: $datetime ?? new DateTimeImmutable($this->microsecondTimestamps, $this->timezone), - channel: $this->name, - level: self::toMonologLevel($level), - message: $message, - context: $context, - extra: [], - ); - $handled = false; - - foreach ($this->handlers as $handler) { - if (false === $recordInitialized) { - // skip initializing the record as long as no handler is going to handle it - if (!$handler->isHandling($record)) { - continue; - } - - try { - foreach ($this->processors as $processor) { - $record = $processor($record); - } - $recordInitialized = true; - } catch (Throwable $e) { - $this->handleException($e, $record); - - return true; - } - } - - // once the record is initialized, send it to all handlers as long as the bubbling chain is not interrupted - try { - $handled = true; - if (true === $handler->handle(clone $record)) { - break; - } - } catch (Throwable $e) { - $this->handleException($e, $record); - - return true; - } - } - - return $handled; - } finally { - if ($this->detectCycles) { - if (isset($fiber)) { - $this->fiberLogDepth[$fiber]--; - } else { - $this->logDepth--; - } - } - } - } - - /** - * Ends a log cycle and frees all resources used by handlers. - * - * Closing a Handler means flushing all buffers and freeing any open resources/handles. - * Handlers that have been closed should be able to accept log records again and re-open - * themselves on demand, but this may not always be possible depending on implementation. - * - * This is useful at the end of a request and will be called automatically on every handler - * when they get destructed. - */ - public function close(): void - { - foreach ($this->handlers as $handler) { - $handler->close(); - } - } - - /** - * Ends a log cycle and resets all handlers and processors to their initial state. - * - * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal - * state, and getting it back to a state in which it can receive log records again. - * - * This is useful in case you want to avoid logs leaking between two requests or jobs when you - * have a long running process like a worker or an application server serving multiple requests - * in one process. - */ - public function reset(): void - { - foreach ($this->handlers as $handler) { - if ($handler instanceof ResettableInterface) { - $handler->reset(); - } - } - - foreach ($this->processors as $processor) { - if ($processor instanceof ResettableInterface) { - $processor->reset(); - } - } - } - - /** - * Gets the name of the logging level as a string. - * - * This still returns a string instead of a Level for BC, but new code should not rely on this method. - * - * @throws \Psr\Log\InvalidArgumentException If level is not defined - * - * @phpstan-param value-of|Level $level - * @phpstan-return value-of - * - * @deprecated Since 3.0, use {@see toMonologLevel} or {@see \Monolog\Level->getName()} instead - */ - public static function getLevelName(int|Level $level): string - { - return self::toMonologLevel($level)->getName(); - } - - /** - * Converts PSR-3 levels to Monolog ones if necessary - * - * @param int|string|Level|LogLevel::* $level Level number (monolog) or name (PSR-3) - * @throws \Psr\Log\InvalidArgumentException If level is not defined - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public static function toMonologLevel(string|int|Level $level): Level - { - if ($level instanceof Level) { - return $level; - } - - if (\is_string($level)) { - if (\is_numeric($level)) { - $levelEnum = Level::tryFrom((int) $level); - if ($levelEnum === null) { - throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', Level::NAMES + Level::VALUES)); - } - - return $levelEnum; - } - - // Contains first char of all log levels and avoids using strtoupper() which may have - // strange results depending on locale (for example, "i" will become "İ" in Turkish locale) - $upper = strtr(substr($level, 0, 1), 'dinweca', 'DINWECA') . strtolower(substr($level, 1)); - if (defined(Level::class.'::'.$upper)) { - return constant(Level::class . '::' . $upper); - } - - throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', Level::NAMES + Level::VALUES)); - } - - $levelEnum = Level::tryFrom($level); - if ($levelEnum === null) { - throw new InvalidArgumentException('Level "'.var_export($level, true).'" is not defined, use one of: '.implode(', ', Level::NAMES + Level::VALUES)); - } - - return $levelEnum; - } - - /** - * Checks whether the Logger has a handler that listens on the given level - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function isHandling(int|string|Level $level): bool - { - $record = new LogRecord( - datetime: new DateTimeImmutable($this->microsecondTimestamps, $this->timezone), - channel: $this->name, - message: '', - level: self::toMonologLevel($level), - ); - - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * Set a custom exception handler that will be called if adding a new record fails - * - * The Closure will receive an exception object and the record that failed to be logged - * - * @return $this - */ - public function setExceptionHandler(Closure|null $callback): self - { - $this->exceptionHandler = $callback; - - return $this; - } - - public function getExceptionHandler(): Closure|null - { - return $this->exceptionHandler; - } - - /** - * Adds a log record at an arbitrary level. - * - * This method allows for compatibility with common interfaces. - * - * @param mixed $level The log level (a Monolog, PSR-3 or RFC 5424 level) - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - * - * @phpstan-param Level|LogLevel::* $level - */ - public function log($level, string|\Stringable $message, array $context = []): void - { - if (!$level instanceof Level) { - if (!is_string($level) && !is_int($level)) { - throw new \InvalidArgumentException('$level is expected to be a string, int or '.Level::class.' instance'); - } - - if (isset(self::RFC_5424_LEVELS[$level])) { - $level = self::RFC_5424_LEVELS[$level]; - } - - $level = static::toMonologLevel($level); - } - - $this->addRecord($level, (string) $message, $context); - } - - /** - * Adds a log record at the DEBUG level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function debug(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Debug, (string) $message, $context); - } - - /** - * Adds a log record at the INFO level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function info(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Info, (string) $message, $context); - } - - /** - * Adds a log record at the NOTICE level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function notice(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Notice, (string) $message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function warning(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Warning, (string) $message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function error(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Error, (string) $message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function critical(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Critical, (string) $message, $context); - } - - /** - * Adds a log record at the ALERT level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function alert(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Alert, (string) $message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function emergency(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Emergency, (string) $message, $context); - } - - /** - * Sets the timezone to be used for the timestamp of log records. - * - * @return $this - */ - public function setTimezone(DateTimeZone $tz): self - { - $this->timezone = $tz; - - return $this; - } - - /** - * Returns the timezone to be used for the timestamp of log records. - */ - public function getTimezone(): DateTimeZone - { - return $this->timezone; - } - - /** - * Delegates exception management to the custom exception handler, - * or throws the exception if no custom handler is set. - */ - protected function handleException(Throwable $e, LogRecord $record): void - { - if (null === $this->exceptionHandler) { - throw $e; - } - - ($this->exceptionHandler)($e, $record); - } - - /** - * @return array - */ - public function __serialize(): array - { - return [ - 'name' => $this->name, - 'handlers' => $this->handlers, - 'processors' => $this->processors, - 'microsecondTimestamps' => $this->microsecondTimestamps, - 'timezone' => $this->timezone, - 'exceptionHandler' => $this->exceptionHandler, - 'logDepth' => $this->logDepth, - 'detectCycles' => $this->detectCycles, - ]; - } - - /** - * @param array $data - */ - public function __unserialize(array $data): void - { - foreach (['name', 'handlers', 'processors', 'microsecondTimestamps', 'timezone', 'exceptionHandler', 'logDepth', 'detectCycles'] as $property) { - if (isset($data[$property])) { - $this->$property = $data[$property]; - } - } - - $this->fiberLogDepth = new \WeakMap(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php deleted file mode 100644 index 5a70ac2e2..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Injects Git branch and Git commit SHA in all records - * - * @author Nick Otter - * @author Jordi Boggiano - */ -class GitProcessor implements ProcessorInterface -{ - private Level $level; - /** @var array{branch: string, commit: string}|array|null */ - private static $cache = null; - - /** - * @param int|string|Level|LogLevel::* $level The minimum logging level at which this Processor will be triggered - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function __construct(int|string|Level $level = Level::Debug) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - // return if the level is not high enough - if ($record->level->isLowerThan($this->level)) { - return $record; - } - - $record->extra['git'] = self::getGitInfo(); - - return $record; - } - - /** - * @return array{branch: string, commit: string}|array - */ - private static function getGitInfo(): array - { - if (self::$cache !== null) { - return self::$cache; - } - - $branches = shell_exec('git branch -v --no-abbrev'); - if (is_string($branches) && 1 === preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { - return self::$cache = [ - 'branch' => $matches[1], - 'commit' => $matches[2], - ]; - } - - return self::$cache = []; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php deleted file mode 100644 index cba6e0963..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Injects value of gethostname in all records - */ -class HostnameProcessor implements ProcessorInterface -{ - private static string $host; - - public function __construct() - { - self::$host = (string) gethostname(); - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $record->extra['hostname'] = self::$host; - - return $record; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php deleted file mode 100644 index 3a6fbfbef..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Injects line/file:class/function where the log message came from - * - * Warning: This only works if the handler processes the logs directly. - * If you put the processor on a handler that is behind a FingersCrossedHandler - * for example, the processor will only be called once the trigger level is reached, - * and all the log records will have the same file/line/.. data from the call that - * triggered the FingersCrossedHandler. - * - * @author Jordi Boggiano - */ -class IntrospectionProcessor implements ProcessorInterface -{ - private Level $level; - - /** @var string[] */ - private array $skipClassesPartials; - - private int $skipStackFramesCount; - - private const SKIP_FUNCTIONS = [ - 'call_user_func', - 'call_user_func_array', - ]; - - /** - * @param string|int|Level $level The minimum logging level at which this Processor will be triggered - * @param string[] $skipClassesPartials - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function __construct(int|string|Level $level = Level::Debug, array $skipClassesPartials = [], int $skipStackFramesCount = 0) - { - $this->level = Logger::toMonologLevel($level); - $this->skipClassesPartials = array_merge(['Monolog\\'], $skipClassesPartials); - $this->skipStackFramesCount = $skipStackFramesCount; - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - // return if the level is not high enough - if ($record->level->isLowerThan($this->level)) { - return $record; - } - - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - - // skip first since it's always the current method - array_shift($trace); - // the call_user_func call is also skipped - array_shift($trace); - - $i = 0; - - while ($this->isTraceClassOrSkippedFunction($trace, $i)) { - if (isset($trace[$i]['class'])) { - foreach ($this->skipClassesPartials as $part) { - if (strpos($trace[$i]['class'], $part) !== false) { - $i++; - - continue 2; - } - } - } elseif (in_array($trace[$i]['function'], self::SKIP_FUNCTIONS, true)) { - $i++; - - continue; - } - - break; - } - - $i += $this->skipStackFramesCount; - - // we should have the call source now - $record->extra = array_merge( - $record->extra, - [ - 'file' => $trace[$i - 1]['file'] ?? null, - 'line' => $trace[$i - 1]['line'] ?? null, - 'class' => $trace[$i]['class'] ?? null, - 'callType' => $trace[$i]['type'] ?? null, - 'function' => $trace[$i]['function'] ?? null, - ] - ); - - return $record; - } - - /** - * @param array $trace - */ - private function isTraceClassOrSkippedFunction(array $trace, int $index): bool - { - if (!isset($trace[$index])) { - return false; - } - - return isset($trace[$index]['class']) || in_array($trace[$index]['function'], self::SKIP_FUNCTIONS, true); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php deleted file mode 100644 index adc32c65d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Injects memory_get_peak_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryPeakUsageProcessor extends MemoryProcessor -{ - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $usage = memory_get_peak_usage($this->realUsage); - - if ($this->useFormatting) { - $usage = $this->formatBytes($usage); - } - - $record->extra['memory_peak_usage'] = $usage; - - return $record; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php deleted file mode 100644 index f808e51b4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Some methods that are common for all memory processors - * - * @author Rob Jensen - */ -abstract class MemoryProcessor implements ProcessorInterface -{ - /** - * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported. - */ - protected bool $realUsage; - - /** - * @var bool If true, then format memory size to human readable string (MB, KB, B depending on size) - */ - protected bool $useFormatting; - - /** - * @param bool $realUsage Set this to true to get the real size of memory allocated from system. - * @param bool $useFormatting If true, then format memory size to human readable string (MB, KB, B depending on size) - */ - public function __construct(bool $realUsage = true, bool $useFormatting = true) - { - $this->realUsage = $realUsage; - $this->useFormatting = $useFormatting; - } - - /** - * Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is - * - * @return string|int Formatted string if $this->useFormatting is true, otherwise return $bytes as int - */ - protected function formatBytes(int $bytes) - { - if (!$this->useFormatting) { - return $bytes; - } - - if ($bytes > 1024 * 1024) { - return round($bytes / 1024 / 1024, 2).' MB'; - } elseif ($bytes > 1024) { - return round($bytes / 1024, 2).' KB'; - } - - return $bytes . ' B'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php deleted file mode 100644 index a814b1df3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Injects memory_get_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryUsageProcessor extends MemoryProcessor -{ - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $usage = memory_get_usage($this->realUsage); - - if ($this->useFormatting) { - $usage = $this->formatBytes($usage); - } - - $record->extra['memory_usage'] = $usage; - - return $record; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php deleted file mode 100644 index 47b1e64ff..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Injects Hg branch and Hg revision number in all records - * - * @author Jonathan A. Schweder - */ -class MercurialProcessor implements ProcessorInterface -{ - private Level $level; - /** @var array{branch: string, revision: string}|array|null */ - private static $cache = null; - - /** - * @param int|string|Level $level The minimum logging level at which this Processor will be triggered - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function __construct(int|string|Level $level = Level::Debug) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - // return if the level is not high enough - if ($record->level->isLowerThan($this->level)) { - return $record; - } - - $record->extra['hg'] = self::getMercurialInfo(); - - return $record; - } - - /** - * @return array{branch: string, revision: string}|array - */ - private static function getMercurialInfo(): array - { - if (self::$cache !== null) { - return self::$cache; - } - - $result = explode(' ', trim((string) shell_exec('hg id -nb'))); - - if (count($result) >= 3) { - return self::$cache = [ - 'branch' => $result[1], - 'revision' => $result[2], - ]; - } - - return self::$cache = []; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php deleted file mode 100644 index bb9a52243..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Adds value of getmypid into records - * - * @author Andreas Hörnicke - */ -class ProcessIdProcessor implements ProcessorInterface -{ - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $record->extra['process_id'] = getmypid(); - - return $record; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php deleted file mode 100644 index ebe41fc20..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * An optional interface to allow labelling Monolog processors. - * - * @author Nicolas Grekas - */ -interface ProcessorInterface -{ - /** - * @return LogRecord The processed record - */ - public function __invoke(LogRecord $record); -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php deleted file mode 100644 index aad2aad2f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Processes a record's message according to PSR-3 rules - * - * It replaces {foo} with the value from $context['foo'] - * - * @author Jordi Boggiano - */ -class PsrLogMessageProcessor implements ProcessorInterface -{ - public const SIMPLE_DATE = "Y-m-d\TH:i:s.uP"; - - private ?string $dateFormat; - - private bool $removeUsedContextFields; - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @param bool $removeUsedContextFields If set to true the fields interpolated into message gets unset - */ - public function __construct(?string $dateFormat = null, bool $removeUsedContextFields = false) - { - $this->dateFormat = $dateFormat; - $this->removeUsedContextFields = $removeUsedContextFields; - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - if (false === strpos($record->message, '{')) { - return $record; - } - - $replacements = []; - $context = $record->context; - - foreach ($context as $key => $val) { - $placeholder = '{' . $key . '}'; - if (strpos($record->message, $placeholder) === false) { - continue; - } - - if (null === $val || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) { - $replacements[$placeholder] = $val; - } elseif ($val instanceof \DateTimeInterface) { - if (null === $this->dateFormat && $val instanceof \Monolog\DateTimeImmutable) { - // handle monolog dates using __toString if no specific dateFormat was asked for - // so that it follows the useMicroseconds flag - $replacements[$placeholder] = (string) $val; - } else { - $replacements[$placeholder] = $val->format($this->dateFormat ?? static::SIMPLE_DATE); - } - } elseif ($val instanceof \UnitEnum) { - $replacements[$placeholder] = $val instanceof \BackedEnum ? $val->value : $val->name; - } elseif (is_object($val)) { - $replacements[$placeholder] = '[object '.Utils::getClass($val).']'; - } elseif (is_array($val)) { - $replacements[$placeholder] = 'array'.Utils::jsonEncode($val, null, true); - } else { - $replacements[$placeholder] = '['.gettype($val).']'; - } - - if ($this->removeUsedContextFields) { - unset($context[$key]); - } - } - - return $record->with(message: strtr($record->message, $replacements), context: $context); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php deleted file mode 100644 index 10ed1cea3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Adds a tags array into record - * - * @author Martijn Riemers - */ -class TagProcessor implements ProcessorInterface -{ - /** @var string[] */ - private array $tags; - - /** - * @param string[] $tags - */ - public function __construct(array $tags = []) - { - $this->setTags($tags); - } - - /** - * @param string[] $tags - * @return $this - */ - public function addTags(array $tags = []): self - { - $this->tags = array_merge($this->tags, $tags); - - return $this; - } - - /** - * @param string[] $tags - * @return $this - */ - public function setTags(array $tags = []): self - { - $this->tags = $tags; - - return $this; - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $record->extra['tags'] = $this->tags; - - return $record; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php deleted file mode 100644 index 3a0c128c2..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\ResettableInterface; -use Monolog\LogRecord; - -/** - * Adds a unique identifier into records - * - * @author Simon Mönch - */ -class UidProcessor implements ProcessorInterface, ResettableInterface -{ - /** @var non-empty-string */ - private string $uid; - - /** - * @param int<1, 32> $length - */ - public function __construct(int $length = 7) - { - if ($length > 32 || $length < 1) { - throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); - } - - $this->uid = $this->generateUid($length); - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $record->extra['uid'] = $this->uid; - - return $record; - } - - public function getUid(): string - { - return $this->uid; - } - - public function reset(): void - { - $this->uid = $this->generateUid(strlen($this->uid)); - } - - /** - * @param positive-int $length - * @return non-empty-string - */ - private function generateUid(int $length): string - { - return substr(bin2hex(random_bytes((int) ceil($length / 2))), 0, $length); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php deleted file mode 100644 index 1abb8400c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use ArrayAccess; -use Monolog\LogRecord; - -/** - * Injects url/method and remote IP of the current web request in all records - * - * @author Jordi Boggiano - */ -class WebProcessor implements ProcessorInterface -{ - /** - * @var array|ArrayAccess - */ - protected array|ArrayAccess $serverData; - - /** - * Default fields - * - * Array is structured as [key in record.extra => key in $serverData] - * - * @var array - */ - protected array $extraFields = [ - 'url' => 'REQUEST_URI', - 'ip' => 'REMOTE_ADDR', - 'http_method' => 'REQUEST_METHOD', - 'server' => 'SERVER_NAME', - 'referrer' => 'HTTP_REFERER', - 'user_agent' => 'HTTP_USER_AGENT', - ]; - - /** - * @param array|ArrayAccess|null $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data - * @param array|array|null $extraFields Field names and the related key inside $serverData to be added (or just a list of field names to use the default configured $serverData mapping). If not provided it defaults to: [url, ip, http_method, server, referrer] + unique_id if present in server data - */ - public function __construct(array|ArrayAccess|null $serverData = null, array|null $extraFields = null) - { - if (null === $serverData) { - $this->serverData = &$_SERVER; - } else { - $this->serverData = $serverData; - } - - $defaultEnabled = ['url', 'ip', 'http_method', 'server', 'referrer']; - if (isset($this->serverData['UNIQUE_ID'])) { - $this->extraFields['unique_id'] = 'UNIQUE_ID'; - $defaultEnabled[] = 'unique_id'; - } - - if (null === $extraFields) { - $extraFields = $defaultEnabled; - } - if (isset($extraFields[0])) { - foreach (array_keys($this->extraFields) as $fieldName) { - if (!in_array($fieldName, $extraFields, true)) { - unset($this->extraFields[$fieldName]); - } - } - } else { - $this->extraFields = $extraFields; - } - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - // skip processing if for some reason request data - // is not present (CLI or wonky SAPIs) - if (!isset($this->serverData['REQUEST_URI'])) { - return $record; - } - - $record->extra = $this->appendExtraFields($record->extra); - - return $record; - } - - /** - * @return $this - */ - public function addExtraField(string $extraName, string $serverName): self - { - $this->extraFields[$extraName] = $serverName; - - return $this; - } - - /** - * @param mixed[] $extra - * @return mixed[] - */ - private function appendExtraFields(array $extra): array - { - foreach ($this->extraFields as $extraName => $serverName) { - $extra[$extraName] = $this->serverData[$serverName] ?? null; - } - - return $extra; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Registry.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Registry.php deleted file mode 100644 index 2ef2edceb..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Registry.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use InvalidArgumentException; - -/** - * Monolog log registry - * - * Allows to get `Logger` instances in the global scope - * via static method calls on this class. - * - * - * $application = new Monolog\Logger('application'); - * $api = new Monolog\Logger('api'); - * - * Monolog\Registry::addLogger($application); - * Monolog\Registry::addLogger($api); - * - * function testLogger() - * { - * Monolog\Registry::api()->error('Sent to $api Logger instance'); - * Monolog\Registry::application()->error('Sent to $application Logger instance'); - * } - * - * - * @author Tomas Tatarko - */ -class Registry -{ - /** - * List of all loggers in the registry (by named indexes) - * - * @var Logger[] - */ - private static array $loggers = []; - - /** - * Adds new logging channel to the registry - * - * @param Logger $logger Instance of the logging channel - * @param string|null $name Name of the logging channel ($logger->getName() by default) - * @param bool $overwrite Overwrite instance in the registry if the given name already exists? - * @throws \InvalidArgumentException If $overwrite set to false and named Logger instance already exists - */ - public static function addLogger(Logger $logger, ?string $name = null, bool $overwrite = false): void - { - $name = $name ?? $logger->getName(); - - if (isset(self::$loggers[$name]) && !$overwrite) { - throw new InvalidArgumentException('Logger with the given name already exists'); - } - - self::$loggers[$name] = $logger; - } - - /** - * Checks if such logging channel exists by name or instance - * - * @param string|Logger $logger Name or logger instance - */ - public static function hasLogger($logger): bool - { - if ($logger instanceof Logger) { - $index = array_search($logger, self::$loggers, true); - - return false !== $index; - } - - return isset(self::$loggers[$logger]); - } - - /** - * Removes instance from registry by name or instance - * - * @param string|Logger $logger Name or logger instance - */ - public static function removeLogger($logger): void - { - if ($logger instanceof Logger) { - if (false !== ($idx = array_search($logger, self::$loggers, true))) { - unset(self::$loggers[$idx]); - } - } else { - unset(self::$loggers[$logger]); - } - } - - /** - * Clears the registry - */ - public static function clear(): void - { - self::$loggers = []; - } - - /** - * Gets Logger instance from the registry - * - * @param string $name Name of the requested Logger instance - * @throws \InvalidArgumentException If named Logger instance is not in the registry - */ - public static function getInstance(string $name): Logger - { - if (!isset(self::$loggers[$name])) { - throw new InvalidArgumentException(sprintf('Requested "%s" logger instance is not in the registry', $name)); - } - - return self::$loggers[$name]; - } - - /** - * Gets Logger instance from the registry via static method call - * - * @param string $name Name of the requested Logger instance - * @param mixed[] $arguments Arguments passed to static method call - * @throws \InvalidArgumentException If named Logger instance is not in the registry - * @return Logger Requested instance of Logger - */ - public static function __callStatic(string $name, array $arguments): Logger - { - return self::getInstance($name); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/ResettableInterface.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/ResettableInterface.php deleted file mode 100644 index 4983a6b35..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/ResettableInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -/** - * Handler or Processor implementing this interface will be reset when Logger::reset() is called. - * - * Resetting ends a log cycle gets them back to their initial state. - * - * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal - * state, and getting it back to a state in which it can receive log records again. - * - * This is useful in case you want to avoid logs leaking between two requests or jobs when you - * have a long running process like a worker or an application server serving multiple requests - * in one process. - * - * @author Grégoire Pineau - */ -interface ResettableInterface -{ - public function reset(): void; -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/SignalHandler.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/SignalHandler.php deleted file mode 100644 index b930ca439..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/SignalHandler.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; -use ReflectionExtension; - -/** - * Monolog POSIX signal handler - * - * @author Robert Gust-Bardon - */ -class SignalHandler -{ - private LoggerInterface $logger; - - /** @var array SIG_DFL, SIG_IGN or previous callable */ - private array $previousSignalHandler = []; - /** @var array */ - private array $signalLevelMap = []; - /** @var array */ - private array $signalRestartSyscalls = []; - - public function __construct(LoggerInterface $logger) - { - $this->logger = $logger; - } - - /** - * @param int|string|Level $level Level or level name - * @return $this - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function registerSignalHandler(int $signo, int|string|Level $level = LogLevel::CRITICAL, bool $callPrevious = true, bool $restartSyscalls = true, ?bool $async = true): self - { - if (!extension_loaded('pcntl') || !function_exists('pcntl_signal')) { - return $this; - } - - $level = Logger::toMonologLevel($level)->toPsrLogLevel(); - - if ($callPrevious) { - $handler = pcntl_signal_get_handler($signo); - $this->previousSignalHandler[$signo] = $handler; - } else { - unset($this->previousSignalHandler[$signo]); - } - $this->signalLevelMap[$signo] = $level; - $this->signalRestartSyscalls[$signo] = $restartSyscalls; - - if ($async !== null) { - pcntl_async_signals($async); - } - - pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); - - return $this; - } - - /** - * @param mixed $siginfo - */ - public function handleSignal(int $signo, $siginfo = null): void - { - /** @var array $signals */ - static $signals = []; - - if (\count($signals) === 0 && extension_loaded('pcntl')) { - $pcntl = new ReflectionExtension('pcntl'); - foreach ($pcntl->getConstants() as $name => $value) { - if (substr($name, 0, 3) === 'SIG' && $name[3] !== '_' && is_int($value)) { - $signals[$value] = $name; - } - } - } - - $level = $this->signalLevelMap[$signo] ?? LogLevel::CRITICAL; - $signal = $signals[$signo] ?? $signo; - $context = $siginfo ?? []; - $this->logger->log($level, sprintf('Program received signal %s', $signal), $context); - - if (!isset($this->previousSignalHandler[$signo])) { - return; - } - - if ($this->previousSignalHandler[$signo] === SIG_DFL) { - if (extension_loaded('pcntl') && function_exists('pcntl_signal') && function_exists('pcntl_sigprocmask') && function_exists('pcntl_signal_dispatch') - && extension_loaded('posix') && function_exists('posix_getpid') && function_exists('posix_kill') - ) { - $restartSyscalls = $this->signalRestartSyscalls[$signo] ?? true; - pcntl_signal($signo, SIG_DFL, $restartSyscalls); - pcntl_sigprocmask(SIG_UNBLOCK, [$signo], $oldset); - posix_kill(posix_getpid(), $signo); - pcntl_signal_dispatch(); - pcntl_sigprocmask(SIG_SETMASK, $oldset); - pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); - } - } elseif (is_callable($this->previousSignalHandler[$signo])) { - $this->previousSignalHandler[$signo]($signo, $siginfo); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Test/TestCase.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Test/TestCase.php deleted file mode 100644 index 29ec7c96e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Test/TestCase.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Test; - -use Monolog\Level; -use Monolog\Logger; -use Monolog\LogRecord; -use Monolog\DateTimeImmutable; -use Monolog\Formatter\FormatterInterface; -use Psr\Log\LogLevel; - -/** - * Lets you easily generate log records and a dummy formatter for testing purposes - * - * @author Jordi Boggiano - * - * @internal feel free to reuse this to test your own handlers, this is marked internal to avoid issues with PHPStorm https://github.com/Seldaek/monolog/issues/1677 - */ -class TestCase extends \PHPUnit\Framework\TestCase -{ - public function tearDown(): void - { - parent::tearDown(); - - if (isset($this->handler)) { - unset($this->handler); - } - } - - /** - * @param array $context - * @param array $extra - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - protected function getRecord(int|string|Level $level = Level::Warning, string|\Stringable $message = 'test', array $context = [], string $channel = 'test', \DateTimeImmutable $datetime = new DateTimeImmutable(true), array $extra = []): LogRecord - { - return new LogRecord( - message: (string) $message, - context: $context, - level: Logger::toMonologLevel($level), - channel: $channel, - datetime: $datetime, - extra: $extra, - ); - } - - /** - * @phpstan-return list - */ - protected function getMultipleRecords(): array - { - return [ - $this->getRecord(Level::Debug, 'debug message 1'), - $this->getRecord(Level::Debug, 'debug message 2'), - $this->getRecord(Level::Info, 'information'), - $this->getRecord(Level::Warning, 'warning'), - $this->getRecord(Level::Error, 'error'), - ]; - } - - protected function getIdentityFormatter(): FormatterInterface - { - $formatter = $this->createMock(FormatterInterface::class); - $formatter->expects(self::any()) - ->method('format') - ->willReturnCallback(function ($record) { - return $record->message; - }); - - return $formatter; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Utils.php b/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Utils.php deleted file mode 100644 index 7848f0ecd..000000000 --- a/fixtures/symfony_5_local_deps/vendor/monolog/monolog/src/Monolog/Utils.php +++ /dev/null @@ -1,274 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -final class Utils -{ - const DEFAULT_JSON_FLAGS = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION | JSON_INVALID_UTF8_SUBSTITUTE | JSON_PARTIAL_OUTPUT_ON_ERROR; - - public static function getClass(object $object): string - { - $class = \get_class($object); - - if (false === ($pos = \strpos($class, "@anonymous\0"))) { - return $class; - } - - if (false === ($parent = \get_parent_class($class))) { - return \substr($class, 0, $pos + 10); - } - - return $parent . '@anonymous'; - } - - public static function substr(string $string, int $start, ?int $length = null): string - { - if (extension_loaded('mbstring')) { - return mb_strcut($string, $start, $length); - } - - return substr($string, $start, (null === $length) ? strlen($string) : $length); - } - - /** - * Makes sure if a relative path is passed in it is turned into an absolute path - * - * @param string $streamUrl stream URL or path without protocol - */ - public static function canonicalizePath(string $streamUrl): string - { - $prefix = ''; - if ('file://' === substr($streamUrl, 0, 7)) { - $streamUrl = substr($streamUrl, 7); - $prefix = 'file://'; - } - - // other type of stream, not supported - if (false !== strpos($streamUrl, '://')) { - return $streamUrl; - } - - // already absolute - if (substr($streamUrl, 0, 1) === '/' || substr($streamUrl, 1, 1) === ':' || substr($streamUrl, 0, 2) === '\\\\') { - return $prefix.$streamUrl; - } - - $streamUrl = getcwd() . '/' . $streamUrl; - - return $prefix.$streamUrl; - } - - /** - * Return the JSON representation of a value - * - * @param mixed $data - * @param int $encodeFlags flags to pass to json encode, defaults to DEFAULT_JSON_FLAGS - * @param bool $ignoreErrors whether to ignore encoding errors or to throw on error, when ignored and the encoding fails, "null" is returned which is valid json for null - * @throws \RuntimeException if encoding fails and errors are not ignored - * @return string when errors are ignored and the encoding fails, "null" is returned which is valid json for null - */ - public static function jsonEncode($data, ?int $encodeFlags = null, bool $ignoreErrors = false): string - { - if (null === $encodeFlags) { - $encodeFlags = self::DEFAULT_JSON_FLAGS; - } - - if ($ignoreErrors) { - $json = @json_encode($data, $encodeFlags); - if (false === $json) { - return 'null'; - } - - return $json; - } - - $json = json_encode($data, $encodeFlags); - if (false === $json) { - $json = self::handleJsonError(json_last_error(), $data); - } - - return $json; - } - - /** - * Handle a json_encode failure. - * - * If the failure is due to invalid string encoding, try to clean the - * input and encode again. If the second encoding attempt fails, the - * initial error is not encoding related or the input can't be cleaned then - * raise a descriptive exception. - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION - * @throws \RuntimeException if failure can't be corrected - * @return string JSON encoded data after error correction - */ - public static function handleJsonError(int $code, $data, ?int $encodeFlags = null): string - { - if ($code !== JSON_ERROR_UTF8) { - self::throwEncodeError($code, $data); - } - - if (is_string($data)) { - self::detectAndCleanUtf8($data); - } elseif (is_array($data)) { - array_walk_recursive($data, ['Monolog\Utils', 'detectAndCleanUtf8']); - } else { - self::throwEncodeError($code, $data); - } - - if (null === $encodeFlags) { - $encodeFlags = self::DEFAULT_JSON_FLAGS; - } - - $json = json_encode($data, $encodeFlags); - - if ($json === false) { - self::throwEncodeError(json_last_error(), $data); - } - - return $json; - } - - /** - * @internal - */ - public static function pcreLastErrorMessage(int $code): string - { - if (PHP_VERSION_ID >= 80000) { - return preg_last_error_msg(); - } - - $constants = (get_defined_constants(true))['pcre']; - $constants = array_filter($constants, function ($key) { - return substr($key, -6) == '_ERROR'; - }, ARRAY_FILTER_USE_KEY); - - $constants = array_flip($constants); - - return $constants[$code] ?? 'UNDEFINED_ERROR'; - } - - /** - * Throws an exception according to a given code with a customized message - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @throws \RuntimeException - */ - private static function throwEncodeError(int $code, $data): never - { - $msg = match ($code) { - JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', - JSON_ERROR_STATE_MISMATCH => 'Underflow or the modes mismatch', - JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', - JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded', - default => 'Unknown error', - }; - - throw new \RuntimeException('JSON encoding failed: '.$msg.'. Encoding: '.var_export($data, true)); - } - - /** - * Detect invalid UTF-8 string characters and convert to valid UTF-8. - * - * Valid UTF-8 input will be left unmodified, but strings containing - * invalid UTF-8 codepoints will be reencoded as UTF-8 with an assumed - * original encoding of ISO-8859-15. This conversion may result in - * incorrect output if the actual encoding was not ISO-8859-15, but it - * will be clean UTF-8 output and will not rely on expensive and fragile - * detection algorithms. - * - * Function converts the input in place in the passed variable so that it - * can be used as a callback for array_walk_recursive. - * - * @param mixed $data Input to check and convert if needed, passed by ref - */ - private static function detectAndCleanUtf8(&$data): void - { - if (is_string($data) && preg_match('//u', $data) !== 1) { - $data = preg_replace_callback( - '/[\x80-\xFF]+/', - function (array $m): string { - return function_exists('mb_convert_encoding') ? mb_convert_encoding($m[0], 'UTF-8', 'ISO-8859-1') : utf8_encode($m[0]); - }, - $data - ); - if (!is_string($data)) { - $pcreErrorCode = preg_last_error(); - - throw new \RuntimeException('Failed to preg_replace_callback: ' . $pcreErrorCode . ' / ' . self::pcreLastErrorMessage($pcreErrorCode)); - } - $data = str_replace( - ['¤', '¦', '¨', '´', '¸', '¼', '½', '¾'], - ['€', 'Š', 'š', 'Ž', 'ž', 'Œ', 'œ', 'Ÿ'], - $data - ); - } - } - - /** - * Converts a string with a valid 'memory_limit' format, to bytes. - * - * @param string|false $val - * @return int|false Returns an integer representing bytes. Returns FALSE in case of error. - */ - public static function expandIniShorthandBytes($val) - { - if (!is_string($val)) { - return false; - } - - // support -1 - if ((int) $val < 0) { - return (int) $val; - } - - if (preg_match('/^\s*(?\d+)(?:\.\d+)?\s*(?[gmk]?)\s*$/i', $val, $match) !== 1) { - return false; - } - - $val = (int) $match['val']; - switch (strtolower($match['unit'] ?? '')) { - case 'g': - $val *= 1024; - // no break - case 'm': - $val *= 1024; - // no break - case 'k': - $val *= 1024; - } - - return $val; - } - - public static function getRecordMessageForException(LogRecord $record): string - { - $context = ''; - $extra = ''; - - try { - if (\count($record->context) > 0) { - $context = "\nContext: " . json_encode($record->context, JSON_THROW_ON_ERROR); - } - if (\count($record->extra) > 0) { - $extra = "\nExtra: " . json_encode($record->extra, JSON_THROW_ON_ERROR); - } - } catch (\Throwable $e) { - // noop - } - - return "\nThe exception occurred while attempting to log: " . $record->message . $context . $extra; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/LICENSE b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/LICENSE deleted file mode 100644 index 2e5671835..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2011, Nikita Popov -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/README.md b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/README.md deleted file mode 100644 index 7555838e2..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/README.md +++ /dev/null @@ -1,233 +0,0 @@ -PHP Parser -========== - -[![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master) - -This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and -manipulation. - -[**Documentation for version 5.x**][doc_master] (current; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x). - -[Documentation for version 4.x][doc_4_x] (supported; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3). - -Features --------- - -The main features provided by this library are: - - * Parsing PHP 7, and PHP 8 code into an abstract syntax tree (AST). - * Invalid code can be parsed into a partial AST. - * The AST contains accurate location information. - * Dumping the AST in human-readable form. - * Converting an AST back to PHP code. - * Formatting can be preserved for partially changed ASTs. - * Infrastructure to traverse and modify ASTs. - * Resolution of namespaced names. - * Evaluation of constant expressions. - * Builders to simplify AST construction for code generation. - * Converting an AST into JSON and back. - -Quick Start ------------ - -Install the library using [composer](https://getcomposer.org): - - php composer.phar require nikic/php-parser - -Parse some PHP code into an AST and dump the result in human-readable form: - -```php -createForNewestSupportedVersion(); -try { - $ast = $parser->parse($code); -} catch (Error $error) { - echo "Parse error: {$error->getMessage()}\n"; - return; -} - -$dumper = new NodeDumper; -echo $dumper->dump($ast) . "\n"; -``` - -This dumps an AST looking something like this: - -``` -array( - 0: Stmt_Function( - attrGroups: array( - ) - byRef: false - name: Identifier( - name: test - ) - params: array( - 0: Param( - attrGroups: array( - ) - flags: 0 - type: null - byRef: false - variadic: false - var: Expr_Variable( - name: foo - ) - default: null - ) - ) - returnType: null - stmts: array( - 0: Stmt_Expression( - expr: Expr_FuncCall( - name: Name( - name: var_dump - ) - args: array( - 0: Arg( - name: null - value: Expr_Variable( - name: foo - ) - byRef: false - unpack: false - ) - ) - ) - ) - ) - ) -) -``` - -Let's traverse the AST and perform some kind of modification. For example, drop all function bodies: - -```php -use PhpParser\Node; -use PhpParser\Node\Stmt\Function_; -use PhpParser\NodeTraverser; -use PhpParser\NodeVisitorAbstract; - -$traverser = new NodeTraverser(); -$traverser->addVisitor(new class extends NodeVisitorAbstract { - public function enterNode(Node $node) { - if ($node instanceof Function_) { - // Clean out the function body - $node->stmts = []; - } - } -}); - -$ast = $traverser->traverse($ast); -echo $dumper->dump($ast) . "\n"; -``` - -This gives us an AST where the `Function_::$stmts` are empty: - -``` -array( - 0: Stmt_Function( - attrGroups: array( - ) - byRef: false - name: Identifier( - name: test - ) - params: array( - 0: Param( - attrGroups: array( - ) - type: null - byRef: false - variadic: false - var: Expr_Variable( - name: foo - ) - default: null - ) - ) - returnType: null - stmts: array( - ) - ) -) -``` - -Finally, we can convert the new AST back to PHP code: - -```php -use PhpParser\PrettyPrinter; - -$prettyPrinter = new PrettyPrinter\Standard; -echo $prettyPrinter->prettyPrintFile($ast); -``` - -This gives us our original code, minus the `var_dump()` call inside the function: - -```php -createForVersion($attributes['version']); -$dumper = new PhpParser\NodeDumper([ - 'dumpComments' => true, - 'dumpPositions' => $attributes['with-positions'], -]); -$prettyPrinter = new PhpParser\PrettyPrinter\Standard; - -$traverser = new PhpParser\NodeTraverser(); -$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver); - -foreach ($files as $file) { - if ($file === '-') { - $code = file_get_contents('php://stdin'); - fwrite(STDERR, "====> Stdin:\n"); - } else if (strpos($file, ' Code $code\n"); - } else { - if (!file_exists($file)) { - fwrite(STDERR, "File $file does not exist.\n"); - exit(1); - } - - $code = file_get_contents($file); - fwrite(STDERR, "====> File $file:\n"); - } - - if ($attributes['with-recovery']) { - $errorHandler = new PhpParser\ErrorHandler\Collecting; - $stmts = $parser->parse($code, $errorHandler); - foreach ($errorHandler->getErrors() as $error) { - $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - fwrite(STDERR, $message . "\n"); - } - if (null === $stmts) { - continue; - } - } else { - try { - $stmts = $parser->parse($code); - } catch (PhpParser\Error $error) { - $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - fwrite(STDERR, $message . "\n"); - exit(1); - } - } - - foreach ($operations as $operation) { - if ('dump' === $operation) { - fwrite(STDERR, "==> Node dump:\n"); - echo $dumper->dump($stmts, $code), "\n"; - } elseif ('pretty-print' === $operation) { - fwrite(STDERR, "==> Pretty print:\n"); - echo $prettyPrinter->prettyPrintFile($stmts), "\n"; - } elseif ('json-dump' === $operation) { - fwrite(STDERR, "==> JSON dump:\n"); - echo json_encode($stmts, JSON_PRETTY_PRINT), "\n"; - } elseif ('var-dump' === $operation) { - fwrite(STDERR, "==> var_dump():\n"); - var_dump($stmts); - } elseif ('resolve-names' === $operation) { - fwrite(STDERR, "==> Resolved names.\n"); - $stmts = $traverser->traverse($stmts); - } - } -} - -function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) { - if ($withColumnInfo && $e->hasColumnInfo()) { - return $e->getMessageWithColumnInfo($code); - } else { - return $e->getMessage(); - } -} - -function showHelp($error = '') { - if ($error) { - fwrite(STDERR, $error . "\n\n"); - } - fwrite($error ? STDERR : STDOUT, <<<'OUTPUT' -Usage: php-parse [operations] file1.php [file2.php ...] - or: php-parse [operations] " false, - 'with-positions' => false, - 'with-recovery' => false, - 'version' => PhpParser\PhpVersion::getNewestSupported(), - ]; - - array_shift($args); - $parseOptions = true; - foreach ($args as $arg) { - if (!$parseOptions) { - $files[] = $arg; - continue; - } - - switch ($arg) { - case '--dump': - case '-d': - $operations[] = 'dump'; - break; - case '--pretty-print': - case '-p': - $operations[] = 'pretty-print'; - break; - case '--json-dump': - case '-j': - $operations[] = 'json-dump'; - break; - case '--var-dump': - $operations[] = 'var-dump'; - break; - case '--resolve-names': - case '-N'; - $operations[] = 'resolve-names'; - break; - case '--with-column-info': - case '-c'; - $attributes['with-column-info'] = true; - break; - case '--with-positions': - case '-P': - $attributes['with-positions'] = true; - break; - case '--with-recovery': - case '-r': - $attributes['with-recovery'] = true; - break; - case '--help': - case '-h'; - showHelp(); - break; - case '--': - $parseOptions = false; - break; - default: - if (preg_match('/^--version=(.*)$/', $arg, $matches)) { - $attributes['version'] = PhpParser\PhpVersion::fromString($matches[1]); - } elseif ($arg[0] === '-' && \strlen($arg[0]) > 1) { - showHelp("Invalid operation $arg."); - } else { - $files[] = $arg; - } - } - } - - return [$operations, $files, $attributes]; -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/composer.json b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/composer.json deleted file mode 100644 index b4b1bca74..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "nikic/php-parser", - "type": "library", - "description": "A PHP parser written in PHP", - "keywords": [ - "php", - "parser" - ], - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Nikita Popov" - } - ], - "require": { - "php": ">=7.4", - "ext-tokenizer": "*", - "ext-json": "*", - "ext-ctype": "*" - }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "ircmaxell/php-yacc": "^0.0.7" - }, - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "autoload-dev": { - "psr-4": { - "PhpParser\\": "test/PhpParser/" - } - }, - "bin": [ - "bin/php-parse" - ] -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder.php deleted file mode 100644 index d6aa124c0..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder.php +++ /dev/null @@ -1,12 +0,0 @@ - */ - protected array $attributes = []; - /** @var list */ - protected array $constants = []; - - /** @var list */ - protected array $attributeGroups = []; - /** @var Identifier|Node\Name|Node\ComplexType|null */ - protected ?Node $type = null; - - /** - * Creates a class constant builder - * - * @param string|Identifier $name Name - * @param Node\Expr|bool|null|int|float|string|array $value Value - */ - public function __construct($name, $value) { - $this->constants = [new Const_($name, BuilderHelpers::normalizeValue($value))]; - } - - /** - * Add another constant to const group - * - * @param string|Identifier $name Name - * @param Node\Expr|bool|null|int|float|string|array $value Value - * - * @return $this The builder instance (for fluid interface) - */ - public function addConst($name, $value) { - $this->constants[] = new Const_($name, BuilderHelpers::normalizeValue($value)); - - return $this; - } - - /** - * Makes the constant public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - - return $this; - } - - /** - * Makes the constant protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - - return $this; - } - - /** - * Makes the constant private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - - return $this; - } - - /** - * Makes the constant final. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); - - return $this; - } - - /** - * Sets doc comment for the constant. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Sets the constant type. - * - * @param string|Node\Name|Identifier|Node\ComplexType $type - * - * @return $this - */ - public function setType($type) { - $this->type = BuilderHelpers::normalizeType($type); - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\ClassConst The built constant node - */ - public function getNode(): PhpParser\Node { - return new Stmt\ClassConst( - $this->constants, - $this->flags, - $this->attributes, - $this->attributeGroups, - $this->type - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php deleted file mode 100644 index 6f394315e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php +++ /dev/null @@ -1,151 +0,0 @@ - */ - protected array $implements = []; - protected int $flags = 0; - /** @var list */ - protected array $uses = []; - /** @var list */ - protected array $constants = []; - /** @var list */ - protected array $properties = []; - /** @var list */ - protected array $methods = []; - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates a class builder. - * - * @param string $name Name of the class - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Extends a class. - * - * @param Name|string $class Name of class to extend - * - * @return $this The builder instance (for fluid interface) - */ - public function extend($class) { - $this->extends = BuilderHelpers::normalizeName($class); - - return $this; - } - - /** - * Implements one or more interfaces. - * - * @param Name|string ...$interfaces Names of interfaces to implement - * - * @return $this The builder instance (for fluid interface) - */ - public function implement(...$interfaces) { - foreach ($interfaces as $interface) { - $this->implements[] = BuilderHelpers::normalizeName($interface); - } - - return $this; - } - - /** - * Makes the class abstract. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeAbstract() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::ABSTRACT); - - return $this; - } - - /** - * Makes the class final. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeFinal() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::FINAL); - - return $this; - } - - /** - * Makes the class readonly. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeReadonly() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::READONLY); - - return $this; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - if ($stmt instanceof Stmt\Property) { - $this->properties[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassMethod) { - $this->methods[] = $stmt; - } elseif ($stmt instanceof Stmt\TraitUse) { - $this->uses[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassConst) { - $this->constants[] = $stmt; - } else { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\Class_ The built class node - */ - public function getNode(): PhpParser\Node { - return new Stmt\Class_($this->name, [ - 'flags' => $this->flags, - 'extends' => $this->extends, - 'implements' => $this->implements, - 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php deleted file mode 100644 index 488b72131..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +++ /dev/null @@ -1,50 +0,0 @@ - */ - protected array $attributes = []; - - /** - * Adds a statement. - * - * @param PhpParser\Node\Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - abstract public function addStmt($stmt); - - /** - * Adds multiple statements. - * - * @param (PhpParser\Node\Stmt|PhpParser\Builder)[] $stmts The statements to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmts(array $stmts) { - foreach ($stmts as $stmt) { - $this->addStmt($stmt); - } - - return $this; - } - - /** - * Sets doc comment for the declaration. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes['comments'] = [ - BuilderHelpers::normalizeDocComment($docComment) - ]; - - return $this; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php deleted file mode 100644 index 04058bf54..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +++ /dev/null @@ -1,87 +0,0 @@ - */ - protected array $attributes = []; - - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates an enum case builder. - * - * @param string|Identifier $name Name - */ - public function __construct($name) { - $this->name = $name; - } - - /** - * Sets the value. - * - * @param Node\Expr|string|int $value - * - * @return $this - */ - public function setValue($value) { - $this->value = BuilderHelpers::normalizeValue($value); - - return $this; - } - - /** - * Sets doc comment for the constant. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built enum case node. - * - * @return Stmt\EnumCase The built constant node - */ - public function getNode(): PhpParser\Node { - return new Stmt\EnumCase( - $this->name, - $this->value, - $this->attributeGroups, - $this->attributes - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php deleted file mode 100644 index c00df03f5..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +++ /dev/null @@ -1,116 +0,0 @@ - */ - protected array $implements = []; - /** @var list */ - protected array $uses = []; - /** @var list */ - protected array $enumCases = []; - /** @var list */ - protected array $constants = []; - /** @var list */ - protected array $methods = []; - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates an enum builder. - * - * @param string $name Name of the enum - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Sets the scalar type. - * - * @param string|Identifier $scalarType - * - * @return $this - */ - public function setScalarType($scalarType) { - $this->scalarType = BuilderHelpers::normalizeType($scalarType); - - return $this; - } - - /** - * Implements one or more interfaces. - * - * @param Name|string ...$interfaces Names of interfaces to implement - * - * @return $this The builder instance (for fluid interface) - */ - public function implement(...$interfaces) { - foreach ($interfaces as $interface) { - $this->implements[] = BuilderHelpers::normalizeName($interface); - } - - return $this; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - if ($stmt instanceof Stmt\EnumCase) { - $this->enumCases[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassMethod) { - $this->methods[] = $stmt; - } elseif ($stmt instanceof Stmt\TraitUse) { - $this->uses[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassConst) { - $this->constants[] = $stmt; - } else { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\Enum_ The built enum node - */ - public function getNode(): PhpParser\Node { - return new Stmt\Enum_($this->name, [ - 'scalarType' => $this->scalarType, - 'implements' => $this->implements, - 'stmts' => array_merge($this->uses, $this->enumCases, $this->constants, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php deleted file mode 100644 index ff79cb6b4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +++ /dev/null @@ -1,73 +0,0 @@ -returnByRef = true; - - return $this; - } - - /** - * Adds a parameter. - * - * @param Node\Param|Param $param The parameter to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addParam($param) { - $param = BuilderHelpers::normalizeNode($param); - - if (!$param instanceof Node\Param) { - throw new \LogicException(sprintf('Expected parameter node, got "%s"', $param->getType())); - } - - $this->params[] = $param; - - return $this; - } - - /** - * Adds multiple parameters. - * - * @param (Node\Param|Param)[] $params The parameters to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addParams(array $params) { - foreach ($params as $param) { - $this->addParam($param); - } - - return $this; - } - - /** - * Sets the return type for PHP 7. - * - * @param string|Node\Name|Node\Identifier|Node\ComplexType $type - * - * @return $this The builder instance (for fluid interface) - */ - public function setReturnType($type) { - $this->returnType = BuilderHelpers::normalizeType($type); - - return $this; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php deleted file mode 100644 index 48f5f6931..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php +++ /dev/null @@ -1,67 +0,0 @@ - */ - protected array $stmts = []; - - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates a function builder. - * - * @param string $name Name of the function - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Adds a statement. - * - * @param Node|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built function node. - * - * @return Stmt\Function_ The built function node - */ - public function getNode(): Node { - return new Stmt\Function_($this->name, [ - 'byRef' => $this->returnByRef, - 'params' => $this->params, - 'returnType' => $this->returnType, - 'stmts' => $this->stmts, - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php deleted file mode 100644 index 13dd3f7f9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +++ /dev/null @@ -1,94 +0,0 @@ - */ - protected array $extends = []; - /** @var list */ - protected array $constants = []; - /** @var list */ - protected array $methods = []; - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates an interface builder. - * - * @param string $name Name of the interface - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Extends one or more interfaces. - * - * @param Name|string ...$interfaces Names of interfaces to extend - * - * @return $this The builder instance (for fluid interface) - */ - public function extend(...$interfaces) { - foreach ($interfaces as $interface) { - $this->extends[] = BuilderHelpers::normalizeName($interface); - } - - return $this; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - if ($stmt instanceof Stmt\ClassConst) { - $this->constants[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassMethod) { - // we erase all statements in the body of an interface method - $stmt->stmts = null; - $this->methods[] = $stmt; - } else { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built interface node. - * - * @return Stmt\Interface_ The built interface node - */ - public function getNode(): PhpParser\Node { - return new Stmt\Interface_($this->name, [ - 'extends' => $this->extends, - 'stmts' => array_merge($this->constants, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php deleted file mode 100644 index 8358dbe38..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php +++ /dev/null @@ -1,147 +0,0 @@ -|null */ - protected ?array $stmts = []; - - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates a method builder. - * - * @param string $name Name of the method - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Makes the method public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - - return $this; - } - - /** - * Makes the method protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - - return $this; - } - - /** - * Makes the method private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - - return $this; - } - - /** - * Makes the method static. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); - - return $this; - } - - /** - * Makes the method abstract. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeAbstract() { - if (!empty($this->stmts)) { - throw new \LogicException('Cannot make method with statements abstract'); - } - - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT); - $this->stmts = null; // abstract methods don't have statements - - return $this; - } - - /** - * Makes the method final. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); - - return $this; - } - - /** - * Adds a statement. - * - * @param Node|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - if (null === $this->stmts) { - throw new \LogicException('Cannot add statements to an abstract method'); - } - - $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built method node. - * - * @return Stmt\ClassMethod The built method node - */ - public function getNode(): Node { - return new Stmt\ClassMethod($this->name, [ - 'flags' => $this->flags, - 'byRef' => $this->returnByRef, - 'params' => $this->params, - 'returnType' => $this->returnType, - 'stmts' => $this->stmts, - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php deleted file mode 100644 index 80fe6f846..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +++ /dev/null @@ -1,45 +0,0 @@ -name = null !== $name ? BuilderHelpers::normalizeName($name) : null; - } - - /** - * Adds a statement. - * - * @param Node|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - - return $this; - } - - /** - * Returns the built node. - * - * @return Stmt\Namespace_ The built node - */ - public function getNode(): Node { - return new Stmt\Namespace_($this->name, $this->stmts, $this->attributes); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php deleted file mode 100644 index f439e8765..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php +++ /dev/null @@ -1,149 +0,0 @@ - */ - protected array $attributeGroups = []; - - /** - * Creates a parameter builder. - * - * @param string $name Name of the parameter - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Sets default value for the parameter. - * - * @param mixed $value Default value to use - * - * @return $this The builder instance (for fluid interface) - */ - public function setDefault($value) { - $this->default = BuilderHelpers::normalizeValue($value); - - return $this; - } - - /** - * Sets type for the parameter. - * - * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type - * - * @return $this The builder instance (for fluid interface) - */ - public function setType($type) { - $this->type = BuilderHelpers::normalizeType($type); - if ($this->type == 'void') { - throw new \LogicException('Parameter type cannot be void'); - } - - return $this; - } - - /** - * Make the parameter accept the value by reference. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeByRef() { - $this->byRef = true; - - return $this; - } - - /** - * Make the parameter variadic - * - * @return $this The builder instance (for fluid interface) - */ - public function makeVariadic() { - $this->variadic = true; - - return $this; - } - - /** - * Makes the (promoted) parameter public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - - return $this; - } - - /** - * Makes the (promoted) parameter protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - - return $this; - } - - /** - * Makes the (promoted) parameter private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - - return $this; - } - - /** - * Makes the (promoted) parameter readonly. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeReadonly() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built parameter node. - * - * @return Node\Param The built parameter node - */ - public function getNode(): Node { - return new Node\Param( - new Node\Expr\Variable($this->name), - $this->default, $this->type, $this->byRef, $this->variadic, [], $this->flags, $this->attributeGroups - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php deleted file mode 100644 index 3fc96d98c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php +++ /dev/null @@ -1,161 +0,0 @@ - */ - protected array $attributes = []; - /** @var null|Identifier|Name|ComplexType */ - protected ?Node $type = null; - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates a property builder. - * - * @param string $name Name of the property - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Makes the property public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - - return $this; - } - - /** - * Makes the property protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - - return $this; - } - - /** - * Makes the property private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - - return $this; - } - - /** - * Makes the property static. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); - - return $this; - } - - /** - * Makes the property readonly. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeReadonly() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); - - return $this; - } - - /** - * Sets default value for the property. - * - * @param mixed $value Default value to use - * - * @return $this The builder instance (for fluid interface) - */ - public function setDefault($value) { - $this->default = BuilderHelpers::normalizeValue($value); - - return $this; - } - - /** - * Sets doc comment for the property. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - - return $this; - } - - /** - * Sets the property type for PHP 7.4+. - * - * @param string|Name|Identifier|ComplexType $type - * - * @return $this - */ - public function setType($type) { - $this->type = BuilderHelpers::normalizeType($type); - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\Property The built property node - */ - public function getNode(): PhpParser\Node { - return new Stmt\Property( - $this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, - [ - new Node\PropertyItem($this->name, $this->default) - ], - $this->attributes, - $this->type, - $this->attributeGroups - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php deleted file mode 100644 index cf21c821a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +++ /dev/null @@ -1,65 +0,0 @@ -and($trait); - } - } - - /** - * Adds used trait. - * - * @param Node\Name|string $trait Trait name - * - * @return $this The builder instance (for fluid interface) - */ - public function and($trait) { - $this->traits[] = BuilderHelpers::normalizeName($trait); - return $this; - } - - /** - * Adds trait adaptation. - * - * @param Stmt\TraitUseAdaptation|Builder\TraitUseAdaptation $adaptation Trait adaptation - * - * @return $this The builder instance (for fluid interface) - */ - public function with($adaptation) { - $adaptation = BuilderHelpers::normalizeNode($adaptation); - - if (!$adaptation instanceof Stmt\TraitUseAdaptation) { - throw new \LogicException('Adaptation must have type TraitUseAdaptation'); - } - - $this->adaptations[] = $adaptation; - return $this; - } - - /** - * Returns the built node. - * - * @return Node The built node - */ - public function getNode(): Node { - return new Stmt\TraitUse($this->traits, $this->adaptations); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php deleted file mode 100644 index fee09583a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +++ /dev/null @@ -1,145 +0,0 @@ -type = self::TYPE_UNDEFINED; - - $this->trait = is_null($trait) ? null : BuilderHelpers::normalizeName($trait); - $this->method = BuilderHelpers::normalizeIdentifier($method); - } - - /** - * Sets alias of method. - * - * @param Node\Identifier|string $alias Alias for adapted method - * - * @return $this The builder instance (for fluid interface) - */ - public function as($alias) { - if ($this->type === self::TYPE_UNDEFINED) { - $this->type = self::TYPE_ALIAS; - } - - if ($this->type !== self::TYPE_ALIAS) { - throw new \LogicException('Cannot set alias for not alias adaptation buider'); - } - - $this->alias = BuilderHelpers::normalizeIdentifier($alias); - return $this; - } - - /** - * Sets adapted method public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->setModifier(Modifiers::PUBLIC); - return $this; - } - - /** - * Sets adapted method protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->setModifier(Modifiers::PROTECTED); - return $this; - } - - /** - * Sets adapted method private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->setModifier(Modifiers::PRIVATE); - return $this; - } - - /** - * Adds overwritten traits. - * - * @param Node\Name|string ...$traits Traits for overwrite - * - * @return $this The builder instance (for fluid interface) - */ - public function insteadof(...$traits) { - if ($this->type === self::TYPE_UNDEFINED) { - if (is_null($this->trait)) { - throw new \LogicException('Precedence adaptation must have trait'); - } - - $this->type = self::TYPE_PRECEDENCE; - } - - if ($this->type !== self::TYPE_PRECEDENCE) { - throw new \LogicException('Cannot add overwritten traits for not precedence adaptation buider'); - } - - foreach ($traits as $trait) { - $this->insteadof[] = BuilderHelpers::normalizeName($trait); - } - - return $this; - } - - protected function setModifier(int $modifier): void { - if ($this->type === self::TYPE_UNDEFINED) { - $this->type = self::TYPE_ALIAS; - } - - if ($this->type !== self::TYPE_ALIAS) { - throw new \LogicException('Cannot set access modifier for not alias adaptation buider'); - } - - if (is_null($this->modifier)) { - $this->modifier = $modifier; - } else { - throw new \LogicException('Multiple access type modifiers are not allowed'); - } - } - - /** - * Returns the built node. - * - * @return Node The built node - */ - public function getNode(): Node { - switch ($this->type) { - case self::TYPE_ALIAS: - return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias); - case self::TYPE_PRECEDENCE: - return new Stmt\TraitUseAdaptation\Precedence($this->trait, $this->method, $this->insteadof); - default: - throw new \LogicException('Type of adaptation is not defined'); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php deleted file mode 100644 index ffa1bd5cc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +++ /dev/null @@ -1,83 +0,0 @@ - */ - protected array $uses = []; - /** @var list */ - protected array $constants = []; - /** @var list */ - protected array $properties = []; - /** @var list */ - protected array $methods = []; - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates an interface builder. - * - * @param string $name Name of the interface - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - if ($stmt instanceof Stmt\Property) { - $this->properties[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassMethod) { - $this->methods[] = $stmt; - } elseif ($stmt instanceof Stmt\TraitUse) { - $this->uses[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassConst) { - $this->constants[] = $stmt; - } else { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built trait node. - * - * @return Stmt\Trait_ The built interface node - */ - public function getNode(): PhpParser\Node { - return new Stmt\Trait_( - $this->name, [ - 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes - ); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php deleted file mode 100644 index b82cf1396..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php +++ /dev/null @@ -1,49 +0,0 @@ -name = BuilderHelpers::normalizeName($name); - $this->type = $type; - } - - /** - * Sets alias for used name. - * - * @param string $alias Alias to use (last component of full name by default) - * - * @return $this The builder instance (for fluid interface) - */ - public function as(string $alias) { - $this->alias = $alias; - return $this; - } - - /** - * Returns the built node. - * - * @return Stmt\Use_ The built node - */ - public function getNode(): Node { - return new Stmt\Use_([ - new Node\UseItem($this->name, $this->alias) - ], $this->type); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php deleted file mode 100644 index b7efe5e9b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php +++ /dev/null @@ -1,375 +0,0 @@ -args($args) - ); - } - - /** - * Creates a namespace builder. - * - * @param null|string|Node\Name $name Name of the namespace - * - * @return Builder\Namespace_ The created namespace builder - */ - public function namespace($name): Builder\Namespace_ { - return new Builder\Namespace_($name); - } - - /** - * Creates a class builder. - * - * @param string $name Name of the class - * - * @return Builder\Class_ The created class builder - */ - public function class(string $name): Builder\Class_ { - return new Builder\Class_($name); - } - - /** - * Creates an interface builder. - * - * @param string $name Name of the interface - * - * @return Builder\Interface_ The created interface builder - */ - public function interface(string $name): Builder\Interface_ { - return new Builder\Interface_($name); - } - - /** - * Creates a trait builder. - * - * @param string $name Name of the trait - * - * @return Builder\Trait_ The created trait builder - */ - public function trait(string $name): Builder\Trait_ { - return new Builder\Trait_($name); - } - - /** - * Creates an enum builder. - * - * @param string $name Name of the enum - * - * @return Builder\Enum_ The created enum builder - */ - public function enum(string $name): Builder\Enum_ { - return new Builder\Enum_($name); - } - - /** - * Creates a trait use builder. - * - * @param Node\Name|string ...$traits Trait names - * - * @return Builder\TraitUse The created trait use builder - */ - public function useTrait(...$traits): Builder\TraitUse { - return new Builder\TraitUse(...$traits); - } - - /** - * Creates a trait use adaptation builder. - * - * @param Node\Name|string|null $trait Trait name - * @param Node\Identifier|string $method Method name - * - * @return Builder\TraitUseAdaptation The created trait use adaptation builder - */ - public function traitUseAdaptation($trait, $method = null): Builder\TraitUseAdaptation { - if ($method === null) { - $method = $trait; - $trait = null; - } - - return new Builder\TraitUseAdaptation($trait, $method); - } - - /** - * Creates a method builder. - * - * @param string $name Name of the method - * - * @return Builder\Method The created method builder - */ - public function method(string $name): Builder\Method { - return new Builder\Method($name); - } - - /** - * Creates a parameter builder. - * - * @param string $name Name of the parameter - * - * @return Builder\Param The created parameter builder - */ - public function param(string $name): Builder\Param { - return new Builder\Param($name); - } - - /** - * Creates a property builder. - * - * @param string $name Name of the property - * - * @return Builder\Property The created property builder - */ - public function property(string $name): Builder\Property { - return new Builder\Property($name); - } - - /** - * Creates a function builder. - * - * @param string $name Name of the function - * - * @return Builder\Function_ The created function builder - */ - public function function(string $name): Builder\Function_ { - return new Builder\Function_($name); - } - - /** - * Creates a namespace/class use builder. - * - * @param Node\Name|string $name Name of the entity (namespace or class) to alias - * - * @return Builder\Use_ The created use builder - */ - public function use($name): Builder\Use_ { - return new Builder\Use_($name, Use_::TYPE_NORMAL); - } - - /** - * Creates a function use builder. - * - * @param Node\Name|string $name Name of the function to alias - * - * @return Builder\Use_ The created use function builder - */ - public function useFunction($name): Builder\Use_ { - return new Builder\Use_($name, Use_::TYPE_FUNCTION); - } - - /** - * Creates a constant use builder. - * - * @param Node\Name|string $name Name of the const to alias - * - * @return Builder\Use_ The created use const builder - */ - public function useConst($name): Builder\Use_ { - return new Builder\Use_($name, Use_::TYPE_CONSTANT); - } - - /** - * Creates a class constant builder. - * - * @param string|Identifier $name Name - * @param Node\Expr|bool|null|int|float|string|array $value Value - * - * @return Builder\ClassConst The created use const builder - */ - public function classConst($name, $value): Builder\ClassConst { - return new Builder\ClassConst($name, $value); - } - - /** - * Creates an enum case builder. - * - * @param string|Identifier $name Name - * - * @return Builder\EnumCase The created use const builder - */ - public function enumCase($name): Builder\EnumCase { - return new Builder\EnumCase($name); - } - - /** - * Creates node a for a literal value. - * - * @param Expr|bool|null|int|float|string|array $value $value - */ - public function val($value): Expr { - return BuilderHelpers::normalizeValue($value); - } - - /** - * Creates variable node. - * - * @param string|Expr $name Name - */ - public function var($name): Expr\Variable { - if (!\is_string($name) && !$name instanceof Expr) { - throw new \LogicException('Variable name must be string or Expr'); - } - - return new Expr\Variable($name); - } - - /** - * Normalizes an argument list. - * - * Creates Arg nodes for all arguments and converts literal values to expressions. - * - * @param array $args List of arguments to normalize - * - * @return list - */ - public function args(array $args): array { - $normalizedArgs = []; - foreach ($args as $key => $arg) { - if (!($arg instanceof Arg)) { - $arg = new Arg(BuilderHelpers::normalizeValue($arg)); - } - if (\is_string($key)) { - $arg->name = BuilderHelpers::normalizeIdentifier($key); - } - $normalizedArgs[] = $arg; - } - return $normalizedArgs; - } - - /** - * Creates a function call node. - * - * @param string|Name|Expr $name Function name - * @param array $args Function arguments - */ - public function funcCall($name, array $args = []): Expr\FuncCall { - return new Expr\FuncCall( - BuilderHelpers::normalizeNameOrExpr($name), - $this->args($args) - ); - } - - /** - * Creates a method call node. - * - * @param Expr $var Variable the method is called on - * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments - */ - public function methodCall(Expr $var, $name, array $args = []): Expr\MethodCall { - return new Expr\MethodCall( - $var, - BuilderHelpers::normalizeIdentifierOrExpr($name), - $this->args($args) - ); - } - - /** - * Creates a static method call node. - * - * @param string|Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments - */ - public function staticCall($class, $name, array $args = []): Expr\StaticCall { - return new Expr\StaticCall( - BuilderHelpers::normalizeNameOrExpr($class), - BuilderHelpers::normalizeIdentifierOrExpr($name), - $this->args($args) - ); - } - - /** - * Creates an object creation node. - * - * @param string|Name|Expr $class Class name - * @param array $args Constructor arguments - */ - public function new($class, array $args = []): Expr\New_ { - return new Expr\New_( - BuilderHelpers::normalizeNameOrExpr($class), - $this->args($args) - ); - } - - /** - * Creates a constant fetch node. - * - * @param string|Name $name Constant name - */ - public function constFetch($name): Expr\ConstFetch { - return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); - } - - /** - * Creates a property fetch node. - * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Property name - */ - public function propertyFetch(Expr $var, $name): Expr\PropertyFetch { - return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name)); - } - - /** - * Creates a class constant fetch node. - * - * @param string|Name|Expr $class Class name - * @param string|Identifier|Expr $name Constant name - */ - public function classConstFetch($class, $name): Expr\ClassConstFetch { - return new Expr\ClassConstFetch( - BuilderHelpers::normalizeNameOrExpr($class), - BuilderHelpers::normalizeIdentifierOrExpr($name) - ); - } - - /** - * Creates nested Concat nodes from a list of expressions. - * - * @param Expr|string ...$exprs Expressions or literal strings - */ - public function concat(...$exprs): Concat { - $numExprs = count($exprs); - if ($numExprs < 2) { - throw new \LogicException('Expected at least two expressions'); - } - - $lastConcat = $this->normalizeStringExpr($exprs[0]); - for ($i = 1; $i < $numExprs; $i++) { - $lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i])); - } - return $lastConcat; - } - - /** - * @param string|Expr $expr - */ - private function normalizeStringExpr($expr): Expr { - if ($expr instanceof Expr) { - return $expr; - } - - if (\is_string($expr)) { - return new String_($expr); - } - - throw new \LogicException('Expected string or Expr'); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php deleted file mode 100644 index 3e41b26fc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +++ /dev/null @@ -1,333 +0,0 @@ -getNode(); - } - - if ($node instanceof Node) { - return $node; - } - - throw new \LogicException('Expected node or builder object'); - } - - /** - * Normalizes a node to a statement. - * - * Expressions are wrapped in a Stmt\Expression node. - * - * @param Node|Builder $node The node to normalize - * - * @return Stmt The normalized statement node - */ - public static function normalizeStmt($node): Stmt { - $node = self::normalizeNode($node); - if ($node instanceof Stmt) { - return $node; - } - - if ($node instanceof Expr) { - return new Stmt\Expression($node); - } - - throw new \LogicException('Expected statement or expression node'); - } - - /** - * Normalizes strings to Identifier. - * - * @param string|Identifier $name The identifier to normalize - * - * @return Identifier The normalized identifier - */ - public static function normalizeIdentifier($name): Identifier { - if ($name instanceof Identifier) { - return $name; - } - - if (\is_string($name)) { - return new Identifier($name); - } - - throw new \LogicException('Expected string or instance of Node\Identifier'); - } - - /** - * Normalizes strings to Identifier, also allowing expressions. - * - * @param string|Identifier|Expr $name The identifier to normalize - * - * @return Identifier|Expr The normalized identifier or expression - */ - public static function normalizeIdentifierOrExpr($name) { - if ($name instanceof Identifier || $name instanceof Expr) { - return $name; - } - - if (\is_string($name)) { - return new Identifier($name); - } - - throw new \LogicException('Expected string or instance of Node\Identifier or Node\Expr'); - } - - /** - * Normalizes a name: Converts string names to Name nodes. - * - * @param Name|string $name The name to normalize - * - * @return Name The normalized name - */ - public static function normalizeName($name): Name { - if ($name instanceof Name) { - return $name; - } - - if (is_string($name)) { - if (!$name) { - throw new \LogicException('Name cannot be empty'); - } - - if ($name[0] === '\\') { - return new Name\FullyQualified(substr($name, 1)); - } - - if (0 === strpos($name, 'namespace\\')) { - return new Name\Relative(substr($name, strlen('namespace\\'))); - } - - return new Name($name); - } - - throw new \LogicException('Name must be a string or an instance of Node\Name'); - } - - /** - * Normalizes a name: Converts string names to Name nodes, while also allowing expressions. - * - * @param Expr|Name|string $name The name to normalize - * - * @return Name|Expr The normalized name or expression - */ - public static function normalizeNameOrExpr($name) { - if ($name instanceof Expr) { - return $name; - } - - if (!is_string($name) && !($name instanceof Name)) { - throw new \LogicException( - 'Name must be a string or an instance of Node\Name or Node\Expr' - ); - } - - return self::normalizeName($name); - } - - /** - * Normalizes a type: Converts plain-text type names into proper AST representation. - * - * In particular, builtin types become Identifiers, custom types become Names and nullables - * are wrapped in NullableType nodes. - * - * @param string|Name|Identifier|ComplexType $type The type to normalize - * - * @return Name|Identifier|ComplexType The normalized type - */ - public static function normalizeType($type) { - if (!is_string($type)) { - if ( - !$type instanceof Name && !$type instanceof Identifier && - !$type instanceof ComplexType - ) { - throw new \LogicException( - 'Type must be a string, or an instance of Name, Identifier or ComplexType' - ); - } - return $type; - } - - $nullable = false; - if (strlen($type) > 0 && $type[0] === '?') { - $nullable = true; - $type = substr($type, 1); - } - - $builtinTypes = [ - 'array', - 'callable', - 'bool', - 'int', - 'float', - 'string', - 'iterable', - 'void', - 'object', - 'null', - 'false', - 'mixed', - 'never', - 'true', - ]; - - $lowerType = strtolower($type); - if (in_array($lowerType, $builtinTypes)) { - $type = new Identifier($lowerType); - } else { - $type = self::normalizeName($type); - } - - $notNullableTypes = [ - 'void', 'mixed', 'never', - ]; - if ($nullable && in_array((string) $type, $notNullableTypes)) { - throw new \LogicException(sprintf('%s type cannot be nullable', $type)); - } - - return $nullable ? new NullableType($type) : $type; - } - - /** - * Normalizes a value: Converts nulls, booleans, integers, - * floats, strings and arrays into their respective nodes - * - * @param Node\Expr|bool|null|int|float|string|array $value The value to normalize - * - * @return Expr The normalized value - */ - public static function normalizeValue($value): Expr { - if ($value instanceof Node\Expr) { - return $value; - } - - if (is_null($value)) { - return new Expr\ConstFetch( - new Name('null') - ); - } - - if (is_bool($value)) { - return new Expr\ConstFetch( - new Name($value ? 'true' : 'false') - ); - } - - if (is_int($value)) { - return new Scalar\Int_($value); - } - - if (is_float($value)) { - return new Scalar\Float_($value); - } - - if (is_string($value)) { - return new Scalar\String_($value); - } - - if (is_array($value)) { - $items = []; - $lastKey = -1; - foreach ($value as $itemKey => $itemValue) { - // for consecutive, numeric keys don't generate keys - if (null !== $lastKey && ++$lastKey === $itemKey) { - $items[] = new Node\ArrayItem( - self::normalizeValue($itemValue) - ); - } else { - $lastKey = null; - $items[] = new Node\ArrayItem( - self::normalizeValue($itemValue), - self::normalizeValue($itemKey) - ); - } - } - - return new Expr\Array_($items); - } - - throw new \LogicException('Invalid value'); - } - - /** - * Normalizes a doc comment: Converts plain strings to PhpParser\Comment\Doc. - * - * @param Comment\Doc|string $docComment The doc comment to normalize - * - * @return Comment\Doc The normalized doc comment - */ - public static function normalizeDocComment($docComment): Comment\Doc { - if ($docComment instanceof Comment\Doc) { - return $docComment; - } - - if (is_string($docComment)) { - return new Comment\Doc($docComment); - } - - throw new \LogicException('Doc comment must be a string or an instance of PhpParser\Comment\Doc'); - } - - /** - * Normalizes a attribute: Converts attribute to the Attribute Group if needed. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return Node\AttributeGroup The Attribute Group - */ - public static function normalizeAttribute($attribute): Node\AttributeGroup { - if ($attribute instanceof Node\AttributeGroup) { - return $attribute; - } - - if (!($attribute instanceof Node\Attribute)) { - throw new \LogicException('Attribute must be an instance of PhpParser\Node\Attribute or PhpParser\Node\AttributeGroup'); - } - - return new Node\AttributeGroup([$attribute]); - } - - /** - * Adds a modifier and returns new modifier bitmask. - * - * @param int $modifiers Existing modifiers - * @param int $modifier Modifier to set - * - * @return int New modifiers - */ - public static function addModifier(int $modifiers, int $modifier): int { - Modifiers::verifyModifier($modifiers, $modifier); - return $modifiers | $modifier; - } - - /** - * Adds a modifier and returns new modifier bitmask. - * @return int New modifiers - */ - public static function addClassModifier(int $existingModifiers, int $modifierToSet): int { - Modifiers::verifyClassModifier($existingModifiers, $modifierToSet); - return $existingModifiers | $modifierToSet; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Comment.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Comment.php deleted file mode 100644 index 17dc4c73a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Comment.php +++ /dev/null @@ -1,207 +0,0 @@ -text = $text; - $this->startLine = $startLine; - $this->startFilePos = $startFilePos; - $this->startTokenPos = $startTokenPos; - $this->endLine = $endLine; - $this->endFilePos = $endFilePos; - $this->endTokenPos = $endTokenPos; - } - - /** - * Gets the comment text. - * - * @return string The comment text (including comment delimiters like /*) - */ - public function getText(): string { - return $this->text; - } - - /** - * Gets the line number the comment started on. - * - * @return int Line number (or -1 if not available) - */ - public function getStartLine(): int { - return $this->startLine; - } - - /** - * Gets the file offset the comment started on. - * - * @return int File offset (or -1 if not available) - */ - public function getStartFilePos(): int { - return $this->startFilePos; - } - - /** - * Gets the token offset the comment started on. - * - * @return int Token offset (or -1 if not available) - */ - public function getStartTokenPos(): int { - return $this->startTokenPos; - } - - /** - * Gets the line number the comment ends on. - * - * @return int Line number (or -1 if not available) - */ - public function getEndLine(): int { - return $this->endLine; - } - - /** - * Gets the file offset the comment ends on. - * - * @return int File offset (or -1 if not available) - */ - public function getEndFilePos(): int { - return $this->endFilePos; - } - - /** - * Gets the token offset the comment ends on. - * - * @return int Token offset (or -1 if not available) - */ - public function getEndTokenPos(): int { - return $this->endTokenPos; - } - - /** - * Gets the comment text. - * - * @return string The comment text (including comment delimiters like /*) - */ - public function __toString(): string { - return $this->text; - } - - /** - * Gets the reformatted comment text. - * - * "Reformatted" here means that we try to clean up the whitespace at the - * starts of the lines. This is necessary because we receive the comments - * without leading whitespace on the first line, but with leading whitespace - * on all subsequent lines. - * - * Additionally, this normalizes CRLF newlines to LF newlines. - */ - public function getReformattedText(): string { - $text = str_replace("\r\n", "\n", $this->text); - $newlinePos = strpos($text, "\n"); - if (false === $newlinePos) { - // Single line comments don't need further processing - return $text; - } - if (preg_match('(^.*(?:\n\s+\*.*)+$)', $text)) { - // Multi line comment of the type - // - // /* - // * Some text. - // * Some more text. - // */ - // - // is handled by replacing the whitespace sequences before the * by a single space - return preg_replace('(^\s+\*)m', ' *', $text); - } - if (preg_match('(^/\*\*?\s*\n)', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { - // Multi line comment of the type - // - // /* - // Some text. - // Some more text. - // */ - // - // is handled by removing the whitespace sequence on the line before the closing - // */ on all lines. So if the last line is " */", then " " is removed at the - // start of all lines. - return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text); - } - if (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) { - // Multi line comment of the type - // - // /* Some text. - // Some more text. - // Indented text. - // Even more text. */ - // - // is handled by removing the difference between the shortest whitespace prefix on all - // lines and the length of the "/* " opening sequence. - $prefixLen = $this->getShortestWhitespacePrefixLen(substr($text, $newlinePos + 1)); - $removeLen = $prefixLen - strlen($matches[0]); - return preg_replace('(^\s{' . $removeLen . '})m', '', $text); - } - - // No idea how to format this comment, so simply return as is - return $text; - } - - /** - * Get length of shortest whitespace prefix (at the start of a line). - * - * If there is a line with no prefix whitespace, 0 is a valid return value. - * - * @param string $str String to check - * @return int Length in characters. Tabs count as single characters. - */ - private function getShortestWhitespacePrefixLen(string $str): int { - $lines = explode("\n", $str); - $shortestPrefixLen = \PHP_INT_MAX; - foreach ($lines as $line) { - preg_match('(^\s*)', $line, $matches); - $prefixLen = strlen($matches[0]); - if ($prefixLen < $shortestPrefixLen) { - $shortestPrefixLen = $prefixLen; - } - } - return $shortestPrefixLen; - } - - /** - * @return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} - */ - public function jsonSerialize(): array { - // Technically not a node, but we make it look like one anyway - $type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment'; - return [ - 'nodeType' => $type, - 'text' => $this->text, - // TODO: Rename these to include "start". - 'line' => $this->startLine, - 'filePos' => $this->startFilePos, - 'tokenPos' => $this->startTokenPos, - 'endLine' => $this->endLine, - 'endFilePos' => $this->endFilePos, - 'endTokenPos' => $this->endTokenPos, - ]; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php deleted file mode 100644 index bb3e9146a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php +++ /dev/null @@ -1,6 +0,0 @@ -fallbackEvaluator = $fallbackEvaluator ?? function (Expr $expr) { - throw new ConstExprEvaluationException( - "Expression of type {$expr->getType()} cannot be evaluated" - ); - }; - } - - /** - * Silently evaluates a constant expression into a PHP value. - * - * Thrown Errors, warnings or notices will be converted into a ConstExprEvaluationException. - * The original source of the exception is available through getPrevious(). - * - * If some part of the expression cannot be evaluated, the fallback evaluator passed to the - * constructor will be invoked. By default, if no fallback is provided, an exception of type - * ConstExprEvaluationException is thrown. - * - * See class doc comment for caveats and limitations. - * - * @param Expr $expr Constant expression to evaluate - * @return mixed Result of evaluation - * - * @throws ConstExprEvaluationException if the expression cannot be evaluated or an error occurred - */ - public function evaluateSilently(Expr $expr) { - set_error_handler(function ($num, $str, $file, $line) { - throw new \ErrorException($str, 0, $num, $file, $line); - }); - - try { - return $this->evaluate($expr); - } catch (\Throwable $e) { - if (!$e instanceof ConstExprEvaluationException) { - $e = new ConstExprEvaluationException( - "An error occurred during constant expression evaluation", 0, $e); - } - throw $e; - } finally { - restore_error_handler(); - } - } - - /** - * Directly evaluates a constant expression into a PHP value. - * - * May generate Error exceptions, warnings or notices. Use evaluateSilently() to convert these - * into a ConstExprEvaluationException. - * - * If some part of the expression cannot be evaluated, the fallback evaluator passed to the - * constructor will be invoked. By default, if no fallback is provided, an exception of type - * ConstExprEvaluationException is thrown. - * - * See class doc comment for caveats and limitations. - * - * @param Expr $expr Constant expression to evaluate - * @return mixed Result of evaluation - * - * @throws ConstExprEvaluationException if the expression cannot be evaluated - */ - public function evaluateDirectly(Expr $expr) { - return $this->evaluate($expr); - } - - /** @return mixed */ - private function evaluate(Expr $expr) { - if ($expr instanceof Scalar\Int_ - || $expr instanceof Scalar\Float_ - || $expr instanceof Scalar\String_ - ) { - return $expr->value; - } - - if ($expr instanceof Expr\Array_) { - return $this->evaluateArray($expr); - } - - // Unary operators - if ($expr instanceof Expr\UnaryPlus) { - return +$this->evaluate($expr->expr); - } - if ($expr instanceof Expr\UnaryMinus) { - return -$this->evaluate($expr->expr); - } - if ($expr instanceof Expr\BooleanNot) { - return !$this->evaluate($expr->expr); - } - if ($expr instanceof Expr\BitwiseNot) { - return ~$this->evaluate($expr->expr); - } - - if ($expr instanceof Expr\BinaryOp) { - return $this->evaluateBinaryOp($expr); - } - - if ($expr instanceof Expr\Ternary) { - return $this->evaluateTernary($expr); - } - - if ($expr instanceof Expr\ArrayDimFetch && null !== $expr->dim) { - return $this->evaluate($expr->var)[$this->evaluate($expr->dim)]; - } - - if ($expr instanceof Expr\ConstFetch) { - return $this->evaluateConstFetch($expr); - } - - return ($this->fallbackEvaluator)($expr); - } - - private function evaluateArray(Expr\Array_ $expr): array { - $array = []; - foreach ($expr->items as $item) { - if (null !== $item->key) { - $array[$this->evaluate($item->key)] = $this->evaluate($item->value); - } elseif ($item->unpack) { - $array = array_merge($array, $this->evaluate($item->value)); - } else { - $array[] = $this->evaluate($item->value); - } - } - return $array; - } - - /** @return mixed */ - private function evaluateTernary(Expr\Ternary $expr) { - if (null === $expr->if) { - return $this->evaluate($expr->cond) ?: $this->evaluate($expr->else); - } - - return $this->evaluate($expr->cond) - ? $this->evaluate($expr->if) - : $this->evaluate($expr->else); - } - - /** @return mixed */ - private function evaluateBinaryOp(Expr\BinaryOp $expr) { - if ($expr instanceof Expr\BinaryOp\Coalesce - && $expr->left instanceof Expr\ArrayDimFetch - ) { - // This needs to be special cased to respect BP_VAR_IS fetch semantics - return $this->evaluate($expr->left->var)[$this->evaluate($expr->left->dim)] - ?? $this->evaluate($expr->right); - } - - // The evaluate() calls are repeated in each branch, because some of the operators are - // short-circuiting and evaluating the RHS in advance may be illegal in that case - $l = $expr->left; - $r = $expr->right; - switch ($expr->getOperatorSigil()) { - case '&': return $this->evaluate($l) & $this->evaluate($r); - case '|': return $this->evaluate($l) | $this->evaluate($r); - case '^': return $this->evaluate($l) ^ $this->evaluate($r); - case '&&': return $this->evaluate($l) && $this->evaluate($r); - case '||': return $this->evaluate($l) || $this->evaluate($r); - case '??': return $this->evaluate($l) ?? $this->evaluate($r); - case '.': return $this->evaluate($l) . $this->evaluate($r); - case '/': return $this->evaluate($l) / $this->evaluate($r); - case '==': return $this->evaluate($l) == $this->evaluate($r); - case '>': return $this->evaluate($l) > $this->evaluate($r); - case '>=': return $this->evaluate($l) >= $this->evaluate($r); - case '===': return $this->evaluate($l) === $this->evaluate($r); - case 'and': return $this->evaluate($l) and $this->evaluate($r); - case 'or': return $this->evaluate($l) or $this->evaluate($r); - case 'xor': return $this->evaluate($l) xor $this->evaluate($r); - case '-': return $this->evaluate($l) - $this->evaluate($r); - case '%': return $this->evaluate($l) % $this->evaluate($r); - case '*': return $this->evaluate($l) * $this->evaluate($r); - case '!=': return $this->evaluate($l) != $this->evaluate($r); - case '!==': return $this->evaluate($l) !== $this->evaluate($r); - case '+': return $this->evaluate($l) + $this->evaluate($r); - case '**': return $this->evaluate($l) ** $this->evaluate($r); - case '<<': return $this->evaluate($l) << $this->evaluate($r); - case '>>': return $this->evaluate($l) >> $this->evaluate($r); - case '<': return $this->evaluate($l) < $this->evaluate($r); - case '<=': return $this->evaluate($l) <= $this->evaluate($r); - case '<=>': return $this->evaluate($l) <=> $this->evaluate($r); - } - - throw new \Exception('Should not happen'); - } - - /** @return mixed */ - private function evaluateConstFetch(Expr\ConstFetch $expr) { - $name = $expr->name->toLowerString(); - switch ($name) { - case 'null': return null; - case 'false': return false; - case 'true': return true; - } - - return ($this->fallbackEvaluator)($expr); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Error.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Error.php deleted file mode 100644 index 02feace0c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Error.php +++ /dev/null @@ -1,171 +0,0 @@ - */ - protected array $attributes; - - /** - * Creates an Exception signifying a parse error. - * - * @param string $message Error message - * @param array $attributes Attributes of node/token where error occurred - */ - public function __construct(string $message, array $attributes = []) { - $this->rawMessage = $message; - $this->attributes = $attributes; - $this->updateMessage(); - } - - /** - * Gets the error message - * - * @return string Error message - */ - public function getRawMessage(): string { - return $this->rawMessage; - } - - /** - * Gets the line the error starts in. - * - * @return int Error start line - */ - public function getStartLine(): int { - return $this->attributes['startLine'] ?? -1; - } - - /** - * Gets the line the error ends in. - * - * @return int Error end line - */ - public function getEndLine(): int { - return $this->attributes['endLine'] ?? -1; - } - - /** - * Gets the attributes of the node/token the error occurred at. - * - * @return array - */ - public function getAttributes(): array { - return $this->attributes; - } - - /** - * Sets the attributes of the node/token the error occurred at. - * - * @param array $attributes - */ - public function setAttributes(array $attributes): void { - $this->attributes = $attributes; - $this->updateMessage(); - } - - /** - * Sets the line of the PHP file the error occurred in. - * - * @param string $message Error message - */ - public function setRawMessage(string $message): void { - $this->rawMessage = $message; - $this->updateMessage(); - } - - /** - * Sets the line the error starts in. - * - * @param int $line Error start line - */ - public function setStartLine(int $line): void { - $this->attributes['startLine'] = $line; - $this->updateMessage(); - } - - /** - * Returns whether the error has start and end column information. - * - * For column information enable the startFilePos and endFilePos in the lexer options. - */ - public function hasColumnInfo(): bool { - return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']); - } - - /** - * Gets the start column (1-based) into the line where the error started. - * - * @param string $code Source code of the file - */ - public function getStartColumn(string $code): int { - if (!$this->hasColumnInfo()) { - throw new \RuntimeException('Error does not have column information'); - } - - return $this->toColumn($code, $this->attributes['startFilePos']); - } - - /** - * Gets the end column (1-based) into the line where the error ended. - * - * @param string $code Source code of the file - */ - public function getEndColumn(string $code): int { - if (!$this->hasColumnInfo()) { - throw new \RuntimeException('Error does not have column information'); - } - - return $this->toColumn($code, $this->attributes['endFilePos']); - } - - /** - * Formats message including line and column information. - * - * @param string $code Source code associated with the error, for calculation of the columns - * - * @return string Formatted message - */ - public function getMessageWithColumnInfo(string $code): string { - return sprintf( - '%s from %d:%d to %d:%d', $this->getRawMessage(), - $this->getStartLine(), $this->getStartColumn($code), - $this->getEndLine(), $this->getEndColumn($code) - ); - } - - /** - * Converts a file offset into a column. - * - * @param string $code Source code that $pos indexes into - * @param int $pos 0-based position in $code - * - * @return int 1-based column (relative to start of line) - */ - private function toColumn(string $code, int $pos): int { - if ($pos > strlen($code)) { - throw new \RuntimeException('Invalid position information'); - } - - $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); - if (false === $lineStartPos) { - $lineStartPos = -1; - } - - return $pos - $lineStartPos; - } - - /** - * Updates the exception message after a change to rawMessage or rawLine. - */ - protected function updateMessage(): void { - $this->message = $this->rawMessage; - - if (-1 === $this->getStartLine()) { - $this->message .= ' on unknown line'; - } else { - $this->message .= ' on line ' . $this->getStartLine(); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php deleted file mode 100644 index 51ad730c4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php +++ /dev/null @@ -1,12 +0,0 @@ -errors[] = $error; - } - - /** - * Get collected errors. - * - * @return Error[] - */ - public function getErrors(): array { - return $this->errors; - } - - /** - * Check whether there are any errors. - */ - public function hasErrors(): bool { - return !empty($this->errors); - } - - /** - * Reset/clear collected errors. - */ - public function clearErrors(): void { - $this->errors = []; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php deleted file mode 100644 index dff33dd02..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +++ /dev/null @@ -1,17 +0,0 @@ -type = $type; - $this->old = $old; - $this->new = $new; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php deleted file mode 100644 index 253e17574..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php +++ /dev/null @@ -1,178 +0,0 @@ -isEqual = $isEqual; - } - - /** - * Calculate diff (edit script) from $old to $new. - * - * @param T[] $old Original array - * @param T[] $new New array - * - * @return DiffElem[] Diff (edit script) - */ - public function diff(array $old, array $new): array { - $old = \array_values($old); - $new = \array_values($new); - list($trace, $x, $y) = $this->calculateTrace($old, $new); - return $this->extractDiff($trace, $x, $y, $old, $new); - } - - /** - * Calculate diff, including "replace" operations. - * - * If a sequence of remove operations is followed by the same number of add operations, these - * will be coalesced into replace operations. - * - * @param T[] $old Original array - * @param T[] $new New array - * - * @return DiffElem[] Diff (edit script), including replace operations - */ - public function diffWithReplacements(array $old, array $new): array { - return $this->coalesceReplacements($this->diff($old, $new)); - } - - /** - * @param T[] $old - * @param T[] $new - * @return array{array>, int, int} - */ - private function calculateTrace(array $old, array $new): array { - $n = \count($old); - $m = \count($new); - $max = $n + $m; - $v = [1 => 0]; - $trace = []; - for ($d = 0; $d <= $max; $d++) { - $trace[] = $v; - for ($k = -$d; $k <= $d; $k += 2) { - if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { - $x = $v[$k + 1]; - } else { - $x = $v[$k - 1] + 1; - } - - $y = $x - $k; - while ($x < $n && $y < $m && ($this->isEqual)($old[$x], $new[$y])) { - $x++; - $y++; - } - - $v[$k] = $x; - if ($x >= $n && $y >= $m) { - return [$trace, $x, $y]; - } - } - } - throw new \Exception('Should not happen'); - } - - /** - * @param array> $trace - * @param T[] $old - * @param T[] $new - * @return DiffElem[] - */ - private function extractDiff(array $trace, int $x, int $y, array $old, array $new): array { - $result = []; - for ($d = \count($trace) - 1; $d >= 0; $d--) { - $v = $trace[$d]; - $k = $x - $y; - - if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { - $prevK = $k + 1; - } else { - $prevK = $k - 1; - } - - $prevX = $v[$prevK]; - $prevY = $prevX - $prevK; - - while ($x > $prevX && $y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_KEEP, $old[$x - 1], $new[$y - 1]); - $x--; - $y--; - } - - if ($d === 0) { - break; - } - - while ($x > $prevX) { - $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $old[$x - 1], null); - $x--; - } - - while ($y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $new[$y - 1]); - $y--; - } - } - return array_reverse($result); - } - - /** - * Coalesce equal-length sequences of remove+add into a replace operation. - * - * @param DiffElem[] $diff - * @return DiffElem[] - */ - private function coalesceReplacements(array $diff): array { - $newDiff = []; - $c = \count($diff); - for ($i = 0; $i < $c; $i++) { - $diffType = $diff[$i]->type; - if ($diffType !== DiffElem::TYPE_REMOVE) { - $newDiff[] = $diff[$i]; - continue; - } - - $j = $i; - while ($j < $c && $diff[$j]->type === DiffElem::TYPE_REMOVE) { - $j++; - } - - $k = $j; - while ($k < $c && $diff[$k]->type === DiffElem::TYPE_ADD) { - $k++; - } - - if ($j - $i === $k - $j) { - $len = $j - $i; - for ($n = 0; $n < $len; $n++) { - $newDiff[] = new DiffElem( - DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new - ); - } - } else { - for (; $i < $k; $i++) { - $newDiff[] = $diff[$i]; - } - } - $i = $k - 1; - } - return $newDiff; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php deleted file mode 100644 index b30a99a14..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ /dev/null @@ -1,71 +0,0 @@ - $attributes Attributes - */ - public function __construct( - array $attrGroups, int $flags, array $args, ?Node\Name $extends, array $implements, - array $stmts, array $attributes - ) { - parent::__construct($attributes); - $this->attrGroups = $attrGroups; - $this->flags = $flags; - $this->args = $args; - $this->extends = $extends; - $this->implements = $implements; - $this->stmts = $stmts; - } - - public static function fromNewNode(Expr\New_ $newNode): self { - $class = $newNode->class; - assert($class instanceof Node\Stmt\Class_); - // We don't assert that $class->name is null here, to allow consumers to assign unique names - // to anonymous classes for their own purposes. We simplify ignore the name here. - return new self( - $class->attrGroups, $class->flags, $newNode->args, $class->extends, $class->implements, - $class->stmts, $newNode->getAttributes() - ); - } - - public function getType(): string { - return 'Expr_PrintableNewAnonClass'; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'args', 'extends', 'implements', 'stmts']; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php deleted file mode 100644 index 8fba13124..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +++ /dev/null @@ -1,271 +0,0 @@ -tokens = $tokens; - $this->indentMap = $this->calcIndentMap(); - } - - /** - * Whether the given position is immediately surrounded by parenthesis. - * - * @param int $startPos Start position - * @param int $endPos End position - */ - public function haveParens(int $startPos, int $endPos): bool { - return $this->haveTokenImmediatelyBefore($startPos, '(') - && $this->haveTokenImmediatelyAfter($endPos, ')'); - } - - /** - * Whether the given position is immediately surrounded by braces. - * - * @param int $startPos Start position - * @param int $endPos End position - */ - public function haveBraces(int $startPos, int $endPos): bool { - return ($this->haveTokenImmediatelyBefore($startPos, '{') - || $this->haveTokenImmediatelyBefore($startPos, T_CURLY_OPEN)) - && $this->haveTokenImmediatelyAfter($endPos, '}'); - } - - /** - * Check whether the position is directly preceded by a certain token type. - * - * During this check whitespace and comments are skipped. - * - * @param int $pos Position before which the token should occur - * @param int|string $expectedTokenType Token to check for - * - * @return bool Whether the expected token was found - */ - public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType): bool { - $tokens = $this->tokens; - $pos--; - for (; $pos >= 0; $pos--) { - $token = $tokens[$pos]; - if ($token->is($expectedTokenType)) { - return true; - } - if (!$token->isIgnorable()) { - break; - } - } - return false; - } - - /** - * Check whether the position is directly followed by a certain token type. - * - * During this check whitespace and comments are skipped. - * - * @param int $pos Position after which the token should occur - * @param int|string $expectedTokenType Token to check for - * - * @return bool Whether the expected token was found - */ - public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType): bool { - $tokens = $this->tokens; - $pos++; - for ($c = \count($tokens); $pos < $c; $pos++) { - $token = $tokens[$pos]; - if ($token->is($expectedTokenType)) { - return true; - } - if (!$token->isIgnorable()) { - break; - } - } - return false; - } - - /** @param int|string|(int|string)[] $skipTokenType */ - public function skipLeft(int $pos, $skipTokenType): int { - $tokens = $this->tokens; - - $pos = $this->skipLeftWhitespace($pos); - if ($skipTokenType === \T_WHITESPACE) { - return $pos; - } - - if (!$tokens[$pos]->is($skipTokenType)) { - // Shouldn't happen. The skip token MUST be there - throw new \Exception('Encountered unexpected token'); - } - $pos--; - - return $this->skipLeftWhitespace($pos); - } - - /** @param int|string|(int|string)[] $skipTokenType */ - public function skipRight(int $pos, $skipTokenType): int { - $tokens = $this->tokens; - - $pos = $this->skipRightWhitespace($pos); - if ($skipTokenType === \T_WHITESPACE) { - return $pos; - } - - if (!$tokens[$pos]->is($skipTokenType)) { - // Shouldn't happen. The skip token MUST be there - throw new \Exception('Encountered unexpected token'); - } - $pos++; - - return $this->skipRightWhitespace($pos); - } - - /** - * Return first non-whitespace token position smaller or equal to passed position. - * - * @param int $pos Token position - * @return int Non-whitespace token position - */ - public function skipLeftWhitespace(int $pos): int { - $tokens = $this->tokens; - for (; $pos >= 0; $pos--) { - if (!$tokens[$pos]->isIgnorable()) { - break; - } - } - return $pos; - } - - /** - * Return first non-whitespace position greater or equal to passed position. - * - * @param int $pos Token position - * @return int Non-whitespace token position - */ - public function skipRightWhitespace(int $pos): int { - $tokens = $this->tokens; - for ($count = \count($tokens); $pos < $count; $pos++) { - if (!$tokens[$pos]->isIgnorable()) { - break; - } - } - return $pos; - } - - /** @param int|string|(int|string)[] $findTokenType */ - public function findRight(int $pos, $findTokenType): int { - $tokens = $this->tokens; - for ($count = \count($tokens); $pos < $count; $pos++) { - if ($tokens[$pos]->is($findTokenType)) { - return $pos; - } - } - return -1; - } - - /** - * Whether the given position range contains a certain token type. - * - * @param int $startPos Starting position (inclusive) - * @param int $endPos Ending position (exclusive) - * @param int|string $tokenType Token type to look for - * @return bool Whether the token occurs in the given range - */ - public function haveTokenInRange(int $startPos, int $endPos, $tokenType): bool { - $tokens = $this->tokens; - for ($pos = $startPos; $pos < $endPos; $pos++) { - if ($tokens[$pos]->is($tokenType)) { - return true; - } - } - return false; - } - - public function haveTagInRange(int $startPos, int $endPos): bool { - return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG) - || $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG); - } - - /** - * Get indentation before token position. - * - * @param int $pos Token position - * - * @return int Indentation depth (in spaces) - */ - public function getIndentationBefore(int $pos): int { - return $this->indentMap[$pos]; - } - - /** - * Get the code corresponding to a token offset range, optionally adjusted for indentation. - * - * @param int $from Token start position (inclusive) - * @param int $to Token end position (exclusive) - * @param int $indent By how much the code should be indented (can be negative as well) - * - * @return string Code corresponding to token range, adjusted for indentation - */ - public function getTokenCode(int $from, int $to, int $indent): string { - $tokens = $this->tokens; - $result = ''; - for ($pos = $from; $pos < $to; $pos++) { - $token = $tokens[$pos]; - $id = $token->id; - $text = $token->text; - if ($id === \T_CONSTANT_ENCAPSED_STRING || $id === \T_ENCAPSED_AND_WHITESPACE) { - $result .= $text; - } else { - // TODO Handle non-space indentation - if ($indent < 0) { - $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $text); - } elseif ($indent > 0) { - $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $text); - } else { - $result .= $text; - } - } - } - return $result; - } - - /** - * Precalculate the indentation at every token position. - * - * @return int[] Token position to indentation map - */ - private function calcIndentMap(): array { - $indentMap = []; - $indent = 0; - foreach ($this->tokens as $token) { - $indentMap[] = $indent; - - if ($token->id === \T_WHITESPACE) { - $content = $token->text; - $newlinePos = \strrpos($content, "\n"); - if (false !== $newlinePos) { - $indent = \strlen($content) - $newlinePos - 1; - } - } - } - - // Add a sentinel for one past end of the file - $indentMap[] = $indent; - - return $indentMap; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php deleted file mode 100644 index 7be41426e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php +++ /dev/null @@ -1,108 +0,0 @@ -[] Node type to reflection class map */ - private array $reflectionClassCache; - - /** @return mixed */ - public function decode(string $json) { - $value = json_decode($json, true); - if (json_last_error()) { - throw new \RuntimeException('JSON decoding error: ' . json_last_error_msg()); - } - - return $this->decodeRecursive($value); - } - - /** - * @param mixed $value - * @return mixed - */ - private function decodeRecursive($value) { - if (\is_array($value)) { - if (isset($value['nodeType'])) { - if ($value['nodeType'] === 'Comment' || $value['nodeType'] === 'Comment_Doc') { - return $this->decodeComment($value); - } - return $this->decodeNode($value); - } - return $this->decodeArray($value); - } - return $value; - } - - private function decodeArray(array $array): array { - $decodedArray = []; - foreach ($array as $key => $value) { - $decodedArray[$key] = $this->decodeRecursive($value); - } - return $decodedArray; - } - - private function decodeNode(array $value): Node { - $nodeType = $value['nodeType']; - if (!\is_string($nodeType)) { - throw new \RuntimeException('Node type must be a string'); - } - - $reflectionClass = $this->reflectionClassFromNodeType($nodeType); - $node = $reflectionClass->newInstanceWithoutConstructor(); - - if (isset($value['attributes'])) { - if (!\is_array($value['attributes'])) { - throw new \RuntimeException('Attributes must be an array'); - } - - $node->setAttributes($this->decodeArray($value['attributes'])); - } - - foreach ($value as $name => $subNode) { - if ($name === 'nodeType' || $name === 'attributes') { - continue; - } - - $node->$name = $this->decodeRecursive($subNode); - } - - return $node; - } - - private function decodeComment(array $value): Comment { - $className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class; - if (!isset($value['text'])) { - throw new \RuntimeException('Comment must have text'); - } - - return new $className( - $value['text'], - $value['line'] ?? -1, $value['filePos'] ?? -1, $value['tokenPos'] ?? -1, - $value['endLine'] ?? -1, $value['endFilePos'] ?? -1, $value['endTokenPos'] ?? -1 - ); - } - - /** @return \ReflectionClass */ - private function reflectionClassFromNodeType(string $nodeType): \ReflectionClass { - if (!isset($this->reflectionClassCache[$nodeType])) { - $className = $this->classNameFromNodeType($nodeType); - $this->reflectionClassCache[$nodeType] = new \ReflectionClass($className); - } - return $this->reflectionClassCache[$nodeType]; - } - - /** @return class-string */ - private function classNameFromNodeType(string $nodeType): string { - $className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\'); - if (class_exists($className)) { - return $className; - } - - $className .= '_'; - if (class_exists($className)) { - return $className; - } - - throw new \RuntimeException("Unknown node type \"$nodeType\""); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer.php deleted file mode 100644 index 5e2ece961..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer.php +++ /dev/null @@ -1,116 +0,0 @@ -postprocessTokens($tokens, $errorHandler); - - if (false !== $scream) { - ini_set('xdebug.scream', $scream); - } - - return $tokens; - } - - private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler): void { - $chr = $token->text; - if ($chr === "\0") { - // PHP cuts error message after null byte, so need special case - $errorMsg = 'Unexpected null byte'; - } else { - $errorMsg = sprintf( - 'Unexpected character "%s" (ASCII %d)', $chr, ord($chr) - ); - } - - $errorHandler->handleError(new Error($errorMsg, [ - 'startLine' => $token->line, - 'endLine' => $token->line, - 'startFilePos' => $token->pos, - 'endFilePos' => $token->pos, - ])); - } - - private function isUnterminatedComment(Token $token): bool { - return $token->is([\T_COMMENT, \T_DOC_COMMENT]) - && substr($token->text, 0, 2) === '/*' - && substr($token->text, -2) !== '*/'; - } - - /** - * @param list $tokens - */ - protected function postprocessTokens(array &$tokens, ErrorHandler $errorHandler): void { - // This function reports errors (bad characters and unterminated comments) in the token - // array, and performs certain canonicalizations: - // * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and - // T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types. - // * Add a sentinel token with ID 0. - - $numTokens = \count($tokens); - if ($numTokens === 0) { - // Empty input edge case: Just add the sentinel token. - $tokens[] = new Token(0, "\0", 1, 0); - return; - } - - for ($i = 0; $i < $numTokens; $i++) { - $token = $tokens[$i]; - if ($token->id === \T_BAD_CHARACTER) { - $this->handleInvalidCharacter($token, $errorHandler); - } - - if ($token->id === \ord('&')) { - $next = $i + 1; - while (isset($tokens[$next]) && $tokens[$next]->id === \T_WHITESPACE) { - $next++; - } - $followedByVarOrVarArg = isset($tokens[$next]) && - $tokens[$next]->is([\T_VARIABLE, \T_ELLIPSIS]); - $token->id = $followedByVarOrVarArg - ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; - } - } - - // Check for unterminated comment - $lastToken = $tokens[$numTokens - 1]; - if ($this->isUnterminatedComment($lastToken)) { - $errorHandler->handleError(new Error('Unterminated comment', [ - 'startLine' => $lastToken->line, - 'endLine' => $lastToken->getEndLine(), - 'startFilePos' => $lastToken->pos, - 'endFilePos' => $lastToken->getEndPos(), - ])); - } - - // Add sentinel token. - $tokens[] = new Token(0, "\0", $lastToken->getEndLine(), $lastToken->getEndPos()); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php deleted file mode 100644 index 934954cd3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +++ /dev/null @@ -1,226 +0,0 @@ - */ - private array $emulators = []; - - private PhpVersion $targetPhpVersion; - - private PhpVersion $hostPhpVersion; - - /** - * @param PhpVersion|null $phpVersion PHP version to emulate. Defaults to newest supported. - */ - public function __construct(?PhpVersion $phpVersion = null) { - $this->targetPhpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); - $this->hostPhpVersion = PhpVersion::getHostVersion(); - - $emulators = [ - new MatchTokenEmulator(), - new NullsafeTokenEmulator(), - new AttributeEmulator(), - new EnumTokenEmulator(), - new ReadonlyTokenEmulator(), - new ExplicitOctalEmulator(), - new ReadonlyFunctionTokenEmulator(), - ]; - - // Collect emulators that are relevant for the PHP version we're running - // and the PHP version we're targeting for emulation. - foreach ($emulators as $emulator) { - $emulatorPhpVersion = $emulator->getPhpVersion(); - if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) { - $this->emulators[] = $emulator; - } elseif ($this->isReverseEmulationNeeded($emulatorPhpVersion)) { - $this->emulators[] = new ReverseEmulator($emulator); - } - } - } - - public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array { - $emulators = array_filter($this->emulators, function ($emulator) use ($code) { - return $emulator->isEmulationNeeded($code); - }); - - if (empty($emulators)) { - // Nothing to emulate, yay - return parent::tokenize($code, $errorHandler); - } - - if ($errorHandler === null) { - $errorHandler = new ErrorHandler\Throwing(); - } - - $this->patches = []; - foreach ($emulators as $emulator) { - $code = $emulator->preprocessCode($code, $this->patches); - } - - $collector = new ErrorHandler\Collecting(); - $tokens = parent::tokenize($code, $collector); - $this->sortPatches(); - $tokens = $this->fixupTokens($tokens); - - $errors = $collector->getErrors(); - if (!empty($errors)) { - $this->fixupErrors($errors); - foreach ($errors as $error) { - $errorHandler->handleError($error); - } - } - - foreach ($emulators as $emulator) { - $tokens = $emulator->emulate($code, $tokens); - } - - return $tokens; - } - - private function isForwardEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { - return $this->hostPhpVersion->older($emulatorPhpVersion) - && $this->targetPhpVersion->newerOrEqual($emulatorPhpVersion); - } - - private function isReverseEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { - return $this->hostPhpVersion->newerOrEqual($emulatorPhpVersion) - && $this->targetPhpVersion->older($emulatorPhpVersion); - } - - private function sortPatches(): void { - // Patches may be contributed by different emulators. - // Make sure they are sorted by increasing patch position. - usort($this->patches, function ($p1, $p2) { - return $p1[0] <=> $p2[0]; - }); - } - - /** - * @param list $tokens - * @return list - */ - private function fixupTokens(array $tokens): array { - if (\count($this->patches) === 0) { - return $tokens; - } - - // Load first patch - $patchIdx = 0; - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - - // We use a manual loop over the tokens, because we modify the array on the fly - $posDelta = 0; - $lineDelta = 0; - for ($i = 0, $c = \count($tokens); $i < $c; $i++) { - $token = $tokens[$i]; - $pos = $token->pos; - $token->pos += $posDelta; - $token->line += $lineDelta; - $localPosDelta = 0; - $len = \strlen($token->text); - while ($patchPos >= $pos && $patchPos < $pos + $len) { - $patchTextLen = \strlen($patchText); - if ($patchType === 'remove') { - if ($patchPos === $pos && $patchTextLen === $len) { - // Remove token entirely - array_splice($tokens, $i, 1, []); - $i--; - $c--; - } else { - // Remove from token string - $token->text = substr_replace( - $token->text, '', $patchPos - $pos + $localPosDelta, $patchTextLen - ); - $localPosDelta -= $patchTextLen; - } - $lineDelta -= \substr_count($patchText, "\n"); - } elseif ($patchType === 'add') { - // Insert into the token string - $token->text = substr_replace( - $token->text, $patchText, $patchPos - $pos + $localPosDelta, 0 - ); - $localPosDelta += $patchTextLen; - $lineDelta += \substr_count($patchText, "\n"); - } elseif ($patchType === 'replace') { - // Replace inside the token string - $token->text = substr_replace( - $token->text, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen - ); - } else { - assert(false); - } - - // Fetch the next patch - $patchIdx++; - if ($patchIdx >= \count($this->patches)) { - // No more patches. However, we still need to adjust position. - $patchPos = \PHP_INT_MAX; - break; - } - - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - } - - $posDelta += $localPosDelta; - } - return $tokens; - } - - /** - * Fixup line and position information in errors. - * - * @param Error[] $errors - */ - private function fixupErrors(array $errors): void { - foreach ($errors as $error) { - $attrs = $error->getAttributes(); - - $posDelta = 0; - $lineDelta = 0; - foreach ($this->patches as $patch) { - list($patchPos, $patchType, $patchText) = $patch; - if ($patchPos >= $attrs['startFilePos']) { - // No longer relevant - break; - } - - if ($patchType === 'add') { - $posDelta += strlen($patchText); - $lineDelta += substr_count($patchText, "\n"); - } elseif ($patchType === 'remove') { - $posDelta -= strlen($patchText); - $lineDelta -= substr_count($patchText, "\n"); - } - } - - $attrs['startFilePos'] += $posDelta; - $attrs['endFilePos'] += $posDelta; - $attrs['startLine'] += $lineDelta; - $attrs['endLine'] += $lineDelta; - $error->setAttributes($attrs); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php deleted file mode 100644 index 2c12f33ae..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +++ /dev/null @@ -1,49 +0,0 @@ -text === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '[') { - array_splice($tokens, $i, 2, [ - new Token(\T_ATTRIBUTE, '#[', $token->line, $token->pos), - ]); - $c--; - continue; - } - } - - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - // TODO - return $tokens; - } - - public function preprocessCode(string $code, array &$patches): string { - $pos = 0; - while (false !== $pos = strpos($code, '#[', $pos)) { - // Replace #[ with %[ - $code[$pos] = '%'; - $patches[] = [$pos, 'replace', '#']; - $pos += 2; - } - return $code; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php deleted file mode 100644 index 5418f52c0..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +++ /dev/null @@ -1,26 +0,0 @@ -id === \T_WHITESPACE - && $tokens[$pos + 2]->id === \T_STRING; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php deleted file mode 100644 index 9cadf420c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +++ /dev/null @@ -1,45 +0,0 @@ -id == \T_LNUMBER && $token->text === '0' && - isset($tokens[$i + 1]) && $tokens[$i + 1]->id == \T_STRING && - preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1]->text) - ) { - $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1]->text); - array_splice($tokens, $i, 2, [ - new Token($tokenKind, '0' . $tokens[$i + 1]->text, $token->line, $token->pos), - ]); - $c--; - } - } - return $tokens; - } - - private function resolveIntegerOrFloatToken(string $str): int { - $str = substr($str, 1); - $str = str_replace('_', '', $str); - $num = octdec($str); - return is_float($num) ? \T_DNUMBER : \T_LNUMBER; - } - - public function reverseEmulate(string $code, array $tokens): array { - // Explicit octals were not legal code previously, don't bother. - return $tokens; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php deleted file mode 100644 index 9803f9968..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ /dev/null @@ -1,56 +0,0 @@ -getKeywordString()) !== false; - } - - /** @param Token[] $tokens */ - protected function isKeywordContext(array $tokens, int $pos): bool { - $previousNonSpaceToken = $this->getPreviousNonSpaceToken($tokens, $pos); - return $previousNonSpaceToken === null || $previousNonSpaceToken->id !== \T_OBJECT_OPERATOR; - } - - public function emulate(string $code, array $tokens): array { - $keywordString = $this->getKeywordString(); - foreach ($tokens as $i => $token) { - if ($token->id === T_STRING && strtolower($token->text) === $keywordString - && $this->isKeywordContext($tokens, $i)) { - $token->id = $this->getKeywordToken(); - } - } - - return $tokens; - } - - /** @param Token[] $tokens */ - private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { - for ($i = $start - 1; $i >= 0; --$i) { - if ($tokens[$i]->id === T_WHITESPACE) { - continue; - } - - return $tokens[$i]; - } - - return null; - } - - public function reverseEmulate(string $code, array $tokens): array { - $keywordToken = $this->getKeywordToken(); - foreach ($tokens as $token) { - if ($token->id === $keywordToken) { - $token->id = \T_STRING; - } - } - - return $tokens; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php deleted file mode 100644 index 0fa5fbc2f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +++ /dev/null @@ -1,19 +0,0 @@ -') !== false; - } - - public function emulate(string $code, array $tokens): array { - // We need to manually iterate and manage a count because we'll change - // the tokens array on the way - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if ($token->text === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id === \T_OBJECT_OPERATOR) { - array_splice($tokens, $i, 2, [ - new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), - ]); - $c--; - continue; - } - - // Handle ?-> inside encapsed string. - if ($token->id === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) - && $tokens[$i - 1]->id === \T_VARIABLE - && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $token->text, $matches) - ) { - $replacement = [ - new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), - new Token(\T_STRING, $matches[1], $token->line, $token->pos + 3), - ]; - $matchLen = \strlen($matches[0]); - if ($matchLen !== \strlen($token->text)) { - $replacement[] = new Token( - \T_ENCAPSED_AND_WHITESPACE, - \substr($token->text, $matchLen), - $token->line, $token->pos + $matchLen - ); - } - array_splice($tokens, $i, 1, $replacement); - $c += \count($replacement) - 1; - continue; - } - } - - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - // ?-> was not valid code previously, don't bother. - return $tokens; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php deleted file mode 100644 index 37240f79f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +++ /dev/null @@ -1,31 +0,0 @@ -text === '(' || - ($tokens[$pos + 1]->id === \T_WHITESPACE && - isset($tokens[$pos + 2]) && - $tokens[$pos + 2]->text === '('))); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php deleted file mode 100644 index 851b5c4ac..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +++ /dev/null @@ -1,37 +0,0 @@ -emulator = $emulator; - } - - public function getPhpVersion(): PhpVersion { - return $this->emulator->getPhpVersion(); - } - - public function isEmulationNeeded(string $code): bool { - return $this->emulator->isEmulationNeeded($code); - } - - public function emulate(string $code, array $tokens): array { - return $this->emulator->reverseEmulate($code, $tokens); - } - - public function reverseEmulate(string $code, array $tokens): array { - return $this->emulator->emulate($code, $tokens); - } - - public function preprocessCode(string $code, array &$patches): string { - return $code; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php deleted file mode 100644 index fec2f19f4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +++ /dev/null @@ -1,30 +0,0 @@ - [aliasName => originalName]] */ - protected array $aliases = []; - - /** @var Name[][] Same as $aliases but preserving original case */ - protected array $origAliases = []; - - /** @var ErrorHandler Error handler */ - protected ErrorHandler $errorHandler; - - /** - * Create a name context. - * - * @param ErrorHandler $errorHandler Error handling used to report errors - */ - public function __construct(ErrorHandler $errorHandler) { - $this->errorHandler = $errorHandler; - } - - /** - * Start a new namespace. - * - * This also resets the alias table. - * - * @param Name|null $namespace Null is the global namespace - */ - public function startNamespace(?Name $namespace = null): void { - $this->namespace = $namespace; - $this->origAliases = $this->aliases = [ - Stmt\Use_::TYPE_NORMAL => [], - Stmt\Use_::TYPE_FUNCTION => [], - Stmt\Use_::TYPE_CONSTANT => [], - ]; - } - - /** - * Add an alias / import. - * - * @param Name $name Original name - * @param string $aliasName Aliased name - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* - * @param array $errorAttrs Attributes to use to report an error - */ - public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void { - // Constant names are case sensitive, everything else case insensitive - if ($type === Stmt\Use_::TYPE_CONSTANT) { - $aliasLookupName = $aliasName; - } else { - $aliasLookupName = strtolower($aliasName); - } - - if (isset($this->aliases[$type][$aliasLookupName])) { - $typeStringMap = [ - Stmt\Use_::TYPE_NORMAL => '', - Stmt\Use_::TYPE_FUNCTION => 'function ', - Stmt\Use_::TYPE_CONSTANT => 'const ', - ]; - - $this->errorHandler->handleError(new Error( - sprintf( - 'Cannot use %s%s as %s because the name is already in use', - $typeStringMap[$type], $name, $aliasName - ), - $errorAttrs - )); - return; - } - - $this->aliases[$type][$aliasLookupName] = $name; - $this->origAliases[$type][$aliasName] = $name; - } - - /** - * Get current namespace. - * - * @return null|Name Namespace (or null if global namespace) - */ - public function getNamespace(): ?Name { - return $this->namespace; - } - - /** - * Get resolved name. - * - * @param Name $name Name to resolve - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} - * - * @return null|Name Resolved name, or null if static resolution is not possible - */ - public function getResolvedName(Name $name, int $type): ?Name { - // don't resolve special class names - if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) { - if (!$name->isUnqualified()) { - $this->errorHandler->handleError(new Error( - sprintf("'\\%s' is an invalid class name", $name->toString()), - $name->getAttributes() - )); - } - return $name; - } - - // fully qualified names are already resolved - if ($name->isFullyQualified()) { - return $name; - } - - // Try to resolve aliases - if (null !== $resolvedName = $this->resolveAlias($name, $type)) { - return $resolvedName; - } - - if ($type !== Stmt\Use_::TYPE_NORMAL && $name->isUnqualified()) { - if (null === $this->namespace) { - // outside of a namespace unaliased unqualified is same as fully qualified - return new FullyQualified($name, $name->getAttributes()); - } - - // Cannot resolve statically - return null; - } - - // if no alias exists prepend current namespace - return FullyQualified::concat($this->namespace, $name, $name->getAttributes()); - } - - /** - * Get resolved class name. - * - * @param Name $name Class ame to resolve - * - * @return Name Resolved name - */ - public function getResolvedClassName(Name $name): Name { - return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL); - } - - /** - * Get possible ways of writing a fully qualified name (e.g., by making use of aliases). - * - * @param string $name Fully-qualified name (without leading namespace separator) - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* - * - * @return Name[] Possible representations of the name - */ - public function getPossibleNames(string $name, int $type): array { - $lcName = strtolower($name); - - if ($type === Stmt\Use_::TYPE_NORMAL) { - // self, parent and static must always be unqualified - if ($lcName === "self" || $lcName === "parent" || $lcName === "static") { - return [new Name($name)]; - } - } - - // Collect possible ways to write this name, starting with the fully-qualified name - $possibleNames = [new FullyQualified($name)]; - - if (null !== $nsRelativeName = $this->getNamespaceRelativeName($name, $lcName, $type)) { - // Make sure there is no alias that makes the normally namespace-relative name - // into something else - if (null === $this->resolveAlias($nsRelativeName, $type)) { - $possibleNames[] = $nsRelativeName; - } - } - - // Check for relevant namespace use statements - foreach ($this->origAliases[Stmt\Use_::TYPE_NORMAL] as $alias => $orig) { - $lcOrig = $orig->toLowerString(); - if (0 === strpos($lcName, $lcOrig . '\\')) { - $possibleNames[] = new Name($alias . substr($name, strlen($lcOrig))); - } - } - - // Check for relevant type-specific use statements - foreach ($this->origAliases[$type] as $alias => $orig) { - if ($type === Stmt\Use_::TYPE_CONSTANT) { - // Constants are are complicated-sensitive - $normalizedOrig = $this->normalizeConstName($orig->toString()); - if ($normalizedOrig === $this->normalizeConstName($name)) { - $possibleNames[] = new Name($alias); - } - } else { - // Everything else is case-insensitive - if ($orig->toLowerString() === $lcName) { - $possibleNames[] = new Name($alias); - } - } - } - - return $possibleNames; - } - - /** - * Get shortest representation of this fully-qualified name. - * - * @param string $name Fully-qualified name (without leading namespace separator) - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* - * - * @return Name Shortest representation - */ - public function getShortName(string $name, int $type): Name { - $possibleNames = $this->getPossibleNames($name, $type); - - // Find shortest name - $shortestName = null; - $shortestLength = \INF; - foreach ($possibleNames as $possibleName) { - $length = strlen($possibleName->toCodeString()); - if ($length < $shortestLength) { - $shortestName = $possibleName; - $shortestLength = $length; - } - } - - return $shortestName; - } - - private function resolveAlias(Name $name, int $type): ?FullyQualified { - $firstPart = $name->getFirst(); - - if ($name->isQualified()) { - // resolve aliases for qualified names, always against class alias table - $checkName = strtolower($firstPart); - if (isset($this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName])) { - $alias = $this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName]; - return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes()); - } - } elseif ($name->isUnqualified()) { - // constant aliases are case-sensitive, function aliases case-insensitive - $checkName = $type === Stmt\Use_::TYPE_CONSTANT ? $firstPart : strtolower($firstPart); - if (isset($this->aliases[$type][$checkName])) { - // resolve unqualified aliases - return new FullyQualified($this->aliases[$type][$checkName], $name->getAttributes()); - } - } - - // No applicable aliases - return null; - } - - private function getNamespaceRelativeName(string $name, string $lcName, int $type): ?Name { - if (null === $this->namespace) { - return new Name($name); - } - - if ($type === Stmt\Use_::TYPE_CONSTANT) { - // The constants true/false/null always resolve to the global symbols, even inside a - // namespace, so they may be used without qualification - if ($lcName === "true" || $lcName === "false" || $lcName === "null") { - return new Name($name); - } - } - - $namespacePrefix = strtolower($this->namespace . '\\'); - if (0 === strpos($lcName, $namespacePrefix)) { - return new Name(substr($name, strlen($namespacePrefix))); - } - - return null; - } - - private function normalizeConstName(string $name): string { - $nsSep = strrpos($name, '\\'); - if (false === $nsSep) { - return $name; - } - - // Constants have case-insensitive namespace and case-sensitive short-name - $ns = substr($name, 0, $nsSep); - $shortName = substr($name, $nsSep + 1); - return strtolower($ns) . '\\' . $shortName; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node.php deleted file mode 100644 index 258e45160..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node.php +++ /dev/null @@ -1,146 +0,0 @@ - - */ - public function getAttributes(): array; - - /** - * Replaces all the attributes of this node. - * - * @param array $attributes - */ - public function setAttributes(array $attributes): void; -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php deleted file mode 100644 index 6680efac9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php +++ /dev/null @@ -1,44 +0,0 @@ - $attributes Additional attributes - * @param Identifier|null $name Parameter name (for named parameters) - */ - public function __construct( - Expr $value, bool $byRef = false, bool $unpack = false, array $attributes = [], - ?Identifier $name = null - ) { - $this->attributes = $attributes; - $this->name = $name; - $this->value = $value; - $this->byRef = $byRef; - $this->unpack = $unpack; - } - - public function getSubNodeNames(): array { - return ['name', 'value', 'byRef', 'unpack']; - } - - public function getType(): string { - return 'Arg'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php deleted file mode 100644 index 9d892436a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php +++ /dev/null @@ -1,33 +0,0 @@ - Attribute arguments */ - public array $args; - - /** - * @param Node\Name $name Attribute name - * @param list $args Attribute arguments - * @param array $attributes Additional node attributes - */ - public function __construct(Name $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['name', 'args']; - } - - public function getType(): string { - return 'Attribute'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php deleted file mode 100644 index b9eb588d0..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +++ /dev/null @@ -1,27 +0,0 @@ - $attributes Additional node attributes - */ - public function __construct(array $attrs, array $attributes = []) { - $this->attributes = $attributes; - $this->attrs = $attrs; - } - - public function getSubNodeNames(): array { - return ['attrs']; - } - - public function getType(): string { - return 'AttributeGroup'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php deleted file mode 100644 index 05a5e5eef..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +++ /dev/null @@ -1,13 +0,0 @@ - $attributes Additional attributes - */ - public function __construct($name, Expr $value, array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['name', 'value']; - } - - public function getType(): string { - return 'Const'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php deleted file mode 100644 index 8b7dbb6ca..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php +++ /dev/null @@ -1,8 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->dim = $dim; - } - - public function getSubNodeNames(): array { - return ['var', 'dim']; - } - - public function getType(): string { - return 'Expr_ArrayDimFetch'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php deleted file mode 100644 index 490ac9379..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +++ /dev/null @@ -1,3 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $items = [], array $attributes = []) { - $this->attributes = $attributes; - $this->items = $items; - } - - public function getSubNodeNames(): array { - return ['items']; - } - - public function getType(): string { - return 'Expr_Array'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php deleted file mode 100644 index 0e98ce9f6..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +++ /dev/null @@ -1,84 +0,0 @@ - false : Whether the closure is static - * 'byRef' => false : Whether to return by reference - * 'params' => array() : Parameters - * 'returnType' => null : Return type - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct(array $subNodes, array $attributes = []) { - $this->attributes = $attributes; - $this->static = $subNodes['static'] ?? false; - $this->byRef = $subNodes['byRef'] ?? false; - $this->params = $subNodes['params'] ?? []; - $this->returnType = $subNodes['returnType'] ?? null; - $this->expr = $subNodes['expr']; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr']; - } - - public function returnsByRef(): bool { - return $this->byRef; - } - - public function getParams(): array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - public function getAttrGroups(): array { - return $this->attrGroups; - } - - /** - * @return Node\Stmt\Return_[] - */ - public function getStmts(): array { - return [new Node\Stmt\Return_($this->expr)]; - } - - public function getType(): string { - return 'Expr_ArrowFunction'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php deleted file mode 100644 index dcbf84dd4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['var', 'expr']; - } - - public function getType(): string { - return 'Expr_Assign'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php deleted file mode 100644 index 5209a64b1..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['var', 'expr']; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php deleted file mode 100644 index 4f3623fb6..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +++ /dev/null @@ -1,11 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['var', 'expr']; - } - - public function getType(): string { - return 'Expr_AssignRef'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php deleted file mode 100644 index 1b92bd4f5..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +++ /dev/null @@ -1,37 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $left, Expr $right, array $attributes = []) { - $this->attributes = $attributes; - $this->left = $left; - $this->right = $right; - } - - public function getSubNodeNames(): array { - return ['left', 'right']; - } - - /** - * Get the operator sigil for this binary operation. - * - * In the case there are multiple possible sigils for an operator, this method does not - * necessarily return the one used in the parsed code. - */ - abstract public function getOperatorSigil(): string; -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php deleted file mode 100644 index 5930c5413..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +++ /dev/null @@ -1,15 +0,0 @@ -'; - } - - public function getType(): string { - return 'Expr_BinaryOp_Greater'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php deleted file mode 100644 index 4d440b100..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +++ /dev/null @@ -1,15 +0,0 @@ -='; - } - - public function getType(): string { - return 'Expr_BinaryOp_GreaterOrEqual'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php deleted file mode 100644 index e25d17cd9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +++ /dev/null @@ -1,15 +0,0 @@ ->'; - } - - public function getType(): string { - return 'Expr_BinaryOp_ShiftRight'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php deleted file mode 100644 index 01e9b2310..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +++ /dev/null @@ -1,15 +0,0 @@ -'; - } - - public function getType(): string { - return 'Expr_BinaryOp_Spaceship'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php deleted file mode 100644 index b7175a7ae..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_BitwiseNot'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php deleted file mode 100644 index c66d23326..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_BooleanNot'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php deleted file mode 100644 index 2af2245ba..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ - abstract public function getRawArgs(): array; - - /** - * Returns whether this call expression is actually a first class callable. - */ - public function isFirstClassCallable(): bool { - $rawArgs = $this->getRawArgs(); - return count($rawArgs) === 1 && current($rawArgs) instanceof VariadicPlaceholder; - } - - /** - * Assert that this is not a first-class callable and return only ordinary Args. - * - * @return Arg[] - */ - public function getArgs(): array { - assert(!$this->isFirstClassCallable()); - return $this->getRawArgs(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php deleted file mode 100644 index c2751de47..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +++ /dev/null @@ -1,25 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php deleted file mode 100644 index 471cb824a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +++ /dev/null @@ -1,11 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node $class, $name, array $attributes = []) { - $this->attributes = $attributes; - $this->class = $class; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['class', 'name']; - } - - public function getType(): string { - return 'Expr_ClassConstFetch'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php deleted file mode 100644 index d85bc9ab4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Clone'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php deleted file mode 100644 index 0680446f3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +++ /dev/null @@ -1,86 +0,0 @@ - false : Whether the closure is static - * 'byRef' => false : Whether to return by reference - * 'params' => array(): Parameters - * 'uses' => array(): use()s - * 'returnType' => null : Return type - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attributes groups - * @param array $attributes Additional attributes - */ - public function __construct(array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->static = $subNodes['static'] ?? false; - $this->byRef = $subNodes['byRef'] ?? false; - $this->params = $subNodes['params'] ?? []; - $this->uses = $subNodes['uses'] ?? []; - $this->returnType = $subNodes['returnType'] ?? null; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts']; - } - - public function returnsByRef(): bool { - return $this->byRef; - } - - public function getParams(): array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - /** @return Node\Stmt[] */ - public function getStmts(): array { - return $this->stmts; - } - - public function getAttrGroups(): array { - return $this->attrGroups; - } - - public function getType(): string { - return 'Expr_Closure'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php deleted file mode 100644 index 681ff317b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +++ /dev/null @@ -1,3 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Name $name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - } - - public function getSubNodeNames(): array { - return ['name']; - } - - public function getType(): string { - return 'Expr_ConstFetch'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php deleted file mode 100644 index d2f30506b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Empty'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php deleted file mode 100644 index 43010ac45..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +++ /dev/null @@ -1,30 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $attributes = []) { - $this->attributes = $attributes; - } - - public function getSubNodeNames(): array { - return []; - } - - public function getType(): string { - return 'Expr_Error'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php deleted file mode 100644 index 32625a233..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_ErrorSuppress'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php deleted file mode 100644 index 5120b1b4f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Eval'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php deleted file mode 100644 index cf0024669..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Expr $expr = null, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Exit'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php deleted file mode 100644 index 0b85840d8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +++ /dev/null @@ -1,38 +0,0 @@ - Arguments */ - public array $args; - - /** - * Constructs a function call node. - * - * @param Node\Name|Expr $name Function name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Node $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['name', 'args']; - } - - public function getType(): string { - return 'Expr_FuncCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php deleted file mode 100644 index e1187b194..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +++ /dev/null @@ -1,38 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, int $type, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - $this->type = $type; - } - - public function getSubNodeNames(): array { - return ['expr', 'type']; - } - - public function getType(): string { - return 'Expr_Include'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php deleted file mode 100644 index a2783cb3a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +++ /dev/null @@ -1,35 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, Node $class, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - $this->class = $class; - } - - public function getSubNodeNames(): array { - return ['expr', 'class']; - } - - public function getType(): string { - return 'Expr_Instanceof'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php deleted file mode 100644 index 4f80fff72..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $vars, array $attributes = []) { - $this->attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames(): array { - return ['vars']; - } - - public function getType(): string { - return 'Expr_Isset'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php deleted file mode 100644 index 496b7b385..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +++ /dev/null @@ -1,34 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $items, array $attributes = []) { - $this->attributes = $attributes; - $this->items = $items; - } - - public function getSubNodeNames(): array { - return ['items']; - } - - public function getType(): string { - return 'Expr_List'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php deleted file mode 100644 index cd028a2da..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +++ /dev/null @@ -1,32 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->arms = $arms; - } - - public function getSubNodeNames(): array { - return ['cond', 'arms']; - } - - public function getType(): string { - return 'Expr_Match'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php deleted file mode 100644 index 2703c75d8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +++ /dev/null @@ -1,45 +0,0 @@ - Arguments */ - public array $args; - - /** - * Constructs a function call node. - * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['var', 'name', 'args']; - } - - public function getType(): string { - return 'Expr_MethodCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php deleted file mode 100644 index eedaaa1e3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +++ /dev/null @@ -1,40 +0,0 @@ - Arguments */ - public array $args; - - /** - * Constructs a function call node. - * - * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Node $class, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->class = $class; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['class', 'args']; - } - - public function getType(): string { - return 'Expr_New'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php deleted file mode 100644 index a151f7152..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +++ /dev/null @@ -1,45 +0,0 @@ - Arguments */ - public array $args; - - /** - * Constructs a nullsafe method call node. - * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['var', 'name', 'args']; - } - - public function getType(): string { - return 'Expr_NullsafeMethodCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php deleted file mode 100644 index 6f73a16d7..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +++ /dev/null @@ -1,35 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, $name, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['var', 'name']; - } - - public function getType(): string { - return 'Expr_NullsafePropertyFetch'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php deleted file mode 100644 index 3dca8fdc5..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames(): array { - return ['var']; - } - - public function getType(): string { - return 'Expr_PostDec'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php deleted file mode 100644 index bc990c303..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames(): array { - return ['var']; - } - - public function getType(): string { - return 'Expr_PostInc'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php deleted file mode 100644 index 2f1687301..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames(): array { - return ['var']; - } - - public function getType(): string { - return 'Expr_PreDec'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php deleted file mode 100644 index fd455f55b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames(): array { - return ['var']; - } - - public function getType(): string { - return 'Expr_PreInc'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php deleted file mode 100644 index 605747604..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Print'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php deleted file mode 100644 index 8c416a8c4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +++ /dev/null @@ -1,35 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, $name, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['var', 'name']; - } - - public function getType(): string { - return 'Expr_PropertyFetch'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php deleted file mode 100644 index e40035127..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +++ /dev/null @@ -1,30 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $parts, array $attributes = []) { - $this->attributes = $attributes; - $this->parts = $parts; - } - - public function getSubNodeNames(): array { - return ['parts']; - } - - public function getType(): string { - return 'Expr_ShellExec'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php deleted file mode 100644 index 707f34b66..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +++ /dev/null @@ -1,45 +0,0 @@ - Arguments */ - public array $args; - - /** - * Constructs a static method call node. - * - * @param Node\Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Node $class, $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->class = $class; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['class', 'name', 'args']; - } - - public function getType(): string { - return 'Expr_StaticCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php deleted file mode 100644 index 4836a65b2..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +++ /dev/null @@ -1,36 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node $class, $name, array $attributes = []) { - $this->attributes = $attributes; - $this->class = $class; - $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['class', 'name']; - } - - public function getType(): string { - return 'Expr_StaticPropertyFetch'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php deleted file mode 100644 index d4837e640..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +++ /dev/null @@ -1,37 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->if = $if; - $this->else = $else; - } - - public function getSubNodeNames(): array { - return ['cond', 'if', 'else']; - } - - public function getType(): string { - return 'Expr_Ternary'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php deleted file mode 100644 index ee49f835f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Throw'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php deleted file mode 100644 index cd06f74ba..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_UnaryMinus'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php deleted file mode 100644 index 1b44f7b3e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_UnaryPlus'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php deleted file mode 100644 index bab74920a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct($name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - } - - public function getSubNodeNames(): array { - return ['name']; - } - - public function getType(): string { - return 'Expr_Variable'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php deleted file mode 100644 index 5cff88f86..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_YieldFrom'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php deleted file mode 100644 index bd81e69b3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) { - $this->attributes = $attributes; - $this->key = $key; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['key', 'value']; - } - - public function getType(): string { - return 'Expr_Yield'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php deleted file mode 100644 index 58f653a89..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +++ /dev/null @@ -1,40 +0,0 @@ - */ - private static array $specialClassNames = [ - 'self' => true, - 'parent' => true, - 'static' => true, - ]; - - /** - * Constructs an identifier node. - * - * @param string $name Identifier as string - * @param array $attributes Additional attributes - */ - public function __construct(string $name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - } - - public function getSubNodeNames(): array { - return ['name']; - } - - /** - * Get identifier as string. - * - * @return string Identifier as string. - */ - public function toString(): string { - return $this->name; - } - - /** - * Get lowercased identifier as string. - * - * @return string Lowercased identifier as string - */ - public function toLowerString(): string { - return strtolower($this->name); - } - - /** - * Checks whether the identifier is a special class name (self, parent or static). - * - * @return bool Whether identifier is a special class name - */ - public function isSpecialClassName(): bool { - return isset(self::$specialClassNames[strtolower($this->name)]); - } - - /** - * Get identifier as string. - * - * @return string Identifier as string - */ - public function __toString(): string { - return $this->name; - } - - public function getType(): string { - return 'Identifier'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php deleted file mode 100644 index 3b39cf105..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +++ /dev/null @@ -1,27 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $types, array $attributes = []) { - $this->attributes = $attributes; - $this->types = $types; - } - - public function getSubNodeNames(): array { - return ['types']; - } - - public function getType(): string { - return 'IntersectionType'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php deleted file mode 100644 index 2927f029d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +++ /dev/null @@ -1,30 +0,0 @@ - */ - public ?array $conds; - /** @var Node\Expr */ - public Expr $body; - - /** - * @param null|list $conds - */ - public function __construct(?array $conds, Node\Expr $body, array $attributes = []) { - $this->conds = $conds; - $this->body = $body; - $this->attributes = $attributes; - } - - public function getSubNodeNames(): array { - return ['conds', 'body']; - } - - public function getType(): string { - return 'MatchArm'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php deleted file mode 100644 index 26b863e40..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php +++ /dev/null @@ -1,269 +0,0 @@ - */ - private static array $specialClassNames = [ - 'self' => true, - 'parent' => true, - 'static' => true, - ]; - - /** - * Constructs a name node. - * - * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) - * @param array $attributes Additional attributes - */ - final public function __construct($name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = self::prepareName($name); - } - - public function getSubNodeNames(): array { - return ['name']; - } - - /** - * Get parts of name (split by the namespace separator). - * - * @return string[] Parts of name - */ - public function getParts(): array { - return \explode('\\', $this->name); - } - - /** - * Gets the first part of the name, i.e. everything before the first namespace separator. - * - * @return string First part of the name - */ - public function getFirst(): string { - if (false !== $pos = \strpos($this->name, '\\')) { - return \substr($this->name, 0, $pos); - } - return $this->name; - } - - /** - * Gets the last part of the name, i.e. everything after the last namespace separator. - * - * @return string Last part of the name - */ - public function getLast(): string { - if (false !== $pos = \strrpos($this->name, '\\')) { - return \substr($this->name, $pos + 1); - } - return $this->name; - } - - /** - * Checks whether the name is unqualified. (E.g. Name) - * - * @return bool Whether the name is unqualified - */ - public function isUnqualified(): bool { - return false === \strpos($this->name, '\\'); - } - - /** - * Checks whether the name is qualified. (E.g. Name\Name) - * - * @return bool Whether the name is qualified - */ - public function isQualified(): bool { - return false !== \strpos($this->name, '\\'); - } - - /** - * Checks whether the name is fully qualified. (E.g. \Name) - * - * @return bool Whether the name is fully qualified - */ - public function isFullyQualified(): bool { - return false; - } - - /** - * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name) - * - * @return bool Whether the name is relative - */ - public function isRelative(): bool { - return false; - } - - /** - * Returns a string representation of the name itself, without taking the name type into - * account (e.g., not including a leading backslash for fully qualified names). - * - * @return string String representation - */ - public function toString(): string { - return $this->name; - } - - /** - * Returns a string representation of the name as it would occur in code (e.g., including - * leading backslash for fully qualified names. - * - * @return string String representation - */ - public function toCodeString(): string { - return $this->toString(); - } - - /** - * Returns lowercased string representation of the name, without taking the name type into - * account (e.g., no leading backslash for fully qualified names). - * - * @return string Lowercased string representation - */ - public function toLowerString(): string { - return strtolower($this->name); - } - - /** - * Checks whether the identifier is a special class name (self, parent or static). - * - * @return bool Whether identifier is a special class name - */ - public function isSpecialClassName(): bool { - return isset(self::$specialClassNames[strtolower($this->name)]); - } - - /** - * Returns a string representation of the name by imploding the namespace parts with the - * namespace separator. - * - * @return string String representation - */ - public function __toString(): string { - return $this->name; - } - - /** - * Gets a slice of a name (similar to array_slice). - * - * This method returns a new instance of the same type as the original and with the same - * attributes. - * - * If the slice is empty, null is returned. The null value will be correctly handled in - * concatenations using concat(). - * - * Offset and length have the same meaning as in array_slice(). - * - * @param int $offset Offset to start the slice at (may be negative) - * @param int|null $length Length of the slice (may be negative) - * - * @return static|null Sliced name - */ - public function slice(int $offset, ?int $length = null) { - if ($offset === 1 && $length === null) { - // Short-circuit the common case. - if (false !== $pos = \strpos($this->name, '\\')) { - return new static(\substr($this->name, $pos + 1)); - } - return null; - } - - $parts = \explode('\\', $this->name); - $numParts = \count($parts); - - $realOffset = $offset < 0 ? $offset + $numParts : $offset; - if ($realOffset < 0 || $realOffset > $numParts) { - throw new \OutOfBoundsException(sprintf('Offset %d is out of bounds', $offset)); - } - - if (null === $length) { - $realLength = $numParts - $realOffset; - } else { - $realLength = $length < 0 ? $length + $numParts - $realOffset : $length; - if ($realLength < 0 || $realLength > $numParts - $realOffset) { - throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length)); - } - } - - if ($realLength === 0) { - // Empty slice is represented as null - return null; - } - - return new static(array_slice($parts, $realOffset, $realLength), $this->attributes); - } - - /** - * Concatenate two names, yielding a new Name instance. - * - * The type of the generated instance depends on which class this method is called on, for - * example Name\FullyQualified::concat() will yield a Name\FullyQualified instance. - * - * If one of the arguments is null, a new instance of the other name will be returned. If both - * arguments are null, null will be returned. As such, writing - * Name::concat($namespace, $shortName) - * where $namespace is a Name node or null will work as expected. - * - * @param string|string[]|self|null $name1 The first name - * @param string|string[]|self|null $name2 The second name - * @param array $attributes Attributes to assign to concatenated name - * - * @return static|null Concatenated name - */ - public static function concat($name1, $name2, array $attributes = []) { - if (null === $name1 && null === $name2) { - return null; - } - if (null === $name1) { - return new static($name2, $attributes); - } - if (null === $name2) { - return new static($name1, $attributes); - } else { - return new static( - self::prepareName($name1) . '\\' . self::prepareName($name2), $attributes - ); - } - } - - /** - * Prepares a (string, array or Name node) name for use in name changing methods by converting - * it to a string. - * - * @param string|string[]|self $name Name to prepare - * - * @return string Prepared name - */ - private static function prepareName($name): string { - if (\is_string($name)) { - if ('' === $name) { - throw new \InvalidArgumentException('Name cannot be empty'); - } - - return $name; - } - if (\is_array($name)) { - if (empty($name)) { - throw new \InvalidArgumentException('Name cannot be empty'); - } - - return implode('\\', $name); - } - if ($name instanceof self) { - return $name->name; - } - - throw new \InvalidArgumentException( - 'Expected string, array of parts or Name instance' - ); - } - - public function getType(): string { - return 'Name'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php deleted file mode 100644 index 21183786b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +++ /dev/null @@ -1,49 +0,0 @@ -toString(); - } - - public function getType(): string { - return 'Name_FullyQualified'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php deleted file mode 100644 index 0226a4e48..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +++ /dev/null @@ -1,49 +0,0 @@ -toString(); - } - - public function getType(): string { - return 'Name_Relative'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php deleted file mode 100644 index b99acd135..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node $type, array $attributes = []) { - $this->attributes = $attributes; - $this->type = $type; - } - - public function getSubNodeNames(): array { - return ['type']; - } - - public function getType(): string { - return 'NullableType'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php deleted file mode 100644 index 0e9ff0e2d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +++ /dev/null @@ -1,84 +0,0 @@ - $attributes Additional attributes - * @param int $flags Optional visibility flags - * @param list $attrGroups PHP attribute groups - */ - public function __construct( - Expr $var, ?Expr $default = null, ?Node $type = null, - bool $byRef = false, bool $variadic = false, - array $attributes = [], - int $flags = 0, - array $attrGroups = [] - ) { - $this->attributes = $attributes; - $this->type = $type; - $this->byRef = $byRef; - $this->variadic = $variadic; - $this->var = $var; - $this->default = $default; - $this->flags = $flags; - $this->attrGroups = $attrGroups; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default']; - } - - public function getType(): string { - return 'Param'; - } - - /** - * Whether this parameter uses constructor property promotion. - */ - public function isPromoted(): bool { - return $this->flags !== 0; - } - - public function isPublic(): bool { - return (bool) ($this->flags & Modifiers::PUBLIC); - } - - public function isProtected(): bool { - return (bool) ($this->flags & Modifiers::PROTECTED); - } - - public function isPrivate(): bool { - return (bool) ($this->flags & Modifiers::PRIVATE); - } - - public function isReadonly(): bool { - return (bool) ($this->flags & Modifiers::READONLY); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php deleted file mode 100644 index 3df257216..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php +++ /dev/null @@ -1,6 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $attributes = []) { - $this->attributes = $attributes; - } - - public function getSubNodeNames(): array { - return []; - } - - /** - * Get name of magic constant. - * - * @return string Name of magic constant - */ - abstract public function getName(): string; -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php deleted file mode 100644 index 732ed140f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +++ /dev/null @@ -1,15 +0,0 @@ - Escaped character to its decoded value */ - protected static array $replacements = [ - '\\' => '\\', - '$' => '$', - 'n' => "\n", - 'r' => "\r", - 't' => "\t", - 'f' => "\f", - 'v' => "\v", - 'e' => "\x1B", - ]; - - /** - * Constructs a string scalar node. - * - * @param string $value Value of the string - * @param array $attributes Additional attributes - */ - public function __construct(string $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['value']; - } - - /** - * @param array $attributes - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - */ - public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self { - $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B'))) - ? Scalar\String_::KIND_SINGLE_QUOTED - : Scalar\String_::KIND_DOUBLE_QUOTED; - - $attributes['rawValue'] = $str; - - $string = self::parse($str, $parseUnicodeEscape); - - return new self($string, $attributes); - } - - /** - * @internal - * - * Parses a string token. - * - * @param string $str String token content - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - * - * @return string The parsed string - */ - public static function parse(string $str, bool $parseUnicodeEscape = true): string { - $bLength = 0; - if ('b' === $str[0] || 'B' === $str[0]) { - $bLength = 1; - } - - if ('\'' === $str[$bLength]) { - return str_replace( - ['\\\\', '\\\''], - ['\\', '\''], - substr($str, $bLength + 1, -1) - ); - } else { - return self::parseEscapeSequences( - substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape - ); - } - } - - /** - * @internal - * - * Parses escape sequences in strings (all string types apart from single quoted). - * - * @param string $str String without quotes - * @param null|string $quote Quote type - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - * - * @return string String with escape sequences parsed - */ - public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = true): string { - if (null !== $quote) { - $str = str_replace('\\' . $quote, $quote, $str); - } - - $extra = ''; - if ($parseUnicodeEscape) { - $extra = '|u\{([0-9a-fA-F]+)\}'; - } - - return preg_replace_callback( - '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', - function ($matches) { - $str = $matches[1]; - - if (isset(self::$replacements[$str])) { - return self::$replacements[$str]; - } - if ('x' === $str[0] || 'X' === $str[0]) { - return chr(hexdec(substr($str, 1))); - } - if ('u' === $str[0]) { - $dec = hexdec($matches[2]); - // If it overflowed to float, treat as INT_MAX, it will throw an error anyway. - return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX); - } else { - return chr(octdec($str)); - } - }, - $str - ); - } - - /** - * Converts a Unicode code point to its UTF-8 encoded representation. - * - * @param int $num Code point - * - * @return string UTF-8 representation of code point - */ - private static function codePointToUtf8(int $num): string { - if ($num <= 0x7F) { - return chr($num); - } - if ($num <= 0x7FF) { - return chr(($num >> 6) + 0xC0) . chr(($num & 0x3F) + 0x80); - } - if ($num <= 0xFFFF) { - return chr(($num >> 12) + 0xE0) . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); - } - if ($num <= 0x1FFFFF) { - return chr(($num >> 18) + 0xF0) . chr((($num >> 12) & 0x3F) + 0x80) - . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); - } - throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); - } - - public function getType(): string { - return 'Scalar_String'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php deleted file mode 100644 index 481d31a93..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php +++ /dev/null @@ -1,8 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Expr $num = null, array $attributes = []) { - $this->attributes = $attributes; - $this->num = $num; - } - - public function getSubNodeNames(): array { - return ['num']; - } - - public function getType(): string { - return 'Stmt_Break'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php deleted file mode 100644 index a06ca1832..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['cond', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Case'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php deleted file mode 100644 index e8d39c9cc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +++ /dev/null @@ -1,40 +0,0 @@ - $attributes Additional attributes - */ - public function __construct( - array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = [] - ) { - $this->attributes = $attributes; - $this->types = $types; - $this->var = $var; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['types', 'var', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Catch'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php deleted file mode 100644 index 9bdce1f1d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +++ /dev/null @@ -1,77 +0,0 @@ - $attributes Additional attributes - * @param list $attrGroups PHP attribute groups - * @param null|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration - */ - public function __construct( - array $consts, - int $flags = 0, - array $attributes = [], - array $attrGroups = [], - ?Node $type = null - ) { - $this->attributes = $attributes; - $this->flags = $flags; - $this->consts = $consts; - $this->attrGroups = $attrGroups; - $this->type = $type; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'type', 'consts']; - } - - /** - * Whether constant is explicitly or implicitly public. - */ - public function isPublic(): bool { - return ($this->flags & Modifiers::PUBLIC) !== 0 - || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; - } - - /** - * Whether constant is protected. - */ - public function isProtected(): bool { - return (bool) ($this->flags & Modifiers::PROTECTED); - } - - /** - * Whether constant is private. - */ - public function isPrivate(): bool { - return (bool) ($this->flags & Modifiers::PRIVATE); - } - - /** - * Whether constant is final. - */ - public function isFinal(): bool { - return (bool) ($this->flags & Modifiers::FINAL); - } - - public function getType(): string { - return 'Stmt_ClassConst'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php deleted file mode 100644 index fb9ba4f59..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +++ /dev/null @@ -1,109 +0,0 @@ -stmts as $stmt) { - if ($stmt instanceof TraitUse) { - $traitUses[] = $stmt; - } - } - return $traitUses; - } - - /** - * @return ClassConst[] - */ - public function getConstants(): array { - $constants = []; - foreach ($this->stmts as $stmt) { - if ($stmt instanceof ClassConst) { - $constants[] = $stmt; - } - } - return $constants; - } - - /** - * @return Property[] - */ - public function getProperties(): array { - $properties = []; - foreach ($this->stmts as $stmt) { - if ($stmt instanceof Property) { - $properties[] = $stmt; - } - } - return $properties; - } - - /** - * Gets property with the given name defined directly in this class/interface/trait. - * - * @param string $name Name of the property - * - * @return Property|null Property node or null if the property does not exist - */ - public function getProperty(string $name): ?Property { - foreach ($this->stmts as $stmt) { - if ($stmt instanceof Property) { - foreach ($stmt->props as $prop) { - if ($prop instanceof PropertyItem && $name === $prop->name->toString()) { - return $stmt; - } - } - } - } - return null; - } - - /** - * Gets all methods defined directly in this class/interface/trait - * - * @return ClassMethod[] - */ - public function getMethods(): array { - $methods = []; - foreach ($this->stmts as $stmt) { - if ($stmt instanceof ClassMethod) { - $methods[] = $stmt; - } - } - return $methods; - } - - /** - * Gets method with the given name defined directly in this class/interface/trait. - * - * @param string $name Name of the method (compared case-insensitively) - * - * @return ClassMethod|null Method node or null if the method does not exist - */ - public function getMethod(string $name): ?ClassMethod { - $lowerName = strtolower($name); - foreach ($this->stmts as $stmt) { - if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) { - return $stmt; - } - } - return null; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php deleted file mode 100644 index 59c0519ea..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +++ /dev/null @@ -1,154 +0,0 @@ - */ - private static array $magicNames = [ - '__construct' => true, - '__destruct' => true, - '__call' => true, - '__callstatic' => true, - '__get' => true, - '__set' => true, - '__isset' => true, - '__unset' => true, - '__sleep' => true, - '__wakeup' => true, - '__tostring' => true, - '__set_state' => true, - '__clone' => true, - '__invoke' => true, - '__debuginfo' => true, - '__serialize' => true, - '__unserialize' => true, - ]; - - /** - * Constructs a class method node. - * - * @param string|Node\Identifier $name Name - * @param array{ - * flags?: int, - * byRef?: bool, - * params?: Node\Param[], - * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, - * stmts?: Node\Stmt[]|null, - * attrGroups?: Node\AttributeGroup[], - * } $subNodes Array of the following optional subnodes: - * 'flags => 0 : Flags - * 'byRef' => false : Whether to return by reference - * 'params' => array() : Parameters - * 'returnType' => null : Return type - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; - $this->byRef = $subNodes['byRef'] ?? false; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->params = $subNodes['params'] ?? []; - $this->returnType = $subNodes['returnType'] ?? null; - $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts']; - } - - public function returnsByRef(): bool { - return $this->byRef; - } - - public function getParams(): array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - public function getStmts(): ?array { - return $this->stmts; - } - - public function getAttrGroups(): array { - return $this->attrGroups; - } - - /** - * Whether the method is explicitly or implicitly public. - */ - public function isPublic(): bool { - return ($this->flags & Modifiers::PUBLIC) !== 0 - || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; - } - - /** - * Whether the method is protected. - */ - public function isProtected(): bool { - return (bool) ($this->flags & Modifiers::PROTECTED); - } - - /** - * Whether the method is private. - */ - public function isPrivate(): bool { - return (bool) ($this->flags & Modifiers::PRIVATE); - } - - /** - * Whether the method is abstract. - */ - public function isAbstract(): bool { - return (bool) ($this->flags & Modifiers::ABSTRACT); - } - - /** - * Whether the method is final. - */ - public function isFinal(): bool { - return (bool) ($this->flags & Modifiers::FINAL); - } - - /** - * Whether the method is static. - */ - public function isStatic(): bool { - return (bool) ($this->flags & Modifiers::STATIC); - } - - /** - * Whether the method is magic. - */ - public function isMagic(): bool { - return isset(self::$magicNames[$this->name->toLowerString()]); - } - - public function getType(): string { - return 'Stmt_ClassMethod'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php deleted file mode 100644 index 3f492b7bb..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +++ /dev/null @@ -1,94 +0,0 @@ - 0 : Flags - * 'extends' => null : Name of extended class - * 'implements' => array(): Names of implemented interfaces - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->extends = $subNodes['extends'] ?? null; - $this->implements = $subNodes['implements'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'name', 'extends', 'implements', 'stmts']; - } - - /** - * Whether the class is explicitly abstract. - */ - public function isAbstract(): bool { - return (bool) ($this->flags & Modifiers::ABSTRACT); - } - - /** - * Whether the class is final. - */ - public function isFinal(): bool { - return (bool) ($this->flags & Modifiers::FINAL); - } - - public function isReadonly(): bool { - return (bool) ($this->flags & Modifiers::READONLY); - } - - /** - * Whether the class is anonymous. - */ - public function isAnonymous(): bool { - return null === $this->name; - } - - public function getType(): string { - return 'Stmt_Class'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php deleted file mode 100644 index f1165fd0b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $consts, array $attributes = []) { - $this->attributes = $attributes; - $this->consts = $consts; - } - - public function getSubNodeNames(): array { - return ['consts']; - } - - public function getType(): string { - return 'Stmt_Const'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php deleted file mode 100644 index 54e979dda..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Expr $num = null, array $attributes = []) { - $this->attributes = $attributes; - $this->num = $num; - } - - public function getSubNodeNames(): array { - return ['num']; - } - - public function getType(): string { - return 'Stmt_Continue'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php deleted file mode 100644 index cb9e8376e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +++ /dev/null @@ -1,3 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $declares, ?array $stmts = null, array $attributes = []) { - $this->attributes = $attributes; - $this->declares = $declares; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['declares', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Declare'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php deleted file mode 100644 index 612444288..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['stmts', 'cond']; - } - - public function getType(): string { - return 'Stmt_Do'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php deleted file mode 100644 index 4d4245235..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $exprs, array $attributes = []) { - $this->attributes = $attributes; - $this->exprs = $exprs; - } - - public function getSubNodeNames(): array { - return ['exprs']; - } - - public function getType(): string { - return 'Stmt_Echo'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php deleted file mode 100644 index b26d59ce5..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['cond', 'stmts']; - } - - public function getType(): string { - return 'Stmt_ElseIf'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php deleted file mode 100644 index 3d2b066ec..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['stmts']; - } - - public function getType(): string { - return 'Stmt_Else'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php deleted file mode 100644 index c071a0af1..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +++ /dev/null @@ -1,36 +0,0 @@ - $attrGroups PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { - parent::__construct($attributes); - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->expr = $expr; - $this->attrGroups = $attrGroups; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'name', 'expr']; - } - - public function getType(): string { - return 'Stmt_EnumCase'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php deleted file mode 100644 index 7eea6a699..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +++ /dev/null @@ -1,44 +0,0 @@ - null : Scalar type - * 'implements' => array() : Names of implemented interfaces - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->scalarType = $subNodes['scalarType'] ?? null; - $this->implements = $subNodes['implements'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - - parent::__construct($attributes); - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Enum'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php deleted file mode 100644 index 89751fa2d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +++ /dev/null @@ -1,32 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Stmt_Expression'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php deleted file mode 100644 index 69ecf2537..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['stmts']; - } - - public function getType(): string { - return 'Stmt_Finally'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php deleted file mode 100644 index 6f2fbb9e3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +++ /dev/null @@ -1,47 +0,0 @@ - array(): Init expressions - * 'cond' => array(): Loop conditions - * 'loop' => array(): Loop expressions - * 'stmts' => array(): Statements - * @param array $attributes Additional attributes - */ - public function __construct(array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->init = $subNodes['init'] ?? []; - $this->cond = $subNodes['cond'] ?? []; - $this->loop = $subNodes['loop'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - } - - public function getSubNodeNames(): array { - return ['init', 'cond', 'loop', 'stmts']; - } - - public function getType(): string { - return 'Stmt_For'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php deleted file mode 100644 index c5d9a8b13..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +++ /dev/null @@ -1,50 +0,0 @@ - null : Variable to assign key to - * 'byRef' => false : Whether to assign value by reference - * 'stmts' => array(): Statements - * @param array $attributes Additional attributes - */ - public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - $this->keyVar = $subNodes['keyVar'] ?? null; - $this->byRef = $subNodes['byRef'] ?? false; - $this->valueVar = $valueVar; - $this->stmts = $subNodes['stmts'] ?? []; - } - - public function getSubNodeNames(): array { - return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Foreach'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php deleted file mode 100644 index 2111bab74..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +++ /dev/null @@ -1,81 +0,0 @@ - false : Whether to return by reference - * 'params' => array(): Parameters - * 'returnType' => null : Return type - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->byRef = $subNodes['byRef'] ?? false; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->params = $subNodes['params'] ?? []; - $this->returnType = $subNodes['returnType'] ?? null; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts']; - } - - public function returnsByRef(): bool { - return $this->byRef; - } - - public function getParams(): array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - public function getAttrGroups(): array { - return $this->attrGroups; - } - - /** @return Node\Stmt[] */ - public function getStmts(): array { - return $this->stmts; - } - - public function getType(): string { - return 'Stmt_Function'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php deleted file mode 100644 index d3ab12fc2..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $vars, array $attributes = []) { - $this->attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames(): array { - return ['vars']; - } - - public function getType(): string { - return 'Stmt_Global'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php deleted file mode 100644 index 26a0d01ea..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +++ /dev/null @@ -1,30 +0,0 @@ - $attributes Additional attributes - */ - public function __construct($name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['name']; - } - - public function getType(): string { - return 'Stmt_Goto'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php deleted file mode 100644 index 0ec8e9d42..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +++ /dev/null @@ -1,41 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) { - $this->attributes = $attributes; - $this->type = $type; - $this->prefix = $prefix; - $this->uses = $uses; - } - - public function getSubNodeNames(): array { - return ['type', 'prefix', 'uses']; - } - - public function getType(): string { - return 'Stmt_GroupUse'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php deleted file mode 100644 index 665bacdee..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(string $remaining, array $attributes = []) { - $this->attributes = $attributes; - $this->remaining = $remaining; - } - - public function getSubNodeNames(): array { - return ['remaining']; - } - - public function getType(): string { - return 'Stmt_HaltCompiler'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php deleted file mode 100644 index 544390ff5..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +++ /dev/null @@ -1,46 +0,0 @@ - array(): Statements - * 'elseifs' => array(): Elseif clauses - * 'else' => null : Else clause - * @param array $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->stmts = $subNodes['stmts'] ?? []; - $this->elseifs = $subNodes['elseifs'] ?? []; - $this->else = $subNodes['else'] ?? null; - } - - public function getSubNodeNames(): array { - return ['cond', 'stmts', 'elseifs', 'else']; - } - - public function getType(): string { - return 'Stmt_If'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php deleted file mode 100644 index 0515d0205..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(string $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['value']; - } - - public function getType(): string { - return 'Stmt_InlineHTML'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php deleted file mode 100644 index 9359064f8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +++ /dev/null @@ -1,40 +0,0 @@ - array(): Name of extended interfaces - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->extends = $subNodes['extends'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'name', 'extends', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Interface'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php deleted file mode 100644 index 658468d2f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +++ /dev/null @@ -1,30 +0,0 @@ - $attributes Additional attributes - */ - public function __construct($name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['name']; - } - - public function getType(): string { - return 'Stmt_Label'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php deleted file mode 100644 index f5b59ad6e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +++ /dev/null @@ -1,37 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['name', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Namespace'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php deleted file mode 100644 index 3acfa46fb..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +++ /dev/null @@ -1,16 +0,0 @@ - $attributes Additional attributes - * @param null|Identifier|Name|ComplexType $type Type declaration - * @param Node\AttributeGroup[] $attrGroups PHP attribute groups - */ - public function __construct(int $flags, array $props, array $attributes = [], ?Node $type = null, array $attrGroups = []) { - $this->attributes = $attributes; - $this->flags = $flags; - $this->props = $props; - $this->type = $type; - $this->attrGroups = $attrGroups; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'type', 'props']; - } - - /** - * Whether the property is explicitly or implicitly public. - */ - public function isPublic(): bool { - return ($this->flags & Modifiers::PUBLIC) !== 0 - || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; - } - - /** - * Whether the property is protected. - */ - public function isProtected(): bool { - return (bool) ($this->flags & Modifiers::PROTECTED); - } - - /** - * Whether the property is private. - */ - public function isPrivate(): bool { - return (bool) ($this->flags & Modifiers::PRIVATE); - } - - /** - * Whether the property is static. - */ - public function isStatic(): bool { - return (bool) ($this->flags & Modifiers::STATIC); - } - - /** - * Whether the property is readonly. - */ - public function isReadonly(): bool { - return (bool) ($this->flags & Modifiers::READONLY); - } - - public function getType(): string { - return 'Stmt_Property'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php deleted file mode 100644 index 4a21a8806..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +++ /dev/null @@ -1,3 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Expr $expr = null, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Stmt_Return'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php deleted file mode 100644 index 88452e7f9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +++ /dev/null @@ -1,3 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $vars, array $attributes = []) { - $this->attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames(): array { - return ['vars']; - } - - public function getType(): string { - return 'Stmt_Static'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php deleted file mode 100644 index 21e5efa56..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $cases, array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->cases = $cases; - } - - public function getSubNodeNames(): array { - return ['cond', 'cases']; - } - - public function getType(): string { - return 'Stmt_Switch'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php deleted file mode 100644 index 7705a5705..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $traits, array $adaptations = [], array $attributes = []) { - $this->attributes = $attributes; - $this->traits = $traits; - $this->adaptations = $adaptations; - } - - public function getSubNodeNames(): array { - return ['traits', 'adaptations']; - } - - public function getType(): string { - return 'Stmt_TraitUse'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php deleted file mode 100644 index 987bc88ed..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +++ /dev/null @@ -1,12 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) { - $this->attributes = $attributes; - $this->trait = $trait; - $this->method = \is_string($method) ? new Node\Identifier($method) : $method; - $this->newModifier = $newModifier; - $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName; - } - - public function getSubNodeNames(): array { - return ['trait', 'method', 'newModifier', 'newName']; - } - - public function getType(): string { - return 'Stmt_TraitUseAdaptation_Alias'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php deleted file mode 100644 index 7bc408376..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) { - $this->attributes = $attributes; - $this->trait = $trait; - $this->method = \is_string($method) ? new Node\Identifier($method) : $method; - $this->insteadof = $insteadof; - } - - public function getSubNodeNames(): array { - return ['trait', 'method', 'insteadof']; - } - - public function getType(): string { - return 'Stmt_TraitUseAdaptation_Precedence'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php deleted file mode 100644 index 5f2b33070..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +++ /dev/null @@ -1,34 +0,0 @@ - array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'name', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Trait'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php deleted file mode 100644 index 6414c46c9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +++ /dev/null @@ -1,37 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) { - $this->attributes = $attributes; - $this->stmts = $stmts; - $this->catches = $catches; - $this->finally = $finally; - } - - public function getSubNodeNames(): array { - return ['stmts', 'catches', 'finally']; - } - - public function getType(): string { - return 'Stmt_TryCatch'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php deleted file mode 100644 index c211beb0c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $vars, array $attributes = []) { - $this->attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames(): array { - return ['vars']; - } - - public function getType(): string { - return 'Stmt_Unset'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php deleted file mode 100644 index 85830edc3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +++ /dev/null @@ -1,3 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { - $this->attributes = $attributes; - $this->type = $type; - $this->uses = $uses; - } - - public function getSubNodeNames(): array { - return ['type', 'uses']; - } - - public function getType(): string { - return 'Stmt_Use'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php deleted file mode 100644 index 2f7aed234..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['cond', 'stmts']; - } - - public function getType(): string { - return 'Stmt_While'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php deleted file mode 100644 index bad88d2b8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php +++ /dev/null @@ -1,27 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $types, array $attributes = []) { - $this->attributes = $attributes; - $this->types = $types; - } - - public function getSubNodeNames(): array { - return ['types']; - } - - public function getType(): string { - return 'UnionType'; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php deleted file mode 100644 index 9baa6fe0b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +++ /dev/null @@ -1,16 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $attributes = []) { - $this->attributes = $attributes; - } - - public function getType(): string { - return 'VariadicPlaceholder'; - } - - public function getSubNodeNames(): array { - return []; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php deleted file mode 100644 index 7c3a36075..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php +++ /dev/null @@ -1,178 +0,0 @@ - Attributes */ - protected array $attributes; - - /** - * Creates a Node. - * - * @param array $attributes Array of attributes - */ - public function __construct(array $attributes = []) { - $this->attributes = $attributes; - } - - /** - * Gets line the node started in (alias of getStartLine). - * - * @return int Start line (or -1 if not available) - */ - public function getLine(): int { - return $this->attributes['startLine'] ?? -1; - } - - /** - * Gets line the node started in. - * - * Requires the 'startLine' attribute to be enabled in the lexer (enabled by default). - * - * @return int Start line (or -1 if not available) - */ - public function getStartLine(): int { - return $this->attributes['startLine'] ?? -1; - } - - /** - * Gets the line the node ended in. - * - * Requires the 'endLine' attribute to be enabled in the lexer (enabled by default). - * - * @return int End line (or -1 if not available) - */ - public function getEndLine(): int { - return $this->attributes['endLine'] ?? -1; - } - - /** - * Gets the token offset of the first token that is part of this node. - * - * The offset is an index into the array returned by Lexer::getTokens(). - * - * Requires the 'startTokenPos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int Token start position (or -1 if not available) - */ - public function getStartTokenPos(): int { - return $this->attributes['startTokenPos'] ?? -1; - } - - /** - * Gets the token offset of the last token that is part of this node. - * - * The offset is an index into the array returned by Lexer::getTokens(). - * - * Requires the 'endTokenPos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int Token end position (or -1 if not available) - */ - public function getEndTokenPos(): int { - return $this->attributes['endTokenPos'] ?? -1; - } - - /** - * Gets the file offset of the first character that is part of this node. - * - * Requires the 'startFilePos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int File start position (or -1 if not available) - */ - public function getStartFilePos(): int { - return $this->attributes['startFilePos'] ?? -1; - } - - /** - * Gets the file offset of the last character that is part of this node. - * - * Requires the 'endFilePos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int File end position (or -1 if not available) - */ - public function getEndFilePos(): int { - return $this->attributes['endFilePos'] ?? -1; - } - - /** - * Gets all comments directly preceding this node. - * - * The comments are also available through the "comments" attribute. - * - * @return Comment[] - */ - public function getComments(): array { - return $this->attributes['comments'] ?? []; - } - - /** - * Gets the doc comment of the node. - * - * @return null|Comment\Doc Doc comment object or null - */ - public function getDocComment(): ?Comment\Doc { - $comments = $this->getComments(); - for ($i = count($comments) - 1; $i >= 0; $i--) { - $comment = $comments[$i]; - if ($comment instanceof Comment\Doc) { - return $comment; - } - } - - return null; - } - - /** - * Sets the doc comment of the node. - * - * This will either replace an existing doc comment or add it to the comments array. - * - * @param Comment\Doc $docComment Doc comment to set - */ - public function setDocComment(Comment\Doc $docComment): void { - $comments = $this->getComments(); - for ($i = count($comments) - 1; $i >= 0; $i--) { - if ($comments[$i] instanceof Comment\Doc) { - // Replace existing doc comment. - $comments[$i] = $docComment; - $this->setAttribute('comments', $comments); - return; - } - } - - // Append new doc comment. - $comments[] = $docComment; - $this->setAttribute('comments', $comments); - } - - public function setAttribute(string $key, $value): void { - $this->attributes[$key] = $value; - } - - public function hasAttribute(string $key): bool { - return array_key_exists($key, $this->attributes); - } - - public function getAttribute(string $key, $default = null) { - if (array_key_exists($key, $this->attributes)) { - return $this->attributes[$key]; - } - - return $default; - } - - public function getAttributes(): array { - return $this->attributes; - } - - public function setAttributes(array $attributes): void { - $this->attributes = $attributes; - } - - /** - * @return array - */ - public function jsonSerialize(): array { - return ['nodeType' => $this->getType()] + get_object_vars($this); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php deleted file mode 100644 index a2535de73..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php +++ /dev/null @@ -1,290 +0,0 @@ - true, - 'startLine' => true, - 'endLine' => true, - 'startFilePos' => true, - 'endFilePos' => true, - 'startTokenPos' => true, - 'endTokenPos' => true, - ]; - - /** - * Constructs a NodeDumper. - * - * Supported options: - * * bool dumpComments: Whether comments should be dumped. - * * bool dumpPositions: Whether line/offset information should be dumped. To dump offset - * information, the code needs to be passed to dump(). - * * bool dumpOtherAttributes: Whether non-comment, non-position attributes should be dumped. - * - * @param array $options Options (see description) - */ - public function __construct(array $options = []) { - $this->dumpComments = !empty($options['dumpComments']); - $this->dumpPositions = !empty($options['dumpPositions']); - $this->dumpOtherAttributes = !empty($options['dumpOtherAttributes']); - } - - /** - * Dumps a node or array. - * - * @param array|Node $node Node or array to dump - * @param string|null $code Code corresponding to dumped AST. This only needs to be passed if - * the dumpPositions option is enabled and the dumping of node offsets - * is desired. - * - * @return string Dumped value - */ - public function dump($node, ?string $code = null): string { - $this->code = $code; - $this->res = ''; - $this->nl = "\n"; - $this->dumpRecursive($node, false); - return $this->res; - } - - /** @param mixed $node */ - protected function dumpRecursive($node, bool $indent = true): void { - if ($indent) { - $this->nl .= " "; - } - if ($node instanceof Node) { - $this->res .= $node->getType(); - if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) { - $this->res .= $p; - } - $this->res .= '('; - - foreach ($node->getSubNodeNames() as $key) { - $this->res .= "$this->nl " . $key . ': '; - - $value = $node->$key; - if (\is_int($value)) { - if ('flags' === $key || 'newModifier' === $key) { - $this->res .= $this->dumpFlags($value); - continue; - } - if ('type' === $key && $node instanceof Include_) { - $this->res .= $this->dumpIncludeType($value); - continue; - } - if ('type' === $key - && ($node instanceof Use_ || $node instanceof UseItem || $node instanceof GroupUse)) { - $this->res .= $this->dumpUseType($value); - continue; - } - } - $this->dumpRecursive($value); - } - - if ($this->dumpComments && $comments = $node->getComments()) { - $this->res .= "$this->nl comments: "; - $this->dumpRecursive($comments); - } - - if ($this->dumpOtherAttributes) { - foreach ($node->getAttributes() as $key => $value) { - if (isset(self::IGNORE_ATTRIBUTES[$key])) { - continue; - } - - $this->res .= "$this->nl $key: "; - if (\is_int($value)) { - if ('kind' === $key) { - if ($node instanceof Int_) { - $this->res .= $this->dumpIntKind($value); - continue; - } - if ($node instanceof String_ || $node instanceof InterpolatedString) { - $this->res .= $this->dumpStringKind($value); - continue; - } - if ($node instanceof Array_) { - $this->res .= $this->dumpArrayKind($value); - continue; - } - if ($node instanceof List_) { - $this->res .= $this->dumpListKind($value); - continue; - } - } - } - $this->dumpRecursive($value); - } - } - $this->res .= "$this->nl)"; - } elseif (\is_array($node)) { - $this->res .= 'array('; - foreach ($node as $key => $value) { - $this->res .= "$this->nl " . $key . ': '; - $this->dumpRecursive($value); - } - $this->res .= "$this->nl)"; - } elseif ($node instanceof Comment) { - $this->res .= \str_replace("\n", $this->nl, $node->getReformattedText()); - } elseif (\is_string($node)) { - $this->res .= \str_replace("\n", $this->nl, (string)$node); - } elseif (\is_int($node) || \is_float($node)) { - $this->res .= $node; - } elseif (null === $node) { - $this->res .= 'null'; - } elseif (false === $node) { - $this->res .= 'false'; - } elseif (true === $node) { - $this->res .= 'true'; - } else { - throw new \InvalidArgumentException('Can only dump nodes and arrays.'); - } - if ($indent) { - $this->nl = \substr($this->nl, 0, -4); - } - } - - protected function dumpFlags(int $flags): string { - $strs = []; - if ($flags & Modifiers::PUBLIC) { - $strs[] = 'PUBLIC'; - } - if ($flags & Modifiers::PROTECTED) { - $strs[] = 'PROTECTED'; - } - if ($flags & Modifiers::PRIVATE) { - $strs[] = 'PRIVATE'; - } - if ($flags & Modifiers::ABSTRACT) { - $strs[] = 'ABSTRACT'; - } - if ($flags & Modifiers::STATIC) { - $strs[] = 'STATIC'; - } - if ($flags & Modifiers::FINAL) { - $strs[] = 'FINAL'; - } - if ($flags & Modifiers::READONLY) { - $strs[] = 'READONLY'; - } - - if ($strs) { - return implode(' | ', $strs) . ' (' . $flags . ')'; - } else { - return (string) $flags; - } - } - - /** @param array $map */ - private function dumpEnum(int $value, array $map): string { - if (!isset($map[$value])) { - return (string) $value; - } - return $map[$value] . ' (' . $value . ')'; - } - - private function dumpIncludeType(int $type): string { - return $this->dumpEnum($type, [ - Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', - Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', - Include_::TYPE_REQUIRE => 'TYPE_REQUIRE', - Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQUIRE_ONCE', - ]); - } - - private function dumpUseType(int $type): string { - return $this->dumpEnum($type, [ - Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', - Use_::TYPE_NORMAL => 'TYPE_NORMAL', - Use_::TYPE_FUNCTION => 'TYPE_FUNCTION', - Use_::TYPE_CONSTANT => 'TYPE_CONSTANT', - ]); - } - - private function dumpIntKind(int $kind): string { - return $this->dumpEnum($kind, [ - Int_::KIND_BIN => 'KIND_BIN', - Int_::KIND_OCT => 'KIND_OCT', - Int_::KIND_DEC => 'KIND_DEC', - Int_::KIND_HEX => 'KIND_HEX', - ]); - } - - private function dumpStringKind(int $kind): string { - return $this->dumpEnum($kind, [ - String_::KIND_SINGLE_QUOTED => 'KIND_SINGLE_QUOTED', - String_::KIND_DOUBLE_QUOTED => 'KIND_DOUBLE_QUOTED', - String_::KIND_HEREDOC => 'KIND_HEREDOC', - String_::KIND_NOWDOC => 'KIND_NOWDOC', - ]); - } - - private function dumpArrayKind(int $kind): string { - return $this->dumpEnum($kind, [ - Array_::KIND_LONG => 'KIND_LONG', - Array_::KIND_SHORT => 'KIND_SHORT', - ]); - } - - private function dumpListKind(int $kind): string { - return $this->dumpEnum($kind, [ - List_::KIND_LIST => 'KIND_LIST', - List_::KIND_ARRAY => 'KIND_ARRAY', - ]); - } - - /** - * Dump node position, if possible. - * - * @param Node $node Node for which to dump position - * - * @return string|null Dump of position, or null if position information not available - */ - protected function dumpPosition(Node $node): ?string { - if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) { - return null; - } - - $start = $node->getStartLine(); - $end = $node->getEndLine(); - if ($node->hasAttribute('startFilePos') && $node->hasAttribute('endFilePos') - && null !== $this->code - ) { - $start .= ':' . $this->toColumn($this->code, $node->getStartFilePos()); - $end .= ':' . $this->toColumn($this->code, $node->getEndFilePos()); - } - return "[$start - $end]"; - } - - // Copied from Error class - private function toColumn(string $code, int $pos): int { - if ($pos > strlen($code)) { - throw new \RuntimeException('Invalid position information'); - } - - $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); - if (false === $lineStartPos) { - $lineStartPos = -1; - } - - return $pos - $lineStartPos; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php deleted file mode 100644 index 96c845263..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php +++ /dev/null @@ -1,90 +0,0 @@ -traverse($nodes); - - return $visitor->getFoundNodes(); - } - - /** - * Find all nodes that are instances of a certain class. - - * @template TNode as Node - * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param class-string $class Class name - * - * @return TNode[] Found nodes (all instances of $class) - */ - public function findInstanceOf($nodes, string $class): array { - return $this->find($nodes, function ($node) use ($class) { - return $node instanceof $class; - }); - } - - /** - * Find first node satisfying a filter callback. - * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param callable $filter Filter callback: function(Node $node) : bool - * - * @return null|Node Found node (or null if none found) - */ - public function findFirst($nodes, callable $filter): ?Node { - if ($nodes === []) { - return null; - } - - if (!is_array($nodes)) { - $nodes = [$nodes]; - } - - $visitor = new FirstFindingVisitor($filter); - - $traverser = new NodeTraverser($visitor); - $traverser->traverse($nodes); - - return $visitor->getFoundNode(); - } - - /** - * Find first node that is an instance of a certain class. - * - * @template TNode as Node - * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param class-string $class Class name - * - * @return null|TNode Found node, which is an instance of $class (or null if none found) - */ - public function findFirstInstanceOf($nodes, string $class): ?Node { - return $this->findFirst($nodes, function ($node) use ($class) { - return $node instanceof $class; - }); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php deleted file mode 100644 index f5b868a1f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php +++ /dev/null @@ -1,278 +0,0 @@ - Visitors */ - protected array $visitors = []; - - /** @var bool Whether traversal should be stopped */ - protected bool $stopTraversal; - - /** - * Create a traverser with the given visitors. - * - * @param NodeVisitor ...$visitors Node visitors - */ - public function __construct(NodeVisitor ...$visitors) { - $this->visitors = $visitors; - } - - /** - * Adds a visitor. - * - * @param NodeVisitor $visitor Visitor to add - */ - public function addVisitor(NodeVisitor $visitor): void { - $this->visitors[] = $visitor; - } - - /** - * Removes an added visitor. - */ - public function removeVisitor(NodeVisitor $visitor): void { - $index = array_search($visitor, $this->visitors); - if ($index !== false) { - array_splice($this->visitors, $index, 1, []); - } - } - - /** - * Traverses an array of nodes using the registered visitors. - * - * @param Node[] $nodes Array of nodes - * - * @return Node[] Traversed array of nodes - */ - public function traverse(array $nodes): array { - $this->stopTraversal = false; - - foreach ($this->visitors as $visitor) { - if (null !== $return = $visitor->beforeTraverse($nodes)) { - $nodes = $return; - } - } - - $nodes = $this->traverseArray($nodes); - - for ($i = \count($this->visitors) - 1; $i >= 0; --$i) { - $visitor = $this->visitors[$i]; - if (null !== $return = $visitor->afterTraverse($nodes)) { - $nodes = $return; - } - } - - return $nodes; - } - - /** - * Recursively traverse a node. - * - * @param Node $node Node to traverse. - */ - protected function traverseNode(Node $node): void { - foreach ($node->getSubNodeNames() as $name) { - $subNode = $node->$name; - - if (\is_array($subNode)) { - $node->$name = $this->traverseArray($subNode); - if ($this->stopTraversal) { - break; - } - } elseif ($subNode instanceof Node) { - $traverseChildren = true; - $visitorIndex = -1; - - foreach ($this->visitors as $visitorIndex => $visitor) { - $return = $visitor->enterNode($subNode); - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($subNode, $return); - $subNode = $node->$name = $return; - } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { - $traverseChildren = false; - } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { - $traverseChildren = false; - break; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - $node->$name = null; - continue 2; - } else { - throw new \LogicException( - 'enterNode() returned invalid value of type ' . gettype($return) - ); - } - } - } - - if ($traverseChildren) { - $this->traverseNode($subNode); - if ($this->stopTraversal) { - break; - } - } - - for (; $visitorIndex >= 0; --$visitorIndex) { - $visitor = $this->visitors[$visitorIndex]; - $return = $visitor->leaveNode($subNode); - - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($subNode, $return); - $subNode = $node->$name = $return; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - $node->$name = null; - break; - } elseif (\is_array($return)) { - throw new \LogicException( - 'leaveNode() may only return an array ' . - 'if the parent structure is an array' - ); - } else { - throw new \LogicException( - 'leaveNode() returned invalid value of type ' . gettype($return) - ); - } - } - } - } - } - } - - /** - * Recursively traverse array (usually of nodes). - * - * @param array $nodes Array to traverse - * - * @return array Result of traversal (may be original array or changed one) - */ - protected function traverseArray(array $nodes): array { - $doNodes = []; - - foreach ($nodes as $i => $node) { - if ($node instanceof Node) { - $traverseChildren = true; - $visitorIndex = -1; - - foreach ($this->visitors as $visitorIndex => $visitor) { - $return = $visitor->enterNode($node); - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($node, $return); - $nodes[$i] = $node = $return; - } elseif (\is_array($return)) { - $doNodes[] = [$i, $return]; - continue 2; - } elseif (NodeVisitor::REMOVE_NODE === $return) { - $doNodes[] = [$i, []]; - continue 2; - } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { - $traverseChildren = false; - } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { - $traverseChildren = false; - break; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - throw new \LogicException( - 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); - } else { - throw new \LogicException( - 'enterNode() returned invalid value of type ' . gettype($return) - ); - } - } - } - - if ($traverseChildren) { - $this->traverseNode($node); - if ($this->stopTraversal) { - break; - } - } - - for (; $visitorIndex >= 0; --$visitorIndex) { - $visitor = $this->visitors[$visitorIndex]; - $return = $visitor->leaveNode($node); - - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($node, $return); - $nodes[$i] = $node = $return; - } elseif (\is_array($return)) { - $doNodes[] = [$i, $return]; - break; - } elseif (NodeVisitor::REMOVE_NODE === $return) { - $doNodes[] = [$i, []]; - break; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - throw new \LogicException( - 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); - } else { - throw new \LogicException( - 'leaveNode() returned invalid value of type ' . gettype($return) - ); - } - } - } - } elseif (\is_array($node)) { - throw new \LogicException('Invalid node structure: Contains nested arrays'); - } - } - - if (!empty($doNodes)) { - while (list($i, $replace) = array_pop($doNodes)) { - array_splice($nodes, $i, 1, $replace); - } - } - - return $nodes; - } - - private function ensureReplacementReasonable(Node $old, Node $new): void { - if ($old instanceof Node\Stmt && $new instanceof Node\Expr) { - throw new \LogicException( - "Trying to replace statement ({$old->getType()}) " . - "with expression ({$new->getType()}). Are you missing a " . - "Stmt_Expression wrapper?" - ); - } - - if ($old instanceof Node\Expr && $new instanceof Node\Stmt) { - throw new \LogicException( - "Trying to replace expression ({$old->getType()}) " . - "with statement ({$new->getType()})" - ); - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php deleted file mode 100644 index c3992b3dc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - $node stays as-is - * * array (of Nodes) - * => The return value is merged into the parent array (at the position of the $node) - * * NodeVisitor::REMOVE_NODE - * => $node is removed from the parent array - * * NodeVisitor::REPLACE_WITH_NULL - * => $node is replaced with null - * * NodeVisitor::DONT_TRAVERSE_CHILDREN - * => Children of $node are not traversed. $node stays as-is - * * NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN - * => Further visitors for the current node are skipped, and its children are not - * traversed. $node stays as-is. - * * NodeVisitor::STOP_TRAVERSAL - * => Traversal is aborted. $node stays as-is - * * otherwise - * => $node is set to the return value - * - * @param Node $node Node - * - * @return null|int|Node|Node[] Replacement node (or special return value) - */ - public function enterNode(Node $node); - - /** - * Called when leaving a node. - * - * Return value semantics: - * * null - * => $node stays as-is - * * NodeVisitor::REMOVE_NODE - * => $node is removed from the parent array - * * NodeVisitor::REPLACE_WITH_NULL - * => $node is replaced with null - * * NodeVisitor::STOP_TRAVERSAL - * => Traversal is aborted. $node stays as-is - * * array (of Nodes) - * => The return value is merged into the parent array (at the position of the $node) - * * otherwise - * => $node is set to the return value - * - * @param Node $node Node - * - * @return null|int|Node|Node[] Replacement node (or special return value) - */ - public function leaveNode(Node $node); - - /** - * Called once after traversal. - * - * Return value semantics: - * * null: $nodes stays as-is - * * otherwise: $nodes is set to the return value - * - * @param Node[] $nodes Array of nodes - * - * @return null|Node[] Array of nodes - */ - public function afterTraverse(array $nodes); -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php deleted file mode 100644 index cba924998..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +++ /dev/null @@ -1,19 +0,0 @@ -setAttribute('origNode', $origNode); - return $node; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php deleted file mode 100644 index 1f3f4bae8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +++ /dev/null @@ -1,47 +0,0 @@ -filterCallback = $filterCallback; - } - - /** - * Get found nodes satisfying the filter callback. - * - * Nodes are returned in pre-order. - * - * @return Node[] Found nodes - */ - public function getFoundNodes(): array { - return $this->foundNodes; - } - - public function beforeTraverse(array $nodes): ?array { - $this->foundNodes = []; - - return null; - } - - public function enterNode(Node $node) { - $filterCallback = $this->filterCallback; - if ($filterCallback($node)) { - $this->foundNodes[] = $node; - } - - return null; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php deleted file mode 100644 index 05deed597..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ /dev/null @@ -1,49 +0,0 @@ -filterCallback = $filterCallback; - } - - /** - * Get found node satisfying the filter callback. - * - * Returns null if no node satisfies the filter callback. - * - * @return null|Node Found node (or null if not found) - */ - public function getFoundNode(): ?Node { - return $this->foundNode; - } - - public function beforeTraverse(array $nodes): ?array { - $this->foundNode = null; - - return null; - } - - public function enterNode(Node $node) { - $filterCallback = $this->filterCallback; - if ($filterCallback($node)) { - $this->foundNode = $node; - return NodeVisitor::STOP_TRAVERSAL; - } - - return null; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php deleted file mode 100644 index ccd014ebb..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +++ /dev/null @@ -1,262 +0,0 @@ -nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing()); - $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? false; - $this->replaceNodes = $options['replaceNodes'] ?? true; - } - - /** - * Get name resolution context. - */ - public function getNameContext(): NameContext { - return $this->nameContext; - } - - public function beforeTraverse(array $nodes): ?array { - $this->nameContext->startNamespace(); - return null; - } - - public function enterNode(Node $node) { - if ($node instanceof Stmt\Namespace_) { - $this->nameContext->startNamespace($node->name); - } elseif ($node instanceof Stmt\Use_) { - foreach ($node->uses as $use) { - $this->addAlias($use, $node->type, null); - } - } elseif ($node instanceof Stmt\GroupUse) { - foreach ($node->uses as $use) { - $this->addAlias($use, $node->type, $node->prefix); - } - } elseif ($node instanceof Stmt\Class_) { - if (null !== $node->extends) { - $node->extends = $this->resolveClassName($node->extends); - } - - foreach ($node->implements as &$interface) { - $interface = $this->resolveClassName($interface); - } - - $this->resolveAttrGroups($node); - if (null !== $node->name) { - $this->addNamespacedName($node); - } else { - $node->namespacedName = null; - } - } elseif ($node instanceof Stmt\Interface_) { - foreach ($node->extends as &$interface) { - $interface = $this->resolveClassName($interface); - } - - $this->resolveAttrGroups($node); - $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\Enum_) { - foreach ($node->implements as &$interface) { - $interface = $this->resolveClassName($interface); - } - - $this->resolveAttrGroups($node); - $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\Trait_) { - $this->resolveAttrGroups($node); - $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\Function_) { - $this->resolveSignature($node); - $this->resolveAttrGroups($node); - $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\ClassMethod - || $node instanceof Expr\Closure - || $node instanceof Expr\ArrowFunction - ) { - $this->resolveSignature($node); - $this->resolveAttrGroups($node); - } elseif ($node instanceof Stmt\Property) { - if (null !== $node->type) { - $node->type = $this->resolveType($node->type); - } - $this->resolveAttrGroups($node); - } elseif ($node instanceof Stmt\Const_) { - foreach ($node->consts as $const) { - $this->addNamespacedName($const); - } - } elseif ($node instanceof Stmt\ClassConst) { - if (null !== $node->type) { - $node->type = $this->resolveType($node->type); - } - $this->resolveAttrGroups($node); - } elseif ($node instanceof Stmt\EnumCase) { - $this->resolveAttrGroups($node); - } elseif ($node instanceof Expr\StaticCall - || $node instanceof Expr\StaticPropertyFetch - || $node instanceof Expr\ClassConstFetch - || $node instanceof Expr\New_ - || $node instanceof Expr\Instanceof_ - ) { - if ($node->class instanceof Name) { - $node->class = $this->resolveClassName($node->class); - } - } elseif ($node instanceof Stmt\Catch_) { - foreach ($node->types as &$type) { - $type = $this->resolveClassName($type); - } - } elseif ($node instanceof Expr\FuncCall) { - if ($node->name instanceof Name) { - $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_FUNCTION); - } - } elseif ($node instanceof Expr\ConstFetch) { - $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_CONSTANT); - } elseif ($node instanceof Stmt\TraitUse) { - foreach ($node->traits as &$trait) { - $trait = $this->resolveClassName($trait); - } - - foreach ($node->adaptations as $adaptation) { - if (null !== $adaptation->trait) { - $adaptation->trait = $this->resolveClassName($adaptation->trait); - } - - if ($adaptation instanceof Stmt\TraitUseAdaptation\Precedence) { - foreach ($adaptation->insteadof as &$insteadof) { - $insteadof = $this->resolveClassName($insteadof); - } - } - } - } - - return null; - } - - /** @param Stmt\Use_::TYPE_* $type */ - private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null): void { - // Add prefix for group uses - $name = $prefix ? Name::concat($prefix, $use->name) : $use->name; - // Type is determined either by individual element or whole use declaration - $type |= $use->type; - - $this->nameContext->addAlias( - $name, (string) $use->getAlias(), $type, $use->getAttributes() - ); - } - - /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure|Expr\ArrowFunction $node */ - private function resolveSignature($node): void { - foreach ($node->params as $param) { - $param->type = $this->resolveType($param->type); - $this->resolveAttrGroups($param); - } - $node->returnType = $this->resolveType($node->returnType); - } - - /** - * @template T of Node\Identifier|Name|Node\ComplexType|null - * @param T $node - * @return T - */ - private function resolveType(?Node $node): ?Node { - if ($node instanceof Name) { - return $this->resolveClassName($node); - } - if ($node instanceof Node\NullableType) { - $node->type = $this->resolveType($node->type); - return $node; - } - if ($node instanceof Node\UnionType || $node instanceof Node\IntersectionType) { - foreach ($node->types as &$type) { - $type = $this->resolveType($type); - } - return $node; - } - return $node; - } - - /** - * Resolve name, according to name resolver options. - * - * @param Name $name Function or constant name to resolve - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* - * - * @return Name Resolved name, or original name with attribute - */ - protected function resolveName(Name $name, int $type): Name { - if (!$this->replaceNodes) { - $resolvedName = $this->nameContext->getResolvedName($name, $type); - if (null !== $resolvedName) { - $name->setAttribute('resolvedName', $resolvedName); - } else { - $name->setAttribute('namespacedName', FullyQualified::concat( - $this->nameContext->getNamespace(), $name, $name->getAttributes())); - } - return $name; - } - - if ($this->preserveOriginalNames) { - // Save the original name - $originalName = $name; - $name = clone $originalName; - $name->setAttribute('originalName', $originalName); - } - - $resolvedName = $this->nameContext->getResolvedName($name, $type); - if (null !== $resolvedName) { - return $resolvedName; - } - - // unqualified names inside a namespace cannot be resolved at compile-time - // add the namespaced version of the name as an attribute - $name->setAttribute('namespacedName', FullyQualified::concat( - $this->nameContext->getNamespace(), $name, $name->getAttributes())); - return $name; - } - - protected function resolveClassName(Name $name): Name { - return $this->resolveName($name, Stmt\Use_::TYPE_NORMAL); - } - - protected function addNamespacedName(Node $node): void { - $node->namespacedName = Name::concat( - $this->nameContext->getNamespace(), (string) $node->name); - } - - protected function resolveAttrGroups(Node $node): void { - foreach ($node->attrGroups as $attrGroup) { - foreach ($attrGroup->attrs as $attr) { - $attr->name = $this->resolveClassName($attr->name); - } - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php deleted file mode 100644 index 38fedfd50..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +++ /dev/null @@ -1,51 +0,0 @@ -$node->getAttribute('parent'), the previous - * node can be accessed through $node->getAttribute('previous'), - * and the next node can be accessed through $node->getAttribute('next'). - */ -final class NodeConnectingVisitor extends NodeVisitorAbstract { - /** - * @var Node[] - */ - private array $stack = []; - - /** - * @var ?Node - */ - private $previous; - - public function beforeTraverse(array $nodes) { - $this->stack = []; - $this->previous = null; - } - - public function enterNode(Node $node) { - if (!empty($this->stack)) { - $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); - } - - if ($this->previous !== null && $this->previous->getAttribute('parent') === $node->getAttribute('parent')) { - $node->setAttribute('previous', $this->previous); - $this->previous->setAttribute('next', $node); - } - - $this->stack[] = $node; - } - - public function leaveNode(Node $node) { - $this->previous = $node; - - array_pop($this->stack); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php deleted file mode 100644 index 1e7e9e8be..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +++ /dev/null @@ -1,38 +0,0 @@ -$node->getAttribute('parent'). - */ -final class ParentConnectingVisitor extends NodeVisitorAbstract { - /** - * @var Node[] - */ - private array $stack = []; - - public function beforeTraverse(array $nodes) { - $this->stack = []; - } - - public function enterNode(Node $node) { - if (!empty($this->stack)) { - $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); - } - - $this->stack[] = $node; - } - - public function leaveNode(Node $node) { - array_pop($this->stack); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php deleted file mode 100644 index 6fb15cca4..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +++ /dev/null @@ -1,24 +0,0 @@ -'", - "T_IS_GREATER_OR_EQUAL", - "T_SL", - "T_SR", - "'+'", - "'-'", - "'.'", - "'*'", - "'/'", - "'%'", - "'!'", - "T_INSTANCEOF", - "'~'", - "T_INC", - "T_DEC", - "T_INT_CAST", - "T_DOUBLE_CAST", - "T_STRING_CAST", - "T_ARRAY_CAST", - "T_OBJECT_CAST", - "T_BOOL_CAST", - "T_UNSET_CAST", - "'@'", - "T_POW", - "'['", - "T_NEW", - "T_CLONE", - "T_EXIT", - "T_IF", - "T_ELSEIF", - "T_ELSE", - "T_ENDIF", - "T_LNUMBER", - "T_DNUMBER", - "T_STRING", - "T_STRING_VARNAME", - "T_VARIABLE", - "T_NUM_STRING", - "T_INLINE_HTML", - "T_ENCAPSED_AND_WHITESPACE", - "T_CONSTANT_ENCAPSED_STRING", - "T_ECHO", - "T_DO", - "T_WHILE", - "T_ENDWHILE", - "T_FOR", - "T_ENDFOR", - "T_FOREACH", - "T_ENDFOREACH", - "T_DECLARE", - "T_ENDDECLARE", - "T_AS", - "T_SWITCH", - "T_MATCH", - "T_ENDSWITCH", - "T_CASE", - "T_DEFAULT", - "T_BREAK", - "T_CONTINUE", - "T_GOTO", - "T_FUNCTION", - "T_FN", - "T_CONST", - "T_RETURN", - "T_TRY", - "T_CATCH", - "T_FINALLY", - "T_USE", - "T_INSTEADOF", - "T_GLOBAL", - "T_STATIC", - "T_ABSTRACT", - "T_FINAL", - "T_PRIVATE", - "T_PROTECTED", - "T_PUBLIC", - "T_READONLY", - "T_VAR", - "T_UNSET", - "T_ISSET", - "T_EMPTY", - "T_HALT_COMPILER", - "T_CLASS", - "T_TRAIT", - "T_INTERFACE", - "T_ENUM", - "T_EXTENDS", - "T_IMPLEMENTS", - "T_OBJECT_OPERATOR", - "T_NULLSAFE_OBJECT_OPERATOR", - "T_LIST", - "T_ARRAY", - "T_CALLABLE", - "T_CLASS_C", - "T_TRAIT_C", - "T_METHOD_C", - "T_FUNC_C", - "T_LINE", - "T_FILE", - "T_START_HEREDOC", - "T_END_HEREDOC", - "T_DOLLAR_OPEN_CURLY_BRACES", - "T_CURLY_OPEN", - "T_PAAMAYIM_NEKUDOTAYIM", - "T_NAMESPACE", - "T_NS_C", - "T_DIR", - "T_NS_SEPARATOR", - "T_ELLIPSIS", - "T_NAME_FULLY_QUALIFIED", - "T_NAME_QUALIFIED", - "T_NAME_RELATIVE", - "T_ATTRIBUTE", - "';'", - "']'", - "'('", - "')'", - "'{'", - "'}'", - "'`'", - "'\"'", - "'$'" - ); - - protected array $tokenToSymbol = array( - 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 56, 166, 168, 167, 55, 168, 168, - 161, 162, 53, 50, 8, 51, 52, 54, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 31, 159, - 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 70, 168, 160, 36, 168, 165, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 163, 35, 164, 58, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, - 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, - 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158 - ); - - protected array $action = array( - 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, - 138, 38,-32766,-32766,-32766, 151,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 102, 103, 104, 105, 106, 1112, 1113, - 1114, 1111, 1110, 1109, 1115, 745, 744,-32766,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1245, 837,-32766, 1322, 754,-32766,-32766,-32766,-32766, - -594,-32766,-32766,-32766, 104, 105, 106, -594, 1306, 265, - 139, 404, 758, 759, 760, 761, 990,-32766, 429,-32766, - -32766, -16,-32766, 242, 1027, 815, 762, 763, 764, 765, - 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, - 794, 795, 783, 784, 345, 346, 786, 787, 772, 773, - 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, - 584, 779, 780, 585, 586,-32766, 803, 801, 802, 814, - 798, 799, 835, 826, 587, 588, 797, 589, 590, 591, - 592, 593, 594, 826, 459, 460, 461, 1036, 800, 595, - 596, 941, 140, 2, 133, 134, 135, 582, 136, 137, - 1060, 751, 752, 753, 138, 38, -328, -110, -110, 1326, - 290, 23, -110,-32766,-32766,-32766, 1325, 35, -110, 1112, - 1113, 1114, 1111, 1110, 1109, 1115, 612,-32766, 129, 745, - 744, 107, 108, 109,-32766, 274,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 828, 991, -194, 145, 110, 298, 754, - 836, 75,-32766,-32766,-32766, 1351, 142, 326, 1352, -594, - 326, -594, 254, 265, 139, 404, 758, 759, 760, 761, - 82, -272, 429,-32766, 326,-32766,-32766,-32766,-32766, 815, - 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, - 791, 583, 792, 793, 794, 795, 783, 784, 345, 346, - 786, 787, 772, 773, 774, 776, 777, 778, 356, 818, - 819, 820, 821, 822, 584, 779, 780, 585, 586, 830, - 803, 801, 802, 814, 798, 799, 712, 309, 587, 588, - 797, 589, 590, 591, 592, 593, 594, -78, 83, 84, - 85, -85, 800, 595, 596, 311, 149, 775, 746, 747, - 748, 749, 750, 725, 751, 752, 753, 788, 789, 37, - -328, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 323, 274, 482,-32766,-32766, - -32766, -58,-32766,-32766,-32766, 959, 960, 127, 110, -194, - 961, 339, 754,-32766,-32766,-32766, 955, -85, 291,-32766, - 1088,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, - 759, 760, 761, -193,-32766, 824,-32766,-32766,-32766, -367, - 429, -367, 815, 762, 763, 764, 765, 766, 767, 768, - 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, - 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, - 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, - 781, 782, -548, 803, 801, 802, 814, 798, 799, 340, - 327, 790, 796, 797, 804, 805, 807, 806, 808, 809, - 1033, 391, 606, 7,-32766, 800, 811, 810, 50, 51, - 52, 513, 53, 54, 831, 1240, 1239, 1241, 55, 56, - -110, 57, 1036, 920, 1090, -110, 1036, -110, 291, 483, - 745, 744, 305, 382, 381, -110, -110, -110, -110, -110, - -110, -110, -110, 423, 920, 283, -548, -548, 152, 290, - 380, 381, 1245, 715, 467, 468, 58, 59, 370, 21, - 423, -545, 60, 556, 61, 248, 249, 62, 63, 64, - 65, 66, 67, 68, 69, -548, 28, 267, 70, 445, - 514, 1104, 374, -342, 1272, 1273, 515, -193, 835, 154, - 832, -544, 1270, 42, 25, 516, 389, 517, 241, 518, - 920, 519, 298, 1238, 520, 521, 910, 920, 441, 44, - 45, 446, 377, 376,-32766, 46, 522, 1023, 1022, 1021, - 1024, 368, 338, 442, 1278, -545, -545, 910, 1231, 443, - 524, 525, 526, 835, 1245, 835, 1036, 716, 1341, 1236, - -545, 155, 528, 529,-32766, 1259, 1260, 1261, 1262, 1256, - 1257, 297, -551, 943, -545, -544, -544, 1263, 1258, 290, - 1035, 1240, 1239, 1241, 298, 444, 1036, 71, 1266, 841, - -544, 321, 322, 326, -153, -153, -153, 920, 1240, 1239, - 1241, 922, -550, 910, -544, 710, 943, -591,-32766, -153, - 910, -153, 357, -153, -591, -153, 862, 1033, 863, 1089, - 36, 251, 922, 737, 156, 375, 710, 717, 862, -585, - 863, -585, 75, 158, -546, 835, 959, 960, 326, 1036, - -57, 523, 920,-32766,-32766, 362, 896, 955, -110, -110, - -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 745, 744, 656, 26, 835, - -110, -110, 720, 745, 744, -110, 33, 834, 922, 124, - 910, -110, 710, -153, 125, 922, 675, 676, 130, 710, - -32766, 150, 407, 131, 1150, 1152, 48, 144, -546, -546, - 378, 379,-32766, 383, 384, -543, 28, 159, 1238, 920, - 160, 298, 1059, -546, 75,-32766,-32766,-32766, 835,-32766, - 326,-32766, 1270,-32766, -87, 910,-32766, -546, 647, 648, - 161,-32766,-32766,-32766, -4, 920, -84,-32766,-32766, 727, - 162, 287, 163,-32766, 420, -302, -78, -73, -72, -71, - 141, 287,-32766, -70, 326, 976, 745, 744, 1231, 710, - 299, 300, -69, -68, -67, -298, -591, -66, -591, -543, - -543, -65, 528, 529, -46, 1259, 1260, 1261, 1262, 1256, - 1257, -18, 74, 148, -543, 273, 284, 1263, 1258, 126, - -543, 726, 910,-32766, 729, 919, 147, 73, -543, 1238, - 922, 690, 322, 326, 710, 279,-32766,-32766,-32766, 280, - -32766, 285,-32766, 286,-32766, 332, 288,-32766, 910, 289, - 292, 49,-32766,-32766,-32766, 293, 274, 1033,-32766,-32766, - 937, 110, -50, 685,-32766, 420, 146, 691, 826, 701, - 375, 703, 436,-32766, 1353, 20, 561, 296, 645, 1036, - 835, 959, 960, 1119, -543, -543, 523,-32766, 692, 693, - 306, 527, 955, -110, -110, -110, 132, 922, 834, -543, - 464, 710, 283, 662, 657,-32766, 1240, 1239, 1241, 678, - 304, 1238, 283, -543, 10, 301, 302, 493,-32766,-32766, - -32766, 663,-32766, 922,-32766, 679,-32766, 710, -4,-32766, - 373, 40, -508, 956,-32766,-32766,-32766, -275, 731,-32766, - -32766,-32766, 920, 303, 128, 1238,-32766, 420, 310, 0, - 567, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, - -32766,-32766, 0,-32766, 0, 1277, -498, 0,-32766,-32766, - -32766,-32766, 1279, 0,-32766,-32766, 8, 1238, 24, 372, - -32766, 420, 920, 1267,-32766,-32766,-32766, 610,-32766,-32766, - -32766, 939,-32766, 298, -579,-32766, 846, 41, 734, 488, - -32766,-32766,-32766,-32766, 735, 854,-32766,-32766, 901, 1238, - 574, 1000,-32766, 420, 977, 984,-32766,-32766,-32766, 974, - -32766,-32766,-32766, 985,-32766, 910, 899,-32766, 972, 1093, - 1096, 1097,-32766,-32766,-32766, 1094, 1095, 1101,-32766,-32766, - 1292, -250, -250, -250,-32766, 420, 1310, 375, 1344, 650, - 28, 267, -578,-32766, -577, -551, -550, -549, 959, 960, - -492, 1, 835, 523, 29, 910, 1270, 30, 896, 955, - -110, -110, -110, 39, 43, 47, 72, 76, 77, 78, - 79, -249, -249, -249, 80, 81, 143, 375, 153, 157, - 897, 247, 328, 357, 358, 359, 360, 361, 959, 960, - 922, 362, 1231, 523, 710, -250, 363, 364, 896, 955, - -110, -110, -110, 365, 366, 367, 369, 529, 28, 1259, - 1260, 1261, 1262, 1256, 1257, 437, 555, 1348, -273, -272, - 835, 1263, 1258, 13, 1270, 14,-32766, 15, 16, 18, - 922, 73, 1238, 1350, 710, -249, 322, 326, 406,-32766, - -32766,-32766, 484,-32766, 485,-32766, 492,-32766, 495, 496, - -32766, 497, 498, 502, 503,-32766,-32766,-32766, 504, 511, - 1231,-32766,-32766, 572, 696, 1249, 1190,-32766, 420, 1268, - 1062, 1061, 1042, 1226, 1038, 529,-32766, 1259, 1260, 1261, - 1262, 1256, 1257, -277, -102, 12, 17, 27, 295, 1263, - 1258, 405, 603, 607, 636, 702, 1194, 1244, 1191, 73, - 34, 1323, 0, 320, 322, 326, 371, 711, 714, 718, - 719, 721, 722, 723, 724, 0, 728, 713, 0, 857, - 856, 865, 949, 992, 864, 1349, 948, 946, 947, 950, - 1222, 930, 940, 928, 982, 983, 634, 1347, 1304, 1293, - 1311, 1320, 0, 1207, 0, 1271, 0, 326 - ); - - protected array $actionCheck = array( - 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 9, 10, 11, 14, 9, 10, 11, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, - 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 1, 1, 9, 1, 57, 9, 10, 11, 137, - 1, 9, 10, 11, 50, 51, 52, 8, 1, 71, - 72, 73, 74, 75, 76, 77, 31, 30, 80, 32, - 33, 31, 30, 14, 1, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 116, 128, 129, 130, 131, - 132, 133, 82, 80, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 80, 129, 130, 131, 138, 150, 151, - 152, 1, 154, 8, 2, 3, 4, 5, 6, 7, - 162, 9, 10, 11, 12, 13, 8, 117, 118, 1, - 161, 8, 122, 9, 10, 11, 8, 8, 128, 116, - 117, 118, 119, 120, 121, 122, 51, 137, 8, 37, - 38, 53, 54, 55, 30, 57, 32, 33, 34, 35, - 36, 37, 38, 80, 159, 8, 8, 69, 158, 57, - 159, 161, 9, 10, 11, 80, 163, 167, 83, 160, - 167, 162, 8, 71, 72, 73, 74, 75, 76, 77, - 163, 162, 80, 30, 167, 32, 33, 34, 35, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 156, - 128, 129, 130, 131, 132, 133, 163, 8, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 16, 9, 10, - 11, 31, 150, 151, 152, 8, 154, 2, 3, 4, - 5, 6, 7, 163, 9, 10, 11, 12, 13, 30, - 162, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 8, 57, 31, 9, 10, - 11, 16, 9, 10, 11, 117, 118, 14, 69, 162, - 122, 8, 57, 9, 10, 11, 128, 97, 30, 30, - 1, 32, 33, 34, 35, 36, 71, 72, 73, 74, - 75, 76, 77, 8, 30, 80, 32, 33, 34, 106, - 80, 108, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 70, 128, 129, 130, 131, 132, 133, 8, - 70, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 116, 106, 1, 108, 116, 150, 151, 152, 2, 3, - 4, 5, 6, 7, 80, 155, 156, 157, 12, 13, - 101, 15, 138, 1, 164, 106, 138, 108, 30, 163, - 37, 38, 113, 106, 107, 116, 117, 118, 119, 120, - 121, 122, 123, 116, 1, 161, 134, 135, 14, 161, - 106, 107, 1, 31, 134, 135, 50, 51, 8, 101, - 116, 70, 56, 85, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 163, 70, 71, 72, 73, - 74, 123, 8, 164, 78, 79, 80, 162, 82, 14, - 156, 70, 86, 87, 88, 89, 8, 91, 97, 93, - 1, 95, 158, 80, 98, 99, 84, 1, 8, 103, - 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 8, 146, 134, 135, 84, 122, 8, - 124, 125, 126, 82, 1, 82, 138, 31, 85, 116, - 149, 14, 136, 137, 116, 139, 140, 141, 142, 143, - 144, 145, 161, 122, 163, 134, 135, 151, 152, 161, - 137, 155, 156, 157, 158, 8, 138, 161, 1, 8, - 149, 165, 166, 167, 75, 76, 77, 1, 155, 156, - 157, 159, 161, 84, 163, 163, 122, 1, 137, 90, - 84, 92, 161, 94, 8, 96, 106, 116, 108, 159, - 147, 148, 159, 163, 14, 106, 163, 31, 106, 160, - 108, 162, 161, 14, 70, 82, 117, 118, 167, 138, - 16, 122, 1, 9, 10, 161, 127, 128, 129, 130, - 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 37, 38, 75, 76, 82, - 117, 118, 31, 37, 38, 122, 14, 155, 159, 16, - 84, 128, 163, 164, 16, 159, 75, 76, 16, 163, - 137, 101, 102, 16, 59, 60, 70, 16, 134, 135, - 106, 107, 74, 106, 107, 70, 70, 16, 80, 1, - 16, 158, 1, 149, 161, 87, 88, 89, 82, 91, - 167, 93, 86, 95, 31, 84, 98, 163, 111, 112, - 16, 103, 104, 105, 0, 1, 31, 109, 110, 31, - 16, 30, 16, 115, 116, 35, 31, 31, 31, 31, - 163, 30, 124, 31, 167, 159, 37, 38, 122, 163, - 134, 135, 31, 31, 31, 35, 160, 31, 162, 134, - 135, 31, 136, 137, 31, 139, 140, 141, 142, 143, - 144, 31, 154, 31, 149, 31, 31, 151, 152, 163, - 70, 31, 84, 74, 31, 31, 31, 161, 163, 80, - 159, 80, 166, 167, 163, 35, 87, 88, 89, 35, - 91, 35, 93, 35, 95, 35, 37, 98, 84, 37, - 37, 70, 103, 104, 105, 37, 57, 116, 109, 110, - 38, 69, 31, 77, 115, 116, 70, 116, 80, 80, - 106, 92, 108, 124, 83, 97, 89, 113, 113, 138, - 82, 117, 118, 82, 134, 135, 122, 85, 137, 138, - 114, 127, 128, 129, 130, 131, 31, 159, 155, 149, - 97, 163, 161, 96, 90, 74, 155, 156, 157, 94, - 133, 80, 161, 163, 150, 134, 135, 97, 87, 88, - 89, 100, 91, 159, 93, 100, 95, 163, 164, 98, - 149, 159, 149, 128, 103, 104, 105, 162, 164, 74, - 109, 110, 1, 132, 163, 80, 115, 116, 132, -1, - 153, -1, 87, 88, 89, 124, 91, -1, 93, -1, - 95, 137, -1, 98, -1, 146, 149, -1, 103, 104, - 105, 74, 146, -1, 109, 110, 149, 80, 149, 149, - 115, 116, 1, 160, 87, 88, 89, 153, 91, 124, - 93, 154, 95, 158, 161, 98, 160, 159, 159, 102, - 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, - 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, - 91, 124, 93, 159, 95, 84, 159, 98, 159, 159, - 159, 159, 103, 104, 105, 159, 159, 159, 109, 110, - 160, 100, 101, 102, 115, 116, 160, 106, 160, 160, - 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, - 161, 161, 82, 122, 161, 84, 86, 161, 127, 128, - 129, 130, 131, 161, 161, 161, 161, 161, 161, 161, - 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, - 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, - 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, - 129, 130, 131, 161, 161, 161, 161, 137, 70, 139, - 140, 141, 142, 143, 144, 161, 161, 164, 162, 162, - 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, - 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, - 88, 89, 162, 91, 162, 93, 162, 95, 162, 162, - 98, 162, 162, 162, 162, 103, 104, 105, 162, 162, - 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, - 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, - 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, - 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, - 163, 162, -1, 163, 166, 167, 163, 163, 163, 163, - 163, 163, 163, 163, 163, -1, 163, 163, -1, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, -1, 165, -1, 166, -1, 167 - ); - - protected array $actionBase = array( - 0, -2, 152, 549, 764, 941, 981, 751, 617, 310, - 123, 877, 556, 671, 671, 738, 671, 472, 626, 789, - 63, 305, 305, 789, 305, 493, 493, 493, 658, 658, - 658, 658, 749, 749, 897, 897, 929, 865, 831, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 51, 45, 451, 692, 1036, 1044, - 1040, 1045, 1034, 1033, 1039, 1041, 1046, 1083, 1084, 795, - 1085, 1086, 1082, 1087, 1042, 889, 1035, 1043, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 44, 343, 664, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 52, 52, - 52, 666, 666, 47, 354, 980, 203, 1048, 1048, 1048, - 1048, 1048, 1048, 1048, 1048, 1048, 665, 339, 164, 164, - 7, 7, 7, 7, 7, 50, 369, 583, -25, -25, - -25, -25, 448, 741, 501, 408, 283, 338, 394, 334, - 334, 14, 14, 531, 531, 9, 9, 531, 531, 531, - 478, 478, 478, 478, 441, 471, 552, 428, 824, 53, - 53, 53, 53, 824, 824, 824, 824, 826, 1089, 824, - 824, 824, 594, 750, 750, 781, 138, 138, 138, 750, - 540, 503, 503, 540, 238, 503, 67, 135, -78, 805, - 377, 499, -78, 362, 656, 636, 59, 743, 624, 743, - 1032, 481, 802, 802, 514, 773, 746, 878, 1064, 1049, - 821, 1080, 825, 1081, 15, 370, 745, 1031, 1031, 1031, - 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1090, 443, - 1032, 384, 1090, 1090, 1090, 443, 443, 443, 443, 443, - 443, 443, 443, 443, 443, 647, 384, 622, 641, 384, - 810, 443, 51, 817, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 780, 316, 51, 45, 150, 150, - 490, 83, 150, 150, 150, 150, 51, 51, 51, 51, - 624, 799, 797, 627, 834, 375, 799, 799, 799, 270, - 158, 69, 197, 740, 760, 345, 788, 788, 801, 900, - 900, 788, 798, 788, 801, 914, 788, 788, 900, 900, - 835, 180, 550, 353, 524, 565, 900, 279, 788, 788, - 788, 788, 816, 571, 788, 214, 198, 788, 788, 816, - 811, 785, 145, 777, 900, 900, 900, 816, 500, 777, - 777, 777, 839, 845, 765, 784, 337, 297, 611, 169, - 822, 784, 784, 788, 538, 765, 784, 765, 784, 837, - 784, 784, 784, 765, 784, 798, 431, 784, 721, 607, - 163, 784, 6, 915, 916, 723, 917, 912, 918, 964, - 919, 923, 1054, 899, 930, 913, 924, 965, 906, 903, - 794, 693, 698, 827, 783, 896, 792, 792, 792, 894, - 792, 792, 792, 792, 792, 792, 792, 792, 693, 823, - 830, 787, 933, 702, 707, 1011, 819, 926, 1088, 932, - 1013, 925, 772, 711, 977, 934, 774, 1050, 935, 936, - 986, 1014, 846, 1017, 963, 796, 979, 1065, 836, 945, - 1055, 792, 915, 923, 735, 913, 924, 906, 903, 770, - 766, 762, 763, 761, 752, 747, 748, 782, 1018, 893, - 833, 880, 940, 895, 693, 886, 971, 1047, 990, 992, - 1053, 803, 791, 888, 1066, 946, 952, 953, 1056, 1019, - 1057, 838, 973, 775, 994, 820, 1067, 996, 997, 999, - 1000, 1058, 1068, 1059, 891, 1060, 849, 814, 966, 807, - 1069, 1, 806, 808, 818, 955, 484, 931, 1061, 1070, - 1071, 1001, 1002, 1006, 1072, 1073, 927, 852, 975, 815, - 976, 967, 855, 856, 525, 813, 1020, 800, 804, 812, - 577, 640, 1074, 1075, 1076, 928, 790, 786, 860, 864, - 1021, 809, 1022, 1077, 649, 867, 724, 1078, 1012, 744, - 754, 281, 654, 335, 756, 779, 1063, 829, 776, 778, - 954, 754, 793, 869, 1079, 870, 871, 872, 1007, 876, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 456, 456, 456, 456, 456, 456, 305, 305, 305, 305, - 305, 456, 456, 456, 456, 456, 456, 456, 305, 305, - 0, 0, 305, 0, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 473, 473, 289, 289, 473, 289, 473, 473, 473, 473, - 473, 473, 473, 473, 473, 0, 289, 289, 289, 289, - 289, 289, 289, 289, 473, 835, 473, 138, 138, 138, - 138, 473, 473, 473, -88, -88, 473, 238, 473, 473, - 138, 138, 473, 473, 473, 473, 473, 473, 473, 473, - 473, 473, 473, 0, 0, 384, 503, 473, 798, 798, - 798, 798, 473, 473, 473, 473, 503, 503, 473, 473, - 473, 0, 0, 0, 0, 0, 0, 0, 0, 384, - 0, 0, 384, 0, 0, 798, 798, 473, 238, 835, - 168, 473, 0, 0, 0, 0, 384, 798, 384, 443, - 788, 503, 503, 788, 443, 443, 150, 51, 168, 620, - 620, 620, 620, 0, 0, 624, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 798, 0, 835, - 0, 798, 798, 798, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 798, - 0, 0, 900, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 914, 0, 0, 0, 0, 0, 0, - 798, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 792, 803, 0, 803, 0, 792, 792, 792, 0, 0, - 0, 0, 813, 809 - ); - - protected array $actionDefault = array( - 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 100,32767,32767,32767,32767, 597, 597, - 597, 597,32767,32767, 254, 102,32767,32767, 470, 387, - 387, 387,32767,32767, 541, 541, 541, 541, 541, 541, - 32767,32767,32767,32767,32767,32767, 470,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, - 324,32767,32767,32767,32767, 102,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 590,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 474, 453, - 454, 456, 457, 386, 542, 596, 327, 593, 385, 145, - 339, 329, 242, 330, 258, 475, 259, 476, 479, 480, - 215, 287, 382, 149, 150, 417, 471, 419, 469, 473, - 418, 392, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 408, 409, 410, 390, 391, 472, 450, 449, - 448,32767,32767, 415, 416,32767, 420,32767,32767,32767, - 32767,32767,32767,32767, 102,32767, 389, 423, 421, 422, - 439, 440, 437, 438, 441,32767,32767,32767, 442, 443, - 444, 445, 316,32767,32767, 366, 364, 316, 111,32767, - 32767, 430, 431,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 535, 447,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 102, - 32767, 100, 537, 412, 414, 504, 425, 426, 424, 393, - 32767, 511,32767, 102,32767, 513,32767,32767,32767,32767, - 32767,32767,32767, 536,32767, 543, 543,32767, 497, 100, - 195,32767,32767, 512,32767, 195, 195,32767,32767,32767, - 32767,32767,32767,32767,32767, 604, 497, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, - 110,32767,32767,32767, 100, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 190,32767, 268, 270, 102, - 558, 195,32767, 516,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 509,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 497, 435, 138,32767, 138, 543, 427, 428, 429, 499, - 543, 543, 543, 312, 289,32767,32767,32767,32767, 514, - 514, 100, 100, 100, 100, 509,32767,32767,32767,32767, - 111, 99, 99, 99, 99, 99, 103, 101,32767,32767, - 32767,32767, 223, 99,32767, 101, 101,32767,32767, 223, - 225, 212, 101, 227,32767, 562, 563, 223, 101, 227, - 227, 227, 247, 247, 486, 318, 101, 99, 101, 101, - 197, 318, 318,32767, 101, 486, 318, 486, 318, 199, - 318, 318, 318, 486, 318,32767, 101, 318, 214, 99, - 99, 318,32767,32767,32767, 499,32767,32767,32767,32767, - 32767,32767,32767, 222,32767,32767,32767,32767,32767,32767, - 32767,32767, 530,32767, 547, 560, 433, 434, 436, 545, - 458, 459, 460, 461, 462, 463, 464, 466, 592,32767, - 503,32767,32767,32767, 338,32767, 602,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 603,32767, 543,32767,32767,32767, - 32767, 432, 9, 74, 492, 42, 43, 51, 57, 520, - 521, 522, 523, 517, 518, 524, 519,32767,32767, 525, - 568,32767,32767, 544, 595,32767,32767,32767,32767,32767, - 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 530,32767, 136,32767,32767,32767,32767, - 32767,32767,32767,32767, 526,32767,32767,32767, 543,32767, - 32767,32767,32767, 314, 311,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 543,32767,32767,32767,32767,32767, 291,32767, 308, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 286,32767,32767, 381, - 499, 294, 296, 297,32767,32767,32767,32767, 360,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 152, 152, 3, 3, 341, 152, 152, 152, 341, 341, - 152, 341, 341, 341, 152, 152, 152, 152, 152, 152, - 280, 185, 262, 265, 247, 247, 152, 352, 152 - ); - - protected array $goto = array( - 196, 196, 1034, 1065, 697, 431, 661, 621, 658, 319, - 706, 425, 313, 314, 335, 576, 430, 336, 432, 638, - 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, - 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, - 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, - 189, 190, 191, 192, 218, 216, 219, 536, 537, 421, - 538, 540, 541, 542, 543, 544, 545, 546, 547, 1136, - 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, - 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, - 258, 259, 260, 261, 262, 263, 264, 268, 269, 270, - 271, 281, 282, 316, 317, 318, 426, 427, 428, 581, - 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, - 200, 239, 188, 189, 190, 191, 192, 218, 1136, 201, - 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, - 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, - 212, 213, 214, 855, 466, 466, 278, 278, 278, 278, - 623, 623, 351, 466, 1269, 600, 1269, 1269, 1269, 1269, - 1269, 1269, 1269, 1269, 1269, 1287, 1287, 599, 1100, 1287, - 709, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - 508, 700, 458, 1098, 975, 559, 552, 860, 419, 909, - 904, 905, 918, 861, 906, 858, 907, 908, 859, 848, - 827, 912, 354, 354, 354, 354, 396, 399, 560, 601, - 605, 1087, 1082, 1083, 1084, 341, 552, 559, 568, 569, - 344, 579, 602, 616, 617, 408, 409, 1232, 440, 479, - 670, 22, 671, 886, 412, 413, 414, 481, 684, 349, - 1237, 415, 1237, 1107, 1108, 347, 833, 1034, 1034, 1237, - 573, 848, 1034, 1327, 1034, 1034, 1040, 1039, 1034, 1034, - 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1319, - 1319, 1319, 1319, 1237, 893, 851, 893, 893, 1237, 1237, - 1237, 1237, 1233, 1234, 1237, 1237, 1237, 833, 355, 833, - 843, 996, 252, 252, 1043, 1044, 1037, 1037, 355, 355, - 681, 952, 394, 926, 1029, 1045, 1046, 927, 1235, 1295, - 1296, 942, 355, 355, 942, 913, 355, 914, 1354, 250, - 250, 250, 250, 245, 253, 548, 548, 548, 548, 554, - 604, 1285, 1285, 355, 355, 1285, 571, 1285, 1285, 1285, - 1285, 1285, 1285, 1285, 1285, 1285, 539, 539, 342, 424, - 539, 611, 539, 539, 539, 539, 539, 539, 539, 539, - 539, 566, 476, 1312, 1313, 733, 637, 639, 325, 308, - 659, 848, 343, 342, 683, 687, 1010, 695, 704, 1006, - 660, 1298, 609, 624, 627, 628, 629, 630, 651, 652, - 653, 708, 1216, 944, 1314, 1315, 1217, 1220, 945, 1221, - 1337, 1337, 686, 352, 353, 868, 553, 563, 450, 450, - 450, 553, 1309, 563, 1309, 1133, 397, 462, 1337, 1058, - 880, 1309, 1185, 867, 500, 5, 501, 6, 469, 580, - 470, 471, 507, 554, 878, 1340, 1340, 1345, 1346, 433, - 438, 550, 666, 550, 433, 682, 1321, 1321, 1321, 1321, - 550, 337, 1041, 1041, 931, 1123, 873, 665, 1052, 1048, - 1049, 619, 845, 876, 324, 275, 324, 1015, 967, 410, - 705, 577, 614, 1305, 456, 872, 403, 664, 994, 969, - 969, 969, 969, 866, 870, 456, 963, 970, 881, 869, - 1070, 1074, 631, 633, 635, 1227, 1230, 958, 615, 978, - 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, - 450, 999, 1018, 450, 971, 1073, 732, 477, 1228, 1307, - 1307, 1073, 736, 968, 551, 1008, 1003, 882, 694, 1075, - 1071, 829, 255, 255, 980, 0, 1118, 0, 1013, 1013, - 694, 0, 0, 0, 694, 1116, 885 - ); - - protected array $gotoCheck = array( - 42, 42, 73, 127, 73, 66, 66, 56, 56, 66, - 9, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 86, 86, 26, 86, 86, 86, 27, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 15, 149, 149, 23, 23, 23, 23, - 108, 108, 97, 149, 108, 130, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 170, 170, 8, 8, 170, - 8, 170, 170, 170, 170, 170, 170, 170, 170, 170, - 8, 8, 83, 8, 49, 76, 76, 15, 43, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 22, - 6, 15, 24, 24, 24, 24, 59, 59, 59, 59, - 59, 15, 15, 15, 15, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 82, 82, 20, 83, 84, - 82, 76, 82, 45, 82, 82, 82, 84, 82, 179, - 73, 82, 73, 144, 144, 82, 12, 73, 73, 73, - 172, 22, 73, 181, 73, 73, 118, 118, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 9, - 9, 9, 9, 73, 25, 25, 25, 25, 73, 73, - 73, 73, 20, 20, 73, 73, 73, 12, 14, 12, - 20, 103, 5, 5, 119, 119, 89, 89, 14, 14, - 89, 89, 62, 73, 89, 89, 89, 73, 20, 20, - 20, 9, 14, 14, 9, 65, 14, 65, 14, 5, - 5, 5, 5, 5, 5, 107, 107, 107, 107, 14, - 107, 171, 171, 14, 14, 171, 104, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 173, 173, 168, 13, - 173, 13, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 48, 176, 176, 176, 48, 48, 48, 169, 169, - 48, 22, 168, 168, 48, 48, 48, 48, 48, 48, - 64, 14, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 79, 79, 178, 178, 79, 79, 79, 79, - 182, 182, 14, 97, 97, 35, 9, 9, 23, 23, - 23, 9, 130, 9, 130, 150, 9, 9, 182, 114, - 35, 130, 151, 35, 155, 46, 155, 46, 9, 9, - 9, 9, 155, 14, 9, 182, 182, 9, 9, 117, - 113, 19, 120, 19, 117, 116, 130, 130, 130, 130, - 19, 29, 117, 117, 17, 17, 39, 117, 117, 117, - 117, 17, 18, 9, 24, 24, 24, 17, 93, 93, - 93, 2, 2, 130, 19, 17, 28, 17, 17, 19, - 19, 19, 19, 17, 37, 19, 19, 19, 16, 16, - 16, 16, 85, 85, 85, 17, 14, 92, 80, 16, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 50, 110, 23, 50, 130, 50, 157, 160, 130, - 130, 130, 99, 16, 50, 50, 50, 41, 7, 132, - 129, 7, 5, 5, 96, -1, 147, -1, 107, 107, - 7, -1, -1, -1, 7, 16, 16 - ); - - protected array $gotoBase = array( - 0, 0, -221, 0, 0, 311, 200, 541, 179, -10, - 0, 0, -30, 32, 11, -185, 56, 9, 173, 196, - -146, 0, -59, 163, 219, 291, 18, 22, 159, 175, - 0, 0, 0, 0, 0, 54, 0, 165, 0, 153, - 0, 106, -1, 189, 0, 230, -291, 0, -330, 186, - 519, 0, 0, 0, 0, 0, -33, 0, 0, 181, - 0, 0, 280, 0, 158, 321, -236, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -140, 0, 0, 4, - 174, 44, -246, -76, -220, 33, -698, 0, 0, 37, - 0, 0, 188, 184, 0, 0, 111, -311, 0, 135, - 0, 0, 0, 276, 313, 0, 0, 317, -71, 0, - 162, 0, 0, 183, 166, 0, 182, 187, -3, 29, - 172, 0, 0, 0, 0, 0, 0, 1, 0, 176, - 167, 0, 107, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -12, 0, 0, 112, 0, 130, - 190, 168, 0, 0, 0, -51, 0, 97, 0, 0, - 169, 0, 0, 0, 0, 0, 0, 0, 71, 67, - -56, 110, 241, 125, 0, 0, 82, 0, 42, 229, - 0, 242, 113, 0, 0 - ); - - protected array $gotoDefault = array( - -32768, 512, 740, 4, 741, 935, 816, 825, 597, 530, - 707, 348, 625, 422, 1303, 911, 1122, 578, 844, 1246, - 1254, 457, 847, 330, 730, 923, 894, 895, 400, 386, - 392, 398, 649, 626, 494, 879, 453, 871, 486, 874, - 452, 883, 164, 418, 510, 887, 3, 890, 557, 921, - 973, 387, 898, 388, 677, 900, 562, 902, 903, 395, - 401, 402, 1127, 570, 622, 915, 256, 564, 916, 385, - 917, 925, 390, 393, 688, 465, 505, 499, 411, 1102, - 565, 608, 646, 447, 473, 620, 632, 618, 480, 434, - 416, 329, 957, 965, 487, 463, 979, 350, 987, 738, - 1135, 640, 489, 995, 641, 1002, 1005, 531, 532, 478, - 1017, 272, 1020, 490, 19, 667, 1031, 1032, 668, 642, - 1054, 643, 669, 644, 1056, 472, 598, 1064, 454, 1072, - 1291, 455, 1076, 266, 1079, 277, 417, 435, 1085, 1086, - 9, 1092, 698, 699, 11, 276, 509, 1117, 689, 451, - 1134, 439, 1204, 1206, 558, 491, 1224, 1223, 680, 506, - 1229, 448, 1294, 449, 533, 474, 315, 534, 1338, 307, - 333, 312, 549, 294, 334, 535, 475, 1300, 1308, 331, - 31, 1328, 1339, 575, 613 - ); - - protected array $ruleToNonTerminal = array( - 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, - 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, - 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, - 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, - 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, - 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, - 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, - 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 25, 25, 50, 69, 69, 72, 72, 71, - 70, 70, 63, 75, 75, 76, 76, 77, 77, 78, - 78, 79, 79, 80, 80, 26, 26, 27, 27, 27, - 27, 27, 88, 88, 90, 90, 83, 83, 91, 91, - 92, 92, 92, 84, 84, 87, 87, 85, 85, 93, - 94, 94, 57, 57, 65, 65, 68, 68, 68, 67, - 95, 95, 96, 58, 58, 58, 58, 97, 97, 98, - 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, - 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, - 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, - 111, 111, 112, 112, 112, 112, 110, 110, 110, 114, - 114, 114, 114, 89, 89, 117, 117, 117, 118, 118, - 115, 115, 119, 119, 121, 121, 122, 122, 116, 123, - 123, 120, 124, 124, 124, 124, 113, 113, 82, 82, - 82, 20, 20, 20, 126, 125, 125, 127, 127, 127, - 127, 60, 128, 128, 129, 61, 131, 131, 132, 132, - 133, 133, 86, 134, 134, 134, 134, 134, 134, 134, - 139, 139, 140, 140, 141, 141, 141, 141, 141, 142, - 143, 143, 138, 138, 135, 135, 137, 137, 145, 145, - 144, 144, 144, 144, 144, 144, 144, 136, 146, 146, - 148, 147, 147, 62, 104, 149, 149, 56, 56, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 156, 150, 150, 155, 155, 158, 159, - 159, 160, 161, 162, 162, 162, 162, 19, 19, 73, - 73, 73, 73, 151, 151, 151, 151, 164, 164, 152, - 152, 154, 154, 154, 157, 157, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 171, 171, 171, 108, 173, - 173, 173, 173, 153, 153, 153, 153, 153, 153, 153, - 153, 59, 59, 167, 167, 167, 167, 174, 174, 163, - 163, 163, 175, 175, 175, 175, 175, 175, 74, 74, - 66, 66, 66, 66, 130, 130, 130, 130, 178, 177, - 166, 166, 166, 166, 166, 166, 166, 165, 165, 165, - 176, 176, 176, 176, 107, 172, 180, 180, 179, 179, - 181, 181, 181, 181, 181, 181, 181, 181, 169, 169, - 169, 169, 168, 183, 182, 182, 182, 182, 182, 182, - 182, 182, 184, 184, 184, 184 - ); - - protected array $ruleToLength = array( - 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, - 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, - 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, - 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, - 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, - 1, 2, 2, 3, 1, 3, 2, 3, 1, 3, - 3, 2, 0, 1, 1, 1, 1, 1, 3, 7, - 10, 5, 7, 9, 5, 3, 3, 3, 3, 3, - 3, 1, 2, 5, 7, 9, 6, 5, 6, 3, - 2, 1, 1, 1, 1, 0, 2, 1, 3, 8, - 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, - 1, 3, 1, 1, 1, 8, 9, 7, 8, 7, - 6, 8, 0, 2, 0, 2, 1, 2, 1, 2, - 1, 1, 1, 0, 2, 0, 2, 0, 2, 2, - 1, 3, 1, 4, 1, 4, 1, 1, 4, 2, - 1, 3, 3, 3, 4, 4, 5, 0, 2, 4, - 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, - 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, - 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, - 0, 2, 1, 1, 1, 1, 6, 8, 6, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, - 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, - 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, - 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, - 2, 0, 1, 5, 5, 6, 10, 3, 5, 1, - 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, - 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, - 1, 1, 3, 2, 2, 3, 1, 0, 1, 1, - 3, 3, 3, 4, 4, 1, 1, 2, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, - 3, 4, 4, 2, 2, 4, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, - 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, - 10, 9, 10, 8, 3, 2, 0, 4, 2, 1, - 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, - 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, - 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, - 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, - 3, 1, 1, 4, 4, 1, 4, 4, 0, 1, - 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, - 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, - 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, - 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, - 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, - 6, 3, 1, 1, 2, 1 - ); - - protected function initReduceCallbacks(): void { - $this->reduceCallbacks = [ - 0 => null, - 1 => function ($stackPos) { - $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); - }, - 2 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; - }, - 3 => function ($stackPos) { - $this->semValue = array(); - }, - 4 => function ($stackPos) { - $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 5 => null, - 6 => null, - 7 => null, - 8 => null, - 9 => null, - 10 => null, - 11 => null, - 12 => null, - 13 => null, - 14 => null, - 15 => null, - 16 => null, - 17 => null, - 18 => null, - 19 => null, - 20 => null, - 21 => null, - 22 => null, - 23 => null, - 24 => null, - 25 => null, - 26 => null, - 27 => null, - 28 => null, - 29 => null, - 30 => null, - 31 => null, - 32 => null, - 33 => null, - 34 => null, - 35 => null, - 36 => null, - 37 => null, - 38 => null, - 39 => null, - 40 => null, - 41 => null, - 42 => null, - 43 => null, - 44 => null, - 45 => null, - 46 => null, - 47 => null, - 48 => null, - 49 => null, - 50 => null, - 51 => null, - 52 => null, - 53 => null, - 54 => null, - 55 => null, - 56 => null, - 57 => null, - 58 => null, - 59 => null, - 60 => null, - 61 => null, - 62 => null, - 63 => null, - 64 => null, - 65 => null, - 66 => null, - 67 => null, - 68 => null, - 69 => null, - 70 => null, - 71 => null, - 72 => null, - 73 => null, - 74 => null, - 75 => null, - 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "emitError(new Error('Cannot use "getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); - }, - 77 => null, - 78 => null, - 79 => null, - 80 => null, - 81 => null, - 82 => null, - 83 => null, - 84 => null, - 85 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 88 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 89 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 90 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 91 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 92 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 93 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 94 => null, - 95 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 96 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 97 => function ($stackPos) { - /* nothing */ - }, - 98 => function ($stackPos) { - /* nothing */ - }, - 99 => function ($stackPos) { - /* nothing */ - }, - 100 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); - }, - 101 => null, - 102 => null, - 103 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 104 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 105 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 106 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 107 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 108 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 109 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 110 => function ($stackPos) { - $this->semValue = []; - }, - 111 => null, - 112 => null, - 113 => null, - 114 => null, - 115 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->handleHaltCompiler(), $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 116 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($this->semValue); - }, - 117 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 118 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 119 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 120 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 121 => null, - 122 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 123 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_FUNCTION; - }, - 124 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_CONSTANT; - }, - 125 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); - }, - 126 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); - }, - 127 => null, - 128 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 129 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 130 => null, - 131 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 132 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 133 => null, - 134 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 135 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 136 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 137 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 138 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 139 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 140 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; - }, - 141 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; - }, - 142 => null, - 143 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 144 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 145 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 146 => null, - 147 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 148 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 149 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 150 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 151 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; - }, - 152 => function ($stackPos) { - $this->semValue = array(); - }, - 153 => function ($stackPos) { - $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 154 => null, - 155 => null, - 156 => null, - 157 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 158 => function ($stackPos) { - $this->semValue = new Stmt\Block($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 159 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => $this->semStack[$stackPos-(7-5)], 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); - }, - 160 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); - }, - 161 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - }, - 162 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); - }, - 163 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); - }, - 164 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - }, - 165 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 166 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 167 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 168 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 169 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 170 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 171 => function ($stackPos) { - - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('hasLeadingNewline', $this->inlineHtmlHasLeadingNewline($stackPos-(1-1))); - - }, - 172 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 173 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - }, - 174 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); - }, - 175 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); - }, - 176 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-4)], $this->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); - }, - 177 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - }, - 178 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->checkTryCatch($this->semValue); - }, - 179 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 180 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 181 => function ($stackPos) { - $this->semValue = null; /* means: no statement */ - }, - 182 => null, - 183 => function ($stackPos) { - $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); - }, - 184 => function ($stackPos) { - if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; - }, - 185 => function ($stackPos) { - $this->semValue = array(); - }, - 186 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 187 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 188 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 189 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); - }, - 190 => function ($stackPos) { - $this->semValue = null; - }, - 191 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 192 => null, - 193 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 194 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 195 => function ($stackPos) { - $this->semValue = false; - }, - 196 => function ($stackPos) { - $this->semValue = true; - }, - 197 => function ($stackPos) { - $this->semValue = false; - }, - 198 => function ($stackPos) { - $this->semValue = true; - }, - 199 => function ($stackPos) { - $this->semValue = false; - }, - 200 => function ($stackPos) { - $this->semValue = true; - }, - 201 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 202 => function ($stackPos) { - $this->semValue = []; - }, - 203 => null, - 204 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 205 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); - }, - 206 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); - }, - 207 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); - $this->checkClass($this->semValue, $stackPos-(7-2)); - }, - 208 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); - $this->checkClass($this->semValue, $stackPos-(8-3)); - }, - 209 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); - $this->checkInterface($this->semValue, $stackPos-(7-3)); - }, - 210 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); - }, - 211 => function ($stackPos) { - $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); - $this->checkEnum($this->semValue, $stackPos-(8-3)); - }, - 212 => function ($stackPos) { - $this->semValue = null; - }, - 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 214 => function ($stackPos) { - $this->semValue = null; - }, - 215 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 216 => function ($stackPos) { - $this->semValue = 0; - }, - 217 => null, - 218 => null, - 219 => function ($stackPos) { - $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; - }, - 220 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; - }, - 221 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; - }, - 222 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; - }, - 223 => function ($stackPos) { - $this->semValue = null; - }, - 224 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 225 => function ($stackPos) { - $this->semValue = array(); - }, - 226 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 227 => function ($stackPos) { - $this->semValue = array(); - }, - 228 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 229 => null, - 230 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 231 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 232 => null, - 233 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 234 => null, - 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 236 => function ($stackPos) { - if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; - }, - 237 => function ($stackPos) { - $this->semValue = null; - }, - 238 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 239 => null, - 240 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 241 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 242 => function ($stackPos) { - $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 243 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 244 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 245 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 246 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; - }, - 247 => function ($stackPos) { - $this->semValue = array(); - }, - 248 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 249 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 250 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 251 => null, - 252 => null, - 253 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); - }, - 254 => function ($stackPos) { - $this->semValue = []; - }, - 255 => null, - 256 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 257 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 258 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 259 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 260 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 261 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 262 => function ($stackPos) { - $this->semValue = array(); - }, - 263 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 264 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - }, - 265 => function ($stackPos) { - $this->semValue = array(); - }, - 266 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 267 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); - }, - 268 => function ($stackPos) { - $this->semValue = null; - }, - 269 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 270 => function ($stackPos) { - $this->semValue = null; - }, - 271 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); - }, - 272 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 273 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); - }, - 274 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 275 => function ($stackPos) { - $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); - }, - 276 => null, - 277 => function ($stackPos) { - $this->semValue = array(); - }, - 278 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 279 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 280 => function ($stackPos) { - $this->semValue = 0; - }, - 281 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; - }, - 282 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; - }, - 283 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; - }, - 284 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; - }, - 285 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; - }, - 286 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); - }, - 287 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); - $this->checkParam($this->semValue); - }, - 288 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - }, - 289 => null, - 290 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 291 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 292 => null, - 293 => null, - 294 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 295 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); - }, - 296 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 297 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 298 => null, - 299 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 300 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 301 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 302 => null, - 303 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 304 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 305 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 306 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 307 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 308 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 309 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 310 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 311 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 312 => null, - 313 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 314 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 315 => null, - 316 => function ($stackPos) { - $this->semValue = null; - }, - 317 => null, - 318 => function ($stackPos) { - $this->semValue = null; - }, - 319 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 320 => function ($stackPos) { - $this->semValue = null; - }, - 321 => function ($stackPos) { - $this->semValue = array(); - }, - 322 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 323 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); - }, - 324 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 325 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 326 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 327 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 328 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 329 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 330 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(3-1)]); - }, - 331 => null, - 332 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 333 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 334 => null, - 335 => null, - 336 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 337 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 338 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 339 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 340 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } else { $this->semValue = $this->semStack[$stackPos-(2-1)]; } - }, - 341 => function ($stackPos) { - $this->semValue = array(); - }, - 342 => function ($stackPos) { - $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 343 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); - $this->checkProperty($this->semValue, $stackPos-(5-2)); - }, - 344 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-1)]); - $this->checkClassConst($this->semValue, $stackPos-(5-2)); - }, - 345 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); - $this->checkClassConst($this->semValue, $stackPos-(6-2)); - }, - 346 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); - }, - 347 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 348 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - }, - 349 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ - }, - 350 => function ($stackPos) { - $this->semValue = array(); - }, - 351 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 352 => function ($stackPos) { - $this->semValue = array(); - }, - 353 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 354 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 355 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - }, - 356 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 357 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 358 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 359 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 360 => null, - 361 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); - }, - 362 => function ($stackPos) { - $this->semValue = null; - }, - 363 => null, - 364 => null, - 365 => function ($stackPos) { - $this->semValue = 0; - }, - 366 => function ($stackPos) { - $this->semValue = 0; - }, - 367 => null, - 368 => null, - 369 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; - }, - 370 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; - }, - 371 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; - }, - 372 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; - }, - 373 => function ($stackPos) { - $this->semValue = Modifiers::STATIC; - }, - 374 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; - }, - 375 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; - }, - 376 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; - }, - 377 => null, - 378 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 379 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 380 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 381 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 382 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 383 => null, - 384 => null, - 385 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 386 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 387 => function ($stackPos) { - $this->semValue = array(); - }, - 388 => null, - 389 => null, - 390 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 391 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 392 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 393 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 394 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - if (!$this->phpVersion->allowsAssignNewByReference()) { - $this->emitError(new Error('Cannot assign new by reference', $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]))); - } - - }, - 395 => null, - 396 => null, - 397 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 400 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 401 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 402 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 403 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 404 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 405 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 406 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 407 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 408 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 409 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 410 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 411 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 412 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 413 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 414 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 422 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 423 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 424 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 432 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 433 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 434 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 435 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 436 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 437 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 438 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 439 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 440 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 441 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 442 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 443 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 444 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 445 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 446 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 447 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 448 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - }, - 449 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 450 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 451 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 452 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 453 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 454 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 455 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 456 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 457 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 458 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 459 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); - }, - 460 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 461 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 462 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 463 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 464 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 465 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); - }, - 466 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 467 => null, - 468 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 469 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 470 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 471 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 472 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 473 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 474 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 475 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); - }, - 476 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); - }, - 477 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); - }, - 478 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); - }, - 479 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); - }, - 480 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); - }, - 481 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); - }, - 482 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); - }, - 483 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); - }, - 484 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 485 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 486 => function ($stackPos) { - $this->semValue = array(); - }, - 487 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 488 => null, - 489 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 490 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 491 => function ($stackPos) { - $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 492 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 493 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 494 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 495 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 496 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 497 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 498 => null, - 499 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 500 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 501 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 502 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 503 => null, - 504 => null, - 505 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 506 => function ($stackPos) { - $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; - }, - 507 => null, - 508 => null, - 509 => function ($stackPos) { - $this->semValue = null; - }, - 510 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 511 => function ($stackPos) { - $this->semValue = array(); - }, - 512 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); foreach ($this->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; - }, - 513 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 514 => function ($stackPos) { - $this->semValue = array(); - }, - 515 => null, - 516 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 517 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 518 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 519 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 520 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 521 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 522 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 523 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 524 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 525 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 526 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - }, - 527 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)])), $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; - }, - 528 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); - }, - 529 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - $this->createdArrays->attach($this->semValue); - }, - 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); - }, - 531 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->supportsUnicodeEscapes()); - }, - 532 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); - }, - 533 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->allowsInvalidOctals()); - }, - 534 => function ($stackPos) { - $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 535 => null, - 536 => null, - 537 => null, - 538 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); - }, - 539 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-2)], $this->tokenEndStack[$stackPos-(2-2)]), true); - }, - 540 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); - }, - 541 => function ($stackPos) { - $this->semValue = null; - }, - 542 => null, - 543 => null, - 544 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 545 => null, - 546 => null, - 547 => null, - 548 => null, - 549 => null, - 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 551 => null, - 552 => null, - 553 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 554 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 555 => null, - 556 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 557 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 558 => function ($stackPos) { - $this->semValue = null; - }, - 559 => null, - 560 => null, - 561 => null, - 562 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 563 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 564 => null, - 565 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 566 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 567 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; - }, - 568 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])) : $var; - }, - 569 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 570 => null, - 571 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 572 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 573 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 574 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 575 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 576 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 577 => null, - 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 579 => null, - 580 => null, - 581 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 582 => null, - 583 => function ($stackPos) { - $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; - }, - 584 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); - $this->postprocessList($this->semValue); - }, - 585 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); - }, - 586 => null, - 587 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ - }, - 588 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 589 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 590 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 591 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 592 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 593 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 594 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 595 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 596 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), true); - }, - 597 => function ($stackPos) { - /* Create an Error node now to remember the position. We'll later either report an error, - or convert this into a null element, depending on whether this is a creation or destructuring context. */ - $attrs = $this->createEmptyElemAttributes($this->tokenPos); - $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); - }, - 598 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 599 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 600 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 601 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); - }, - 602 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); $attrs['rawValue'] = $this->semStack[$stackPos-(1-1)]; $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $attrs); - }, - 603 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 604 => null, - 605 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, - 606 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 607 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 608 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 609 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - }, - 610 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); - }, - 611 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 612 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 613 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - }, - 614 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, - 615 => null, - ]; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php deleted file mode 100644 index f0b1a50b1..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +++ /dev/null @@ -1,1241 +0,0 @@ - Map of PHP token IDs to drop */ - protected array $dropTokens; - /** @var int[] Map of external symbols (static::T_*) to internal symbols */ - protected array $tokenToSymbol; - /** @var string[] Map of symbols to their names */ - protected array $symbolToName; - /** @var array Names of the production rules (only necessary for debugging) */ - protected array $productions; - - /** @var int[] Map of states to a displacement into the $action table. The corresponding action for this - * state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the - * action is defaulted, i.e. $actionDefault[$state] should be used instead. */ - protected array $actionBase; - /** @var int[] Table of actions. Indexed according to $actionBase comment. */ - protected array $action; - /** @var int[] Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol - * then the action is defaulted, i.e. $actionDefault[$state] should be used instead. */ - protected array $actionCheck; - /** @var int[] Map of states to their default action */ - protected array $actionDefault; - /** @var callable[] Semantic action callbacks */ - protected array $reduceCallbacks; - - /** @var int[] Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this - * non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted) */ - protected array $gotoBase; - /** @var int[] Table of states to goto after reduction. Indexed according to $gotoBase comment. */ - protected array $goto; - /** @var int[] Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal - * then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used. */ - protected array $gotoCheck; - /** @var int[] Map of non-terminals to the default state to goto after their reduction */ - protected array $gotoDefault; - - /** @var int[] Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for - * determining the state to goto after reduction. */ - protected array $ruleToNonTerminal; - /** @var int[] Map of rules to the length of their right-hand side, which is the number of elements that have to - * be popped from the stack(s) on reduction. */ - protected array $ruleToLength; - - /* - * The following members are part of the parser state: - */ - - /** @var mixed Temporary value containing the result of last semantic action (reduction) */ - protected $semValue; - /** @var mixed[] Semantic value stack (contains values of tokens and semantic action results) */ - protected array $semStack; - /** @var int[] Token start position stack */ - protected array $tokenStartStack; - /** @var int[] Token end position stack */ - protected array $tokenEndStack; - - /** @var ErrorHandler Error handler */ - protected ErrorHandler $errorHandler; - /** @var int Error state, used to avoid error floods */ - protected int $errorState; - - /** @var \SplObjectStorage|null Array nodes created during parsing, for postprocessing of empty elements. */ - protected ?\SplObjectStorage $createdArrays; - - /** @var Token[] Tokens for the current parse */ - protected array $tokens; - /** @var int Current position in token array */ - protected int $tokenPos; - - /** - * Initialize $reduceCallbacks map. - */ - abstract protected function initReduceCallbacks(): void; - - /** - * Creates a parser instance. - * - * Options: - * * phpVersion: ?PhpVersion, - * - * @param Lexer $lexer A lexer - * @param PhpVersion $phpVersion PHP version to target, defaults to latest supported. This - * option is best-effort: Even if specified, parsing will generally assume the latest - * supported version and only adjust behavior in minor ways, for example by omitting - * errors in older versions and interpreting type hints as a name or identifier depending - * on version. - */ - public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { - $this->lexer = $lexer; - $this->phpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); - - $this->initReduceCallbacks(); - $this->phpTokenToSymbol = $this->createTokenMap(); - $this->dropTokens = array_fill_keys( - [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], true - ); - } - - /** - * Parses PHP code into a node tree. - * - * If a non-throwing error handler is used, the parser will continue parsing after an error - * occurred and attempt to build a partial AST. - * - * @param string $code The source code to parse - * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults - * to ErrorHandler\Throwing. - * - * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and - * the parser was unable to recover from an error). - */ - public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array { - $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing(); - $this->createdArrays = new \SplObjectStorage(); - - $this->tokens = $this->lexer->tokenize($code, $this->errorHandler); - $result = $this->doParse(); - - // Report errors for any empty elements used inside arrays. This is delayed until after the main parse, - // because we don't know a priori whether a given array expression will be used in a destructuring context - // or not. - foreach ($this->createdArrays as $node) { - foreach ($node->items as $item) { - if ($item->value instanceof Expr\Error) { - $this->errorHandler->handleError( - new Error('Cannot use empty array elements in arrays', $item->getAttributes())); - } - } - } - - // Clear out some of the interior state, so we don't hold onto unnecessary - // memory between uses of the parser - $this->tokenStartStack = []; - $this->tokenEndStack = []; - $this->semStack = []; - $this->semValue = null; - $this->createdArrays = null; - - if ($result !== null) { - $traverser = new NodeTraverser(new CommentAnnotatingVisitor($this->tokens)); - $traverser->traverse($result); - } - - return $result; - } - - public function getTokens(): array { - return $this->tokens; - } - - /** @return Stmt[]|null */ - protected function doParse(): ?array { - // We start off with no lookahead-token - $symbol = self::SYMBOL_NONE; - $tokenValue = null; - $this->tokenPos = -1; - - // Keep stack of start and end attributes - $this->tokenStartStack = []; - $this->tokenEndStack = [0]; - - // Start off in the initial state and keep a stack of previous states - $state = 0; - $stateStack = [$state]; - - // Semantic value stack (contains values of tokens and semantic action results) - $this->semStack = []; - - // Current position in the stack(s) - $stackPos = 0; - - $this->errorState = 0; - - for (;;) { - //$this->traceNewState($state, $symbol); - - if ($this->actionBase[$state] === 0) { - $rule = $this->actionDefault[$state]; - } else { - if ($symbol === self::SYMBOL_NONE) { - do { - $token = $this->tokens[++$this->tokenPos]; - $tokenId = $token->id; - } while (isset($this->dropTokens[$tokenId])); - - // Map the lexer token id to the internally used symbols. - $tokenValue = $token->text; - if (!isset($this->phpTokenToSymbol[$tokenId])) { - throw new \RangeException(sprintf( - 'The lexer returned an invalid token (id=%d, value=%s)', - $tokenId, $tokenValue - )); - } - $symbol = $this->phpTokenToSymbol[$tokenId]; - - //$this->traceRead($symbol); - } - - $idx = $this->actionBase[$state] + $symbol; - if ((($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol) - || ($state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol)) - && ($action = $this->action[$idx]) !== $this->defaultAction) { - /* - * >= numNonLeafStates: shift and reduce - * > 0: shift - * = 0: accept - * < 0: reduce - * = -YYUNEXPECTED: error - */ - if ($action > 0) { - /* shift */ - //$this->traceShift($symbol); - - ++$stackPos; - $stateStack[$stackPos] = $state = $action; - $this->semStack[$stackPos] = $tokenValue; - $this->tokenStartStack[$stackPos] = $this->tokenPos; - $this->tokenEndStack[$stackPos] = $this->tokenPos; - $symbol = self::SYMBOL_NONE; - - if ($this->errorState) { - --$this->errorState; - } - - if ($action < $this->numNonLeafStates) { - continue; - } - - /* $yyn >= numNonLeafStates means shift-and-reduce */ - $rule = $action - $this->numNonLeafStates; - } else { - $rule = -$action; - } - } else { - $rule = $this->actionDefault[$state]; - } - } - - for (;;) { - if ($rule === 0) { - /* accept */ - //$this->traceAccept(); - return $this->semValue; - } - if ($rule !== $this->unexpectedTokenRule) { - /* reduce */ - //$this->traceReduce($rule); - - $ruleLength = $this->ruleToLength[$rule]; - try { - $callback = $this->reduceCallbacks[$rule]; - if ($callback !== null) { - $callback($stackPos); - } elseif ($ruleLength > 0) { - $this->semValue = $this->semStack[$stackPos - $ruleLength + 1]; - } - } catch (Error $e) { - if (-1 === $e->getStartLine()) { - $e->setStartLine($this->tokens[$this->tokenPos]->line); - } - - $this->emitError($e); - // Can't recover from this type of error - return null; - } - - /* Goto - shift nonterminal */ - $lastTokenEnd = $this->tokenEndStack[$stackPos]; - $stackPos -= $ruleLength; - $nonTerminal = $this->ruleToNonTerminal[$rule]; - $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos]; - if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] === $nonTerminal) { - $state = $this->goto[$idx]; - } else { - $state = $this->gotoDefault[$nonTerminal]; - } - - ++$stackPos; - $stateStack[$stackPos] = $state; - $this->semStack[$stackPos] = $this->semValue; - $this->tokenEndStack[$stackPos] = $lastTokenEnd; - if ($ruleLength === 0) { - // Empty productions use the start attributes of the lookahead token. - $this->tokenStartStack[$stackPos] = $this->tokenPos; - } - } else { - /* error */ - switch ($this->errorState) { - case 0: - $msg = $this->getErrorMessage($symbol, $state); - $this->emitError(new Error($msg, $this->getAttributesForToken($this->tokenPos))); - // Break missing intentionally - // no break - case 1: - case 2: - $this->errorState = 3; - - // Pop until error-expecting state uncovered - while (!( - (($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) - || ($state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $this->errorSymbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) - ) || ($action = $this->action[$idx]) === $this->defaultAction) { // Not totally sure about this - if ($stackPos <= 0) { - // Could not recover from error - return null; - } - $state = $stateStack[--$stackPos]; - //$this->tracePop($state); - } - - //$this->traceShift($this->errorSymbol); - ++$stackPos; - $stateStack[$stackPos] = $state = $action; - - // We treat the error symbol as being empty, so we reset the end attributes - // to the end attributes of the last non-error symbol - $this->tokenStartStack[$stackPos] = $this->tokenPos; - $this->tokenEndStack[$stackPos] = $this->tokenEndStack[$stackPos - 1]; - break; - - case 3: - if ($symbol === 0) { - // Reached EOF without recovering from error - return null; - } - - //$this->traceDiscard($symbol); - $symbol = self::SYMBOL_NONE; - break 2; - } - } - - if ($state < $this->numNonLeafStates) { - break; - } - - /* >= numNonLeafStates means shift-and-reduce */ - $rule = $state - $this->numNonLeafStates; - } - } - - throw new \RuntimeException('Reached end of parser loop'); - } - - protected function emitError(Error $error): void { - $this->errorHandler->handleError($error); - } - - /** - * Format error message including expected tokens. - * - * @param int $symbol Unexpected symbol - * @param int $state State at time of error - * - * @return string Formatted error message - */ - protected function getErrorMessage(int $symbol, int $state): string { - $expectedString = ''; - if ($expected = $this->getExpectedTokens($state)) { - $expectedString = ', expecting ' . implode(' or ', $expected); - } - - return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString; - } - - /** - * Get limited number of expected tokens in given state. - * - * @param int $state State - * - * @return string[] Expected tokens. If too many, an empty array is returned. - */ - protected function getExpectedTokens(int $state): array { - $expected = []; - - $base = $this->actionBase[$state]; - foreach ($this->symbolToName as $symbol => $name) { - $idx = $base + $symbol; - if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol - || $state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol - ) { - if ($this->action[$idx] !== $this->unexpectedTokenRule - && $this->action[$idx] !== $this->defaultAction - && $symbol !== $this->errorSymbol - ) { - if (count($expected) === 4) { - /* Too many expected tokens */ - return []; - } - - $expected[] = $name; - } - } - } - - return $expected; - } - - /** - * Get attributes for a node with the given start and end token positions. - * - * @param int $tokenStartPos Token position the node starts at - * @param int $tokenEndPos Token position the node ends at - * @return array Attributes - */ - protected function getAttributes(int $tokenStartPos, int $tokenEndPos): array { - $startToken = $this->tokens[$tokenStartPos]; - $afterEndToken = $this->tokens[$tokenEndPos + 1]; - return [ - 'startLine' => $startToken->line, - 'startTokenPos' => $tokenStartPos, - 'startFilePos' => $startToken->pos, - 'endLine' => $afterEndToken->line, - 'endTokenPos' => $tokenEndPos, - 'endFilePos' => $afterEndToken->pos - 1, - ]; - } - - /** - * Get attributes for a single token at the given token position. - * - * @return array Attributes - */ - protected function getAttributesForToken(int $tokenPos): array { - if ($tokenPos < \count($this->tokens) - 1) { - return $this->getAttributes($tokenPos, $tokenPos); - } - - // Get attributes for the sentinel token. - $token = $this->tokens[$tokenPos]; - return [ - 'startLine' => $token->line, - 'startTokenPos' => $tokenPos, - 'startFilePos' => $token->pos, - 'endLine' => $token->line, - 'endTokenPos' => $tokenPos, - 'endFilePos' => $token->pos, - ]; - } - - /* - * Tracing functions used for debugging the parser. - */ - - /* - protected function traceNewState($state, $symbol): void { - echo '% State ' . $state - . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n"; - } - - protected function traceRead($symbol): void { - echo '% Reading ' . $this->symbolToName[$symbol] . "\n"; - } - - protected function traceShift($symbol): void { - echo '% Shift ' . $this->symbolToName[$symbol] . "\n"; - } - - protected function traceAccept(): void { - echo "% Accepted.\n"; - } - - protected function traceReduce($n): void { - echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n"; - } - - protected function tracePop($state): void { - echo '% Recovering, uncovered state ' . $state . "\n"; - } - - protected function traceDiscard($symbol): void { - echo '% Discard ' . $this->symbolToName[$symbol] . "\n"; - } - */ - - /* - * Helper functions invoked by semantic actions - */ - - /** - * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions. - * - * @param Node\Stmt[] $stmts - * @return Node\Stmt[] - */ - protected function handleNamespaces(array $stmts): array { - $hasErrored = false; - $style = $this->getNamespacingStyle($stmts); - if (null === $style) { - // not namespaced, nothing to do - return $stmts; - } - if ('brace' === $style) { - // For braced namespaces we only have to check that there are no invalid statements between the namespaces - $afterFirstNamespace = false; - foreach ($stmts as $stmt) { - if ($stmt instanceof Node\Stmt\Namespace_) { - $afterFirstNamespace = true; - } elseif (!$stmt instanceof Node\Stmt\HaltCompiler - && !$stmt instanceof Node\Stmt\Nop - && $afterFirstNamespace && !$hasErrored) { - $this->emitError(new Error( - 'No code may exist outside of namespace {}', $stmt->getAttributes())); - $hasErrored = true; // Avoid one error for every statement - } - } - return $stmts; - } else { - // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts - $resultStmts = []; - $targetStmts = &$resultStmts; - $lastNs = null; - foreach ($stmts as $stmt) { - if ($stmt instanceof Node\Stmt\Namespace_) { - if ($lastNs !== null) { - $this->fixupNamespaceAttributes($lastNs); - } - if ($stmt->stmts === null) { - $stmt->stmts = []; - $targetStmts = &$stmt->stmts; - $resultStmts[] = $stmt; - } else { - // This handles the invalid case of mixed style namespaces - $resultStmts[] = $stmt; - $targetStmts = &$resultStmts; - } - $lastNs = $stmt; - } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { - // __halt_compiler() is not moved into the namespace - $resultStmts[] = $stmt; - } else { - $targetStmts[] = $stmt; - } - } - if ($lastNs !== null) { - $this->fixupNamespaceAttributes($lastNs); - } - return $resultStmts; - } - } - - private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt): void { - // We moved the statements into the namespace node, as such the end of the namespace node - // needs to be extended to the end of the statements. - if (empty($stmt->stmts)) { - return; - } - - // We only move the builtin end attributes here. This is the best we can do with the - // knowledge we have. - $endAttributes = ['endLine', 'endFilePos', 'endTokenPos']; - $lastStmt = $stmt->stmts[count($stmt->stmts) - 1]; - foreach ($endAttributes as $endAttribute) { - if ($lastStmt->hasAttribute($endAttribute)) { - $stmt->setAttribute($endAttribute, $lastStmt->getAttribute($endAttribute)); - } - } - } - - /** @return array */ - private function getNamespaceErrorAttributes(Namespace_ $node): array { - $attrs = $node->getAttributes(); - // Adjust end attributes to only cover the "namespace" keyword, not the whole namespace. - if (isset($attrs['startLine'])) { - $attrs['endLine'] = $attrs['startLine']; - } - if (isset($attrs['startTokenPos'])) { - $attrs['endTokenPos'] = $attrs['startTokenPos']; - } - if (isset($attrs['startFilePos'])) { - $attrs['endFilePos'] = $attrs['startFilePos'] + \strlen('namespace') - 1; - } - return $attrs; - } - - /** - * Determine namespacing style (semicolon or brace) - * - * @param Node[] $stmts Top-level statements. - * - * @return null|string One of "semicolon", "brace" or null (no namespaces) - */ - private function getNamespacingStyle(array $stmts): ?string { - $style = null; - $hasNotAllowedStmts = false; - foreach ($stmts as $i => $stmt) { - if ($stmt instanceof Node\Stmt\Namespace_) { - $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace'; - if (null === $style) { - $style = $currentStyle; - if ($hasNotAllowedStmts) { - $this->emitError(new Error( - 'Namespace declaration statement has to be the very first statement in the script', - $this->getNamespaceErrorAttributes($stmt) - )); - } - } elseif ($style !== $currentStyle) { - $this->emitError(new Error( - 'Cannot mix bracketed namespace declarations with unbracketed namespace declarations', - $this->getNamespaceErrorAttributes($stmt) - )); - // Treat like semicolon style for namespace normalization - return 'semicolon'; - } - continue; - } - - /* declare(), __halt_compiler() and nops can be used before a namespace declaration */ - if ($stmt instanceof Node\Stmt\Declare_ - || $stmt instanceof Node\Stmt\HaltCompiler - || $stmt instanceof Node\Stmt\Nop) { - continue; - } - - /* There may be a hashbang line at the very start of the file */ - if ($i === 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->value)) { - continue; - } - - /* Everything else if forbidden before namespace declarations */ - $hasNotAllowedStmts = true; - } - return $style; - } - - /** @return Name|Identifier */ - protected function handleBuiltinTypes(Name $name) { - if (!$name->isUnqualified()) { - return $name; - } - - $lowerName = $name->toLowerString(); - if (!$this->phpVersion->supportsBuiltinType($lowerName)) { - return $name; - } - - return new Node\Identifier($lowerName, $name->getAttributes()); - } - - /** - * Get combined start and end attributes at a stack location - * - * @param int $stackPos Stack location - * - * @return array Combined start and end attributes - */ - protected function getAttributesAt(int $stackPos): array { - return $this->getAttributes($this->tokenStartStack[$stackPos], $this->tokenEndStack[$stackPos]); - } - - protected function getFloatCastKind(string $cast): int { - $cast = strtolower($cast); - if (strpos($cast, 'float') !== false) { - return Double::KIND_FLOAT; - } - - if (strpos($cast, 'real') !== false) { - return Double::KIND_REAL; - } - - return Double::KIND_DOUBLE; - } - - /** @param array $attributes */ - protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false): Int_ { - try { - return Int_::fromString($str, $attributes, $allowInvalidOctal); - } catch (Error $error) { - $this->emitError($error); - // Use dummy value - return new Int_(0, $attributes); - } - } - - /** - * Parse a T_NUM_STRING token into either an integer or string node. - * - * @param string $str Number string - * @param array $attributes Attributes - * - * @return Int_|String_ Integer or string node. - */ - protected function parseNumString(string $str, array $attributes) { - if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { - return new String_($str, $attributes); - } - - $num = +$str; - if (!is_int($num)) { - return new String_($str, $attributes); - } - - return new Int_($num, $attributes); - } - - /** @param array $attributes */ - protected function stripIndentation( - string $string, int $indentLen, string $indentChar, - bool $newlineAtStart, bool $newlineAtEnd, array $attributes - ): string { - if ($indentLen === 0) { - return $string; - } - - $start = $newlineAtStart ? '(?:(?<=\n)|\A)' : '(?<=\n)'; - $end = $newlineAtEnd ? '(?:(?=[\r\n])|\z)' : '(?=[\r\n])'; - $regex = '/' . $start . '([ \t]*)(' . $end . ')?/'; - return preg_replace_callback( - $regex, - function ($matches) use ($indentLen, $indentChar, $attributes) { - $prefix = substr($matches[1], 0, $indentLen); - if (false !== strpos($prefix, $indentChar === " " ? "\t" : " ")) { - $this->emitError(new Error( - 'Invalid indentation - tabs and spaces cannot be mixed', $attributes - )); - } elseif (strlen($prefix) < $indentLen && !isset($matches[2])) { - $this->emitError(new Error( - 'Invalid body indentation level ' . - '(expecting an indentation level of at least ' . $indentLen . ')', - $attributes - )); - } - return substr($matches[0], strlen($prefix)); - }, - $string - ); - } - - /** - * @param string|(Expr|InterpolatedStringPart)[] $contents - * @param array $attributes - * @param array $endTokenAttributes - */ - protected function parseDocString( - string $startToken, $contents, string $endToken, - array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape - ): Expr { - $kind = strpos($startToken, "'") === false - ? String_::KIND_HEREDOC : String_::KIND_NOWDOC; - - $regex = '/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/'; - $result = preg_match($regex, $startToken, $matches); - assert($result === 1); - $label = $matches[1]; - - $result = preg_match('/\A[ \t]*/', $endToken, $matches); - assert($result === 1); - $indentation = $matches[0]; - - $attributes['kind'] = $kind; - $attributes['docLabel'] = $label; - $attributes['docIndentation'] = $indentation; - - $indentHasSpaces = false !== strpos($indentation, " "); - $indentHasTabs = false !== strpos($indentation, "\t"); - if ($indentHasSpaces && $indentHasTabs) { - $this->emitError(new Error( - 'Invalid indentation - tabs and spaces cannot be mixed', - $endTokenAttributes - )); - - // Proceed processing as if this doc string is not indented - $indentation = ''; - } - - $indentLen = \strlen($indentation); - $indentChar = $indentHasSpaces ? " " : "\t"; - - if (\is_string($contents)) { - if ($contents === '') { - $attributes['rawValue'] = $contents; - return new String_('', $attributes); - } - - $contents = $this->stripIndentation( - $contents, $indentLen, $indentChar, true, true, $attributes - ); - $contents = preg_replace('~(\r\n|\n|\r)\z~', '', $contents); - $attributes['rawValue'] = $contents; - - if ($kind === String_::KIND_HEREDOC) { - $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape); - } - - return new String_($contents, $attributes); - } else { - assert(count($contents) > 0); - if (!$contents[0] instanceof Node\InterpolatedStringPart) { - // If there is no leading encapsed string part, pretend there is an empty one - $this->stripIndentation( - '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes() - ); - } - - $newContents = []; - foreach ($contents as $i => $part) { - if ($part instanceof Node\InterpolatedStringPart) { - $isLast = $i === \count($contents) - 1; - $part->value = $this->stripIndentation( - $part->value, $indentLen, $indentChar, - $i === 0, $isLast, $part->getAttributes() - ); - if ($isLast) { - $part->value = preg_replace('~(\r\n|\n|\r)\z~', '', $part->value); - } - $part->setAttribute('rawValue', $part->value); - $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); - if ('' === $part->value) { - continue; - } - } - $newContents[] = $part; - } - return new InterpolatedString($newContents, $attributes); - } - } - - protected function createCommentFromToken(Token $token, int $tokenPos): Comment { - assert($token->id === \T_COMMENT || $token->id == \T_DOC_COMMENT); - return \T_DOC_COMMENT === $token->id - ? new Comment\Doc($token->text, $token->line, $token->pos, $tokenPos, - $token->getEndLine(), $token->getEndPos() - 1, $tokenPos) - : new Comment($token->text, $token->line, $token->pos, $tokenPos, - $token->getEndLine(), $token->getEndPos() - 1, $tokenPos); - } - - /** - * Get last comment before the given token position, if any - */ - protected function getCommentBeforeToken(int $tokenPos): ?Comment { - while (--$tokenPos >= 0) { - $token = $this->tokens[$tokenPos]; - if (!isset($this->dropTokens[$token->id])) { - break; - } - - if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { - return $this->createCommentFromToken($token, $tokenPos); - } - } - return null; - } - - /** - * Create a zero-length nop to capture preceding comments, if any. - */ - protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop { - $comment = $this->getCommentBeforeToken($tokenPos); - if ($comment === null) { - return null; - } - - $commentEndLine = $comment->getEndLine(); - $commentEndFilePos = $comment->getEndFilePos(); - $commentEndTokenPos = $comment->getEndTokenPos(); - $attributes = [ - 'startLine' => $commentEndLine, - 'endLine' => $commentEndLine, - 'startFilePos' => $commentEndFilePos + 1, - 'endFilePos' => $commentEndFilePos, - 'startTokenPos' => $commentEndTokenPos + 1, - 'endTokenPos' => $commentEndTokenPos, - ]; - return new Nop($attributes); - } - - protected function maybeCreateNop(int $tokenStartPos, int $tokenEndPos): ?Nop { - if ($this->getCommentBeforeToken($tokenStartPos) === null) { - return null; - } - return new Nop($this->getAttributes($tokenStartPos, $tokenEndPos)); - } - - protected function handleHaltCompiler(): string { - // Prevent the lexer from returning any further tokens. - $nextToken = $this->tokens[$this->tokenPos + 1]; - $this->tokenPos = \count($this->tokens) - 2; - - // Return text after __halt_compiler. - return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; - } - - protected function inlineHtmlHasLeadingNewline(int $stackPos): bool { - $tokenPos = $this->tokenStartStack[$stackPos]; - $token = $this->tokens[$tokenPos]; - assert($token->id == \T_INLINE_HTML); - if ($tokenPos > 0) { - $prevToken = $this->tokens[$tokenPos - 1]; - assert($prevToken->id == \T_CLOSE_TAG); - return false !== strpos($prevToken->text, "\n") - || false !== strpos($prevToken->text, "\r"); - } - return true; - } - - /** - * @return array - */ - protected function createEmptyElemAttributes(int $tokenPos): array { - return $this->getAttributesForToken($tokenPos); - } - - protected function fixupArrayDestructuring(Array_ $node): Expr\List_ { - $this->createdArrays->detach($node); - return new Expr\List_(array_map(function (Node\ArrayItem $item) { - if ($item->value instanceof Expr\Error) { - // We used Error as a placeholder for empty elements, which are legal for destructuring. - return null; - } - if ($item->value instanceof Array_) { - return new Node\ArrayItem( - $this->fixupArrayDestructuring($item->value), - $item->key, $item->byRef, $item->getAttributes()); - } - return $item; - }, $node->items), ['kind' => Expr\List_::KIND_ARRAY] + $node->getAttributes()); - } - - protected function postprocessList(Expr\List_ $node): void { - foreach ($node->items as $i => $item) { - if ($item->value instanceof Expr\Error) { - // We used Error as a placeholder for empty elements, which are legal for destructuring. - $node->items[$i] = null; - } - } - } - - /** @param ElseIf_|Else_ $node */ - protected function fixupAlternativeElse($node): void { - // Make sure a trailing nop statement carrying comments is part of the node. - $numStmts = \count($node->stmts); - if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) { - $nopAttrs = $node->stmts[$numStmts - 1]->getAttributes(); - if (isset($nopAttrs['endLine'])) { - $node->setAttribute('endLine', $nopAttrs['endLine']); - } - if (isset($nopAttrs['endFilePos'])) { - $node->setAttribute('endFilePos', $nopAttrs['endFilePos']); - } - if (isset($nopAttrs['endTokenPos'])) { - $node->setAttribute('endTokenPos', $nopAttrs['endTokenPos']); - } - } - } - - protected function checkClassModifier(int $a, int $b, int $modifierPos): void { - try { - Modifiers::verifyClassModifier($a, $b); - } catch (Error $error) { - $error->setAttributes($this->getAttributesAt($modifierPos)); - $this->emitError($error); - } - } - - protected function checkModifier(int $a, int $b, int $modifierPos): void { - // Jumping through some hoops here because verifyModifier() is also used elsewhere - try { - Modifiers::verifyModifier($a, $b); - } catch (Error $error) { - $error->setAttributes($this->getAttributesAt($modifierPos)); - $this->emitError($error); - } - } - - protected function checkParam(Param $node): void { - if ($node->variadic && null !== $node->default) { - $this->emitError(new Error( - 'Variadic parameter cannot have a default value', - $node->default->getAttributes() - )); - } - } - - protected function checkTryCatch(TryCatch $node): void { - if (empty($node->catches) && null === $node->finally) { - $this->emitError(new Error( - 'Cannot use try without catch or finally', $node->getAttributes() - )); - } - } - - protected function checkNamespace(Namespace_ $node): void { - if (null !== $node->stmts) { - foreach ($node->stmts as $stmt) { - if ($stmt instanceof Namespace_) { - $this->emitError(new Error( - 'Namespace declarations cannot be nested', $stmt->getAttributes() - )); - } - } - } - } - - private function checkClassName(?Identifier $name, int $namePos): void { - if (null !== $name && $name->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as class name as it is reserved', $name), - $this->getAttributesAt($namePos) - )); - } - } - - /** @param Name[] $interfaces */ - private function checkImplementedInterfaces(array $interfaces): void { - foreach ($interfaces as $interface) { - if ($interface->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), - $interface->getAttributes() - )); - } - } - } - - protected function checkClass(Class_ $node, int $namePos): void { - $this->checkClassName($node->name, $namePos); - - if ($node->extends && $node->extends->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends), - $node->extends->getAttributes() - )); - } - - $this->checkImplementedInterfaces($node->implements); - } - - protected function checkInterface(Interface_ $node, int $namePos): void { - $this->checkClassName($node->name, $namePos); - $this->checkImplementedInterfaces($node->extends); - } - - protected function checkEnum(Enum_ $node, int $namePos): void { - $this->checkClassName($node->name, $namePos); - $this->checkImplementedInterfaces($node->implements); - } - - protected function checkClassMethod(ClassMethod $node, int $modifierPos): void { - if ($node->flags & Modifiers::STATIC) { - switch ($node->name->toLowerString()) { - case '__construct': - $this->emitError(new Error( - sprintf('Constructor %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); - break; - case '__destruct': - $this->emitError(new Error( - sprintf('Destructor %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); - break; - case '__clone': - $this->emitError(new Error( - sprintf('Clone method %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); - break; - } - } - - if ($node->flags & Modifiers::READONLY) { - $this->emitError(new Error( - sprintf('Method %s() cannot be readonly', $node->name), - $this->getAttributesAt($modifierPos))); - } - } - - protected function checkClassConst(ClassConst $node, int $modifierPos): void { - if ($node->flags & Modifiers::STATIC) { - $this->emitError(new Error( - "Cannot use 'static' as constant modifier", - $this->getAttributesAt($modifierPos))); - } - if ($node->flags & Modifiers::ABSTRACT) { - $this->emitError(new Error( - "Cannot use 'abstract' as constant modifier", - $this->getAttributesAt($modifierPos))); - } - if ($node->flags & Modifiers::READONLY) { - $this->emitError(new Error( - "Cannot use 'readonly' as constant modifier", - $this->getAttributesAt($modifierPos))); - } - } - - protected function checkProperty(Property $node, int $modifierPos): void { - if ($node->flags & Modifiers::ABSTRACT) { - $this->emitError(new Error('Properties cannot be declared abstract', - $this->getAttributesAt($modifierPos))); - } - - if ($node->flags & Modifiers::FINAL) { - $this->emitError(new Error('Properties cannot be declared final', - $this->getAttributesAt($modifierPos))); - } - } - - protected function checkUseUse(UseItem $node, int $namePos): void { - if ($node->alias && $node->alias->isSpecialClassName()) { - $this->emitError(new Error( - sprintf( - 'Cannot use %s as %s because \'%2$s\' is a special class name', - $node->name, $node->alias - ), - $this->getAttributesAt($namePos) - )); - } - } - - /** - * Creates the token map. - * - * The token map maps the PHP internal token identifiers - * to the identifiers used by the Parser. Additionally it - * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'. - * - * @return array The token map - */ - protected function createTokenMap(): array { - $tokenMap = []; - - for ($i = 0; $i < 1000; ++$i) { - if ($i < 256) { - // Single-char tokens use an identity mapping. - $tokenMap[$i] = $i; - } elseif (\T_DOUBLE_COLON === $i) { - // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM - $tokenMap[$i] = static::T_PAAMAYIM_NEKUDOTAYIM; - } elseif (\T_OPEN_TAG_WITH_ECHO === $i) { - // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO - $tokenMap[$i] = static::T_ECHO; - } elseif (\T_CLOSE_TAG === $i) { - // T_CLOSE_TAG is equivalent to ';' - $tokenMap[$i] = ord(';'); - } elseif ('UNKNOWN' !== $name = token_name($i)) { - if (defined($name = static::class . '::' . $name)) { - // Other tokens can be mapped directly - $tokenMap[$i] = constant($name); - } - } - } - - // Assign tokens for which we define compatibility constants, as token_name() does not know them. - $tokenMap[\T_FN] = static::T_FN; - $tokenMap[\T_COALESCE_EQUAL] = static::T_COALESCE_EQUAL; - $tokenMap[\T_NAME_QUALIFIED] = static::T_NAME_QUALIFIED; - $tokenMap[\T_NAME_FULLY_QUALIFIED] = static::T_NAME_FULLY_QUALIFIED; - $tokenMap[\T_NAME_RELATIVE] = static::T_NAME_RELATIVE; - $tokenMap[\T_MATCH] = static::T_MATCH; - $tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = static::T_NULLSAFE_OBJECT_OPERATOR; - $tokenMap[\T_ATTRIBUTE] = static::T_ATTRIBUTE; - $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = static::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = static::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_ENUM] = static::T_ENUM; - $tokenMap[\T_READONLY] = static::T_READONLY; - - // We have create a map from PHP token IDs to external symbol IDs. - // Now map them to the internal symbol ID. - $fullTokenMap = []; - foreach ($tokenMap as $phpToken => $extSymbol) { - $intSymbol = $this->tokenToSymbol[$extSymbol]; - if ($intSymbol === $this->invalidSymbol) { - continue; - } - $fullTokenMap[$phpToken] = $intSymbol; - } - - return $fullTokenMap; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php deleted file mode 100644 index 3a7586ea2..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php +++ /dev/null @@ -1,42 +0,0 @@ -isHostVersion()) { - $lexer = new Lexer(); - } else { - $lexer = new Lexer\Emulative($version); - } - if ($version->id >= 80000) { - return new Php8($lexer, $version); - } - return new Php7($lexer, $version); - } - - /** - * Create a parser targeting the newest version supported by this library. Code for older - * versions will be accepted if there have been no relevant backwards-compatibility breaks in - * PHP. - */ - public function createForNewestSupportedVersion(): Parser { - return $this->createForVersion(PhpVersion::getNewestSupported()); - } - - /** - * Create a parser targeting the host PHP version, that is the PHP version we're currently - * running on. This parser will not use any token emulation. - */ - public function createForHostVersion(): Parser { - return $this->createForVersion(PhpVersion::getHostVersion()); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php deleted file mode 100644 index 6a0349c75..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +++ /dev/null @@ -1,1177 +0,0 @@ -pAttrGroups($node->attrGroups, true) - . $this->pModifiers($node->flags) - . ($node->type ? $this->p($node->type) . ' ' : '') - . ($node->byRef ? '&' : '') - . ($node->variadic ? '...' : '') - . $this->p($node->var) - . ($node->default ? ' = ' . $this->p($node->default) : ''); - } - - protected function pArg(Node\Arg $node): string { - return ($node->name ? $node->name->toString() . ': ' : '') - . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') - . $this->p($node->value); - } - - protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node): string { - return '...'; - } - - protected function pConst(Node\Const_ $node): string { - return $node->name . ' = ' . $this->p($node->value); - } - - protected function pNullableType(Node\NullableType $node): string { - return '?' . $this->p($node->type); - } - - protected function pUnionType(Node\UnionType $node): string { - $types = []; - foreach ($node->types as $typeNode) { - if ($typeNode instanceof Node\IntersectionType) { - $types[] = '('. $this->p($typeNode) . ')'; - continue; - } - $types[] = $this->p($typeNode); - } - return implode('|', $types); - } - - protected function pIntersectionType(Node\IntersectionType $node): string { - return $this->pImplode($node->types, '&'); - } - - protected function pIdentifier(Node\Identifier $node): string { - return $node->name; - } - - protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node): string { - return '$' . $node->name; - } - - protected function pAttribute(Node\Attribute $node): string { - return $this->p($node->name) - . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : ''); - } - - protected function pAttributeGroup(Node\AttributeGroup $node): string { - return '#[' . $this->pCommaSeparated($node->attrs) . ']'; - } - - // Names - - protected function pName(Name $node): string { - return $node->name; - } - - protected function pName_FullyQualified(Name\FullyQualified $node): string { - return '\\' . $node->name; - } - - protected function pName_Relative(Name\Relative $node): string { - return 'namespace\\' . $node->name; - } - - // Magic Constants - - protected function pScalar_MagicConst_Class(MagicConst\Class_ $node): string { - return '__CLASS__'; - } - - protected function pScalar_MagicConst_Dir(MagicConst\Dir $node): string { - return '__DIR__'; - } - - protected function pScalar_MagicConst_File(MagicConst\File $node): string { - return '__FILE__'; - } - - protected function pScalar_MagicConst_Function(MagicConst\Function_ $node): string { - return '__FUNCTION__'; - } - - protected function pScalar_MagicConst_Line(MagicConst\Line $node): string { - return '__LINE__'; - } - - protected function pScalar_MagicConst_Method(MagicConst\Method $node): string { - return '__METHOD__'; - } - - protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node): string { - return '__NAMESPACE__'; - } - - protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node): string { - return '__TRAIT__'; - } - - // Scalars - - private function indentString(string $str): string { - return str_replace("\n", $this->nl, $str); - } - - protected function pScalar_String(Scalar\String_ $node): string { - $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED); - switch ($kind) { - case Scalar\String_::KIND_NOWDOC: - $label = $node->getAttribute('docLabel'); - if ($label && !$this->containsEndLabel($node->value, $label)) { - $shouldIdent = $this->phpVersion->supportsFlexibleHeredoc(); - $nl = $shouldIdent ? $this->nl : $this->newline; - if ($node->value === '') { - return "<<<'$label'$nl$label{$this->docStringEndToken}"; - } - - // Make sure trailing \r is not combined with following \n into CRLF. - if ($node->value[strlen($node->value) - 1] !== "\r") { - $value = $shouldIdent ? $this->indentString($node->value) : $node->value; - return "<<<'$label'$nl$value$nl$label{$this->docStringEndToken}"; - } - } - /* break missing intentionally */ - // no break - case Scalar\String_::KIND_SINGLE_QUOTED: - return $this->pSingleQuotedString($node->value); - case Scalar\String_::KIND_HEREDOC: - $label = $node->getAttribute('docLabel'); - $escaped = $this->escapeString($node->value, null); - if ($label && !$this->containsEndLabel($escaped, $label)) { - $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; - if ($escaped === '') { - return "<<<$label$nl$label{$this->docStringEndToken}"; - } - - return "<<<$label$nl$escaped$nl$label{$this->docStringEndToken}"; - } - /* break missing intentionally */ - // no break - case Scalar\String_::KIND_DOUBLE_QUOTED: - return '"' . $this->escapeString($node->value, '"') . '"'; - } - throw new \Exception('Invalid string kind'); - } - - protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node): string { - if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) { - $label = $node->getAttribute('docLabel'); - if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { - $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; - if (count($node->parts) === 1 - && $node->parts[0] instanceof Node\InterpolatedStringPart - && $node->parts[0]->value === '' - ) { - return "<<<$label$nl$label{$this->docStringEndToken}"; - } - - return "<<<$label$nl" . $this->pEncapsList($node->parts, null) - . "$nl$label{$this->docStringEndToken}"; - } - } - return '"' . $this->pEncapsList($node->parts, '"') . '"'; - } - - protected function pScalar_Int(Scalar\Int_ $node): string { - if ($node->value === -\PHP_INT_MAX - 1) { - // PHP_INT_MIN cannot be represented as a literal, - // because the sign is not part of the literal - return '(-' . \PHP_INT_MAX . '-1)'; - } - - $kind = $node->getAttribute('kind', Scalar\Int_::KIND_DEC); - if (Scalar\Int_::KIND_DEC === $kind) { - return (string) $node->value; - } - - if ($node->value < 0) { - $sign = '-'; - $str = (string) -$node->value; - } else { - $sign = ''; - $str = (string) $node->value; - } - switch ($kind) { - case Scalar\Int_::KIND_BIN: - return $sign . '0b' . base_convert($str, 10, 2); - case Scalar\Int_::KIND_OCT: - return $sign . '0' . base_convert($str, 10, 8); - case Scalar\Int_::KIND_HEX: - return $sign . '0x' . base_convert($str, 10, 16); - } - throw new \Exception('Invalid number kind'); - } - - protected function pScalar_Float(Scalar\Float_ $node): string { - if (!is_finite($node->value)) { - if ($node->value === \INF) { - return '1.0E+1000'; - } - if ($node->value === -\INF) { - return '-1.0E+1000'; - } else { - return '\NAN'; - } - } - - // Try to find a short full-precision representation - $stringValue = sprintf('%.16G', $node->value); - if ($node->value !== (float) $stringValue) { - $stringValue = sprintf('%.17G', $node->value); - } - - // %G is locale dependent and there exists no locale-independent alternative. We don't want - // mess with switching locales here, so let's assume that a comma is the only non-standard - // decimal separator we may encounter... - $stringValue = str_replace(',', '.', $stringValue); - - // ensure that number is really printed as float - return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue; - } - - // Assignments - - protected function pExpr_Assign(Expr\Assign $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\Assign::class, $this->p($node->var) . ' = ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignRef(Expr\AssignRef $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\AssignRef::class, $this->p($node->var) . ' =& ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Plus(AssignOp\Plus $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Plus::class, $this->p($node->var) . ' += ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Minus(AssignOp\Minus $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Minus::class, $this->p($node->var) . ' -= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Mul(AssignOp\Mul $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Mul::class, $this->p($node->var) . ' *= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Div(AssignOp\Div $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Div::class, $this->p($node->var) . ' /= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Concat(AssignOp\Concat $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Concat::class, $this->p($node->var) . ' .= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Mod(AssignOp\Mod $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Mod::class, $this->p($node->var) . ' %= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\BitwiseAnd::class, $this->p($node->var) . ' &= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\BitwiseOr::class, $this->p($node->var) . ' |= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\BitwiseXor::class, $this->p($node->var) . ' ^= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\ShiftLeft::class, $this->p($node->var) . ' <<= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\ShiftRight::class, $this->p($node->var) . ' >>= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Pow(AssignOp\Pow $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Pow::class, $this->p($node->var) . ' **= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Coalesce::class, $this->p($node->var) . ' ??= ', $node->expr, $precedence, $lhsPrecedence); - } - - // Binary expressions - - protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Div(BinaryOp\Div $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_Instanceof(Expr\Instanceof_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPostfixOp( - Expr\Instanceof_::class, $node->expr, - ' instanceof ' . $this->pNewOperand($node->class), - $precedence, $lhsPrecedence); - } - - // Unary expressions - - protected function pExpr_BooleanNot(Expr\BooleanNot $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_BitwiseNot(Expr\BitwiseNot $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_UnaryMinus(Expr\UnaryMinus $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_UnaryPlus(Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_PreInc(Expr\PreInc $node): string { - return '++' . $this->p($node->var); - } - - protected function pExpr_PreDec(Expr\PreDec $node): string { - return '--' . $this->p($node->var); - } - - protected function pExpr_PostInc(Expr\PostInc $node): string { - return $this->p($node->var) . '++'; - } - - protected function pExpr_PostDec(Expr\PostDec $node): string { - return $this->p($node->var) . '--'; - } - - protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_YieldFrom(Expr\YieldFrom $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Print(Expr\Print_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr, $precedence, $lhsPrecedence); - } - - // Casts - - protected function pExpr_Cast_Int(Cast\Int_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_Double(Cast\Double $node, int $precedence, int $lhsPrecedence): string { - $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE); - if ($kind === Cast\Double::KIND_DOUBLE) { - $cast = '(double)'; - } elseif ($kind === Cast\Double::KIND_FLOAT) { - $cast = '(float)'; - } else { - assert($kind === Cast\Double::KIND_REAL); - $cast = '(real)'; - } - return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_String(Cast\String_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_Array(Cast\Array_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_Object(Cast\Object_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_Bool(Cast\Bool_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_Unset(Cast\Unset_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr, $precedence, $lhsPrecedence); - } - - // Function calls and similar constructs - - protected function pExpr_FuncCall(Expr\FuncCall $node): string { - return $this->pCallLhs($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_MethodCall(Expr\MethodCall $node): string { - return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node): string { - return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_StaticCall(Expr\StaticCall $node): string { - return $this->pStaticDereferenceLhs($node->class) . '::' - . ($node->name instanceof Expr - ? ($node->name instanceof Expr\Variable - ? $this->p($node->name) - : '{' . $this->p($node->name) . '}') - : $node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_Empty(Expr\Empty_ $node): string { - return 'empty(' . $this->p($node->expr) . ')'; - } - - protected function pExpr_Isset(Expr\Isset_ $node): string { - return 'isset(' . $this->pCommaSeparated($node->vars) . ')'; - } - - protected function pExpr_Eval(Expr\Eval_ $node): string { - return 'eval(' . $this->p($node->expr) . ')'; - } - - protected function pExpr_Include(Expr\Include_ $node, int $precedence, int $lhsPrecedence): string { - static $map = [ - Expr\Include_::TYPE_INCLUDE => 'include', - Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', - Expr\Include_::TYPE_REQUIRE => 'require', - Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once', - ]; - - return $this->pPrefixOp(Expr\Include_::class, $map[$node->type] . ' ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_List(Expr\List_ $node): string { - $syntax = $node->getAttribute('kind', - $this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_LIST); - if ($syntax === Expr\List_::KIND_ARRAY) { - return '[' . $this->pMaybeMultiline($node->items, true) . ']'; - } else { - return 'list(' . $this->pMaybeMultiline($node->items, true) . ')'; - } - } - - // Other - - protected function pExpr_Error(Expr\Error $node): string { - throw new \LogicException('Cannot pretty-print AST with Error nodes'); - } - - protected function pExpr_Variable(Expr\Variable $node): string { - if ($node->name instanceof Expr) { - return '${' . $this->p($node->name) . '}'; - } else { - return '$' . $node->name; - } - } - - protected function pExpr_Array(Expr\Array_ $node): string { - $syntax = $node->getAttribute('kind', - $this->shortArraySyntax ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); - if ($syntax === Expr\Array_::KIND_SHORT) { - return '[' . $this->pMaybeMultiline($node->items, true) . ']'; - } else { - return 'array(' . $this->pMaybeMultiline($node->items, true) . ')'; - } - } - - protected function pKey(?Node $node): string { - if ($node === null) { - return ''; - } - - // => is not really an operator and does not typically participate in precedence resolution. - // However, there is an exception if yield expressions with keys are involved: - // [yield $a => $b] is interpreted as [(yield $a => $b)], so we need to ensure that - // [(yield $a) => $b] is printed with parentheses. We approximate this by lowering the LHS - // precedence to that of yield (which will also print unnecessary parentheses for rare low - // precedence unary operators like include). - $yieldPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; - return $this->p($node, self::MAX_PRECEDENCE, $yieldPrecedence) . ' => '; - } - - protected function pArrayItem(Node\ArrayItem $node): string { - return $this->pKey($node->key) - . ($node->byRef ? '&' : '') - . ($node->unpack ? '...' : '') - . $this->p($node->value); - } - - protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node): string { - return $this->pDereferenceLhs($node->var) - . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']'; - } - - protected function pExpr_ConstFetch(Expr\ConstFetch $node): string { - return $this->p($node->name); - } - - protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string { - return $this->pStaticDereferenceLhs($node->class) . '::' . $this->pObjectProperty($node->name); - } - - protected function pExpr_PropertyFetch(Expr\PropertyFetch $node): string { - return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name); - } - - protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node): string { - return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name); - } - - protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node): string { - return $this->pStaticDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); - } - - protected function pExpr_ShellExec(Expr\ShellExec $node): string { - return '`' . $this->pEncapsList($node->parts, '`') . '`'; - } - - protected function pExpr_Closure(Expr\Closure $node): string { - return $this->pAttrGroups($node->attrGroups, true) - . $this->pStatic($node->static) - . 'function ' . ($node->byRef ? '&' : '') - . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' - . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pExpr_Match(Expr\Match_ $node): string { - return 'match (' . $this->p($node->cond) . ') {' - . $this->pCommaSeparatedMultiline($node->arms, true) - . $this->nl - . '}'; - } - - protected function pMatchArm(Node\MatchArm $node): string { - $result = ''; - if ($node->conds) { - for ($i = 0, $c = \count($node->conds); $i + 1 < $c; $i++) { - $result .= $this->p($node->conds[$i]) . ', '; - } - $result .= $this->pKey($node->conds[$i]); - } else { - $result = 'default => '; - } - return $result . $this->p($node->body); - } - - protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp( - Expr\ArrowFunction::class, - $this->pAttrGroups($node->attrGroups, true) - . $this->pStatic($node->static) - . 'fn' . ($node->byRef ? '&' : '') - . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . ' => ', - $node->expr, $precedence, $lhsPrecedence); - } - - protected function pClosureUse(Node\ClosureUse $node): string { - return ($node->byRef ? '&' : '') . $this->p($node->var); - } - - protected function pExpr_New(Expr\New_ $node): string { - if ($node->class instanceof Stmt\Class_) { - $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : ''; - return 'new ' . $this->pClassCommon($node->class, $args); - } - return 'new ' . $this->pNewOperand($node->class) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_Clone(Expr\Clone_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\Clone_::class, 'clone ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Ternary(Expr\Ternary $node, int $precedence, int $lhsPrecedence): string { - // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator. - // this is okay because the part between ? and : never needs parentheses. - return $this->pInfixOp(Expr\Ternary::class, - $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else, - $precedence, $lhsPrecedence - ); - } - - protected function pExpr_Exit(Expr\Exit_ $node): string { - $kind = $node->getAttribute('kind', Expr\Exit_::KIND_DIE); - return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die') - . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); - } - - protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\Throw_::class, 'throw ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int $lhsPrecedence): string { - if ($node->value === null) { - $opPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; - return $opPrecedence >= $lhsPrecedence ? '(yield)' : 'yield'; - } else { - if (!$this->phpVersion->supportsYieldWithoutParentheses()) { - return '(yield ' . $this->pKey($node->key) . $this->p($node->value) . ')'; - } - return $this->pPrefixOp( - Expr\Yield_::class, 'yield ' . $this->pKey($node->key), - $node->value, $precedence, $lhsPrecedence); - } - } - - // Declarations - - protected function pStmt_Namespace(Stmt\Namespace_ $node): string { - if ($this->canUseSemicolonNamespaces) { - return 'namespace ' . $this->p($node->name) . ';' - . $this->nl . $this->pStmts($node->stmts, false); - } else { - return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '') - . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - } - - protected function pStmt_Use(Stmt\Use_ $node): string { - return 'use ' . $this->pUseType($node->type) - . $this->pCommaSeparated($node->uses) . ';'; - } - - protected function pStmt_GroupUse(Stmt\GroupUse $node): string { - return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) - . '\{' . $this->pCommaSeparated($node->uses) . '};'; - } - - protected function pUseItem(Node\UseItem $node): string { - return $this->pUseType($node->type) . $this->p($node->name) - . (null !== $node->alias ? ' as ' . $node->alias : ''); - } - - protected function pUseType(int $type): string { - return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' - : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); - } - - protected function pStmt_Interface(Stmt\Interface_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'interface ' . $node->name - . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Enum(Stmt\Enum_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'enum ' . $node->name - . ($node->scalarType ? ' : ' . $this->p($node->scalarType) : '') - . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Class(Stmt\Class_ $node): string { - return $this->pClassCommon($node, ' ' . $node->name); - } - - protected function pStmt_Trait(Stmt\Trait_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'trait ' . $node->name - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_EnumCase(Stmt\EnumCase $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'case ' . $node->name - . ($node->expr ? ' = ' . $this->p($node->expr) : '') - . ';'; - } - - protected function pStmt_TraitUse(Stmt\TraitUse $node): string { - return 'use ' . $this->pCommaSeparated($node->traits) - . (empty($node->adaptations) - ? ';' - : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}'); - } - - protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node): string { - return $this->p($node->trait) . '::' . $node->method - . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';'; - } - - protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node): string { - return (null !== $node->trait ? $this->p($node->trait) . '::' : '') - . $node->method . ' as' - . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '') - . (null !== $node->newName ? ' ' . $node->newName : '') - . ';'; - } - - protected function pStmt_Property(Stmt\Property $node): string { - return $this->pAttrGroups($node->attrGroups) - . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) - . ($node->type ? $this->p($node->type) . ' ' : '') - . $this->pCommaSeparated($node->props) . ';'; - } - - protected function pPropertyItem(Node\PropertyItem $node): string { - return '$' . $node->name - . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); - } - - protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string { - return $this->pAttrGroups($node->attrGroups) - . $this->pModifiers($node->flags) - . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . (null !== $node->stmts - ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' - : ';'); - } - - protected function pStmt_ClassConst(Stmt\ClassConst $node): string { - return $this->pAttrGroups($node->attrGroups) - . $this->pModifiers($node->flags) - . 'const ' - . (null !== $node->type ? $this->p($node->type) . ' ' : '') - . $this->pCommaSeparated($node->consts) . ';'; - } - - protected function pStmt_Function(Stmt\Function_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Const(Stmt\Const_ $node): string { - return 'const ' . $this->pCommaSeparated($node->consts) . ';'; - } - - protected function pStmt_Declare(Stmt\Declare_ $node): string { - return 'declare (' . $this->pCommaSeparated($node->declares) . ')' - . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); - } - - protected function pDeclareItem(Node\DeclareItem $node): string { - return $node->key . '=' . $this->p($node->value); - } - - // Control flow - - protected function pStmt_If(Stmt\If_ $node): string { - return 'if (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}' - . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '') - . (null !== $node->else ? ' ' . $this->p($node->else) : ''); - } - - protected function pStmt_ElseIf(Stmt\ElseIf_ $node): string { - return 'elseif (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Else(Stmt\Else_ $node): string { - if (\count($node->stmts) === 1 && $node->stmts[0] instanceof Stmt\If_) { - // Print as "else if" rather than "else { if }" - return 'else ' . $this->p($node->stmts[0]); - } - return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_For(Stmt\For_ $node): string { - return 'for (' - . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') - . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') - . $this->pCommaSeparated($node->loop) - . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Foreach(Stmt\Foreach_ $node): string { - return 'foreach (' . $this->p($node->expr) . ' as ' - . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') - . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_While(Stmt\While_ $node): string { - return 'while (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Do(Stmt\Do_ $node): string { - return 'do {' . $this->pStmts($node->stmts) . $this->nl - . '} while (' . $this->p($node->cond) . ');'; - } - - protected function pStmt_Switch(Stmt\Switch_ $node): string { - return 'switch (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->cases) . $this->nl . '}'; - } - - protected function pStmt_Case(Stmt\Case_ $node): string { - return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' - . $this->pStmts($node->stmts); - } - - protected function pStmt_TryCatch(Stmt\TryCatch $node): string { - return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}' - . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '') - . ($node->finally !== null ? ' ' . $this->p($node->finally) : ''); - } - - protected function pStmt_Catch(Stmt\Catch_ $node): string { - return 'catch (' . $this->pImplode($node->types, '|') - . ($node->var !== null ? ' ' . $this->p($node->var) : '') - . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Finally(Stmt\Finally_ $node): string { - return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Break(Stmt\Break_ $node): string { - return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; - } - - protected function pStmt_Continue(Stmt\Continue_ $node): string { - return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; - } - - protected function pStmt_Return(Stmt\Return_ $node): string { - return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';'; - } - - protected function pStmt_Label(Stmt\Label $node): string { - return $node->name . ':'; - } - - protected function pStmt_Goto(Stmt\Goto_ $node): string { - return 'goto ' . $node->name . ';'; - } - - // Other - - protected function pStmt_Expression(Stmt\Expression $node): string { - return $this->p($node->expr) . ';'; - } - - protected function pStmt_Echo(Stmt\Echo_ $node): string { - return 'echo ' . $this->pCommaSeparated($node->exprs) . ';'; - } - - protected function pStmt_Static(Stmt\Static_ $node): string { - return 'static ' . $this->pCommaSeparated($node->vars) . ';'; - } - - protected function pStmt_Global(Stmt\Global_ $node): string { - return 'global ' . $this->pCommaSeparated($node->vars) . ';'; - } - - protected function pStaticVar(Node\StaticVar $node): string { - return $this->p($node->var) - . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); - } - - protected function pStmt_Unset(Stmt\Unset_ $node): string { - return 'unset(' . $this->pCommaSeparated($node->vars) . ');'; - } - - protected function pStmt_InlineHTML(Stmt\InlineHTML $node): string { - $newline = $node->getAttribute('hasLeadingNewline', true) ? $this->newline : ''; - return '?>' . $newline . $node->value . 'remaining; - } - - protected function pStmt_Nop(Stmt\Nop $node): string { - return ''; - } - - protected function pStmt_Block(Stmt\Block $node): string { - return '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - // Helpers - - protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken): string { - return $this->pAttrGroups($node->attrGroups, $node->name === null) - . $this->pModifiers($node->flags) - . 'class' . $afterClassToken - . (null !== $node->extends ? ' extends ' . $this->p($node->extends) : '') - . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pObjectProperty(Node $node): string { - if ($node instanceof Expr) { - return '{' . $this->p($node) . '}'; - } else { - assert($node instanceof Node\Identifier); - return $node->name; - } - } - - /** @param (Expr|Node\InterpolatedStringPart)[] $encapsList */ - protected function pEncapsList(array $encapsList, ?string $quote): string { - $return = ''; - foreach ($encapsList as $element) { - if ($element instanceof Node\InterpolatedStringPart) { - $return .= $this->escapeString($element->value, $quote); - } else { - $return .= '{' . $this->p($element) . '}'; - } - } - - return $return; - } - - protected function pSingleQuotedString(string $string): string { - // It is idiomatic to only escape backslashes when necessary, i.e. when followed by ', \ or - // the end of the string ('Foo\Bar' instead of 'Foo\\Bar'). However, we also don't want to - // produce an odd number of backslashes, so '\\\\a' should not get rendered as '\\\a', even - // though that would be legal. - $regex = '/\'|\\\\(?=[\'\\\\]|$)|(?<=\\\\)\\\\/'; - return '\'' . preg_replace($regex, '\\\\$0', $string) . '\''; - } - - protected function escapeString(string $string, ?string $quote): string { - if (null === $quote) { - // For doc strings, don't escape newlines - $escaped = addcslashes($string, "\t\f\v$\\"); - // But do escape isolated \r. Combined with the terminating newline, it might get - // interpreted as \r\n and dropped from the string contents. - $escaped = preg_replace('/\r(?!\n)/', '\\r', $escaped); - if ($this->phpVersion->supportsFlexibleHeredoc()) { - $escaped = $this->indentString($escaped); - } - } else { - $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\"); - } - - // Escape control characters and non-UTF-8 characters. - // Regex based on https://stackoverflow.com/a/11709412/385378. - $regex = '/( - [\x00-\x08\x0E-\x1F] # Control characters - | [\xC0-\xC1] # Invalid UTF-8 Bytes - | [\xF5-\xFF] # Invalid UTF-8 Bytes - | \xE0(?=[\x80-\x9F]) # Overlong encoding of prior code point - | \xF0(?=[\x80-\x8F]) # Overlong encoding of prior code point - | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start - | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start - | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start - | (?<=[\x00-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle - | (? $part) { - if ($part instanceof Node\InterpolatedStringPart - && $this->containsEndLabel($this->escapeString($part->value, null), $label, $i === 0) - ) { - return true; - } - } - return false; - } - - protected function pDereferenceLhs(Node $node): string { - if (!$this->dereferenceLhsRequiresParens($node)) { - return $this->p($node); - } else { - return '(' . $this->p($node) . ')'; - } - } - - protected function pStaticDereferenceLhs(Node $node): string { - if (!$this->staticDereferenceLhsRequiresParens($node)) { - return $this->p($node); - } else { - return '(' . $this->p($node) . ')'; - } - } - - protected function pCallLhs(Node $node): string { - if (!$this->callLhsRequiresParens($node)) { - return $this->p($node); - } else { - return '(' . $this->p($node) . ')'; - } - } - - protected function pNewOperand(Node $node): string { - if (!$this->newOperandRequiresParens($node)) { - return $this->p($node); - } else { - return '(' . $this->p($node) . ')'; - } - } - - /** - * @param Node[] $nodes - */ - protected function hasNodeWithComments(array $nodes): bool { - foreach ($nodes as $node) { - if ($node && $node->getComments()) { - return true; - } - } - return false; - } - - /** @param Node[] $nodes */ - protected function pMaybeMultiline(array $nodes, bool $trailingComma = false): string { - if (!$this->hasNodeWithComments($nodes)) { - return $this->pCommaSeparated($nodes); - } else { - return $this->pCommaSeparatedMultiline($nodes, $trailingComma) . $this->nl; - } - } - - /** @param Node\AttributeGroup[] $nodes */ - protected function pAttrGroups(array $nodes, bool $inline = false): string { - $result = ''; - $sep = $inline ? ' ' : $this->nl; - foreach ($nodes as $node) { - $result .= $this->p($node) . $sep; - } - - return $result; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php deleted file mode 100644 index 8303c427a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ /dev/null @@ -1,1655 +0,0 @@ - */ - protected array $precedenceMap = [ - // [precedence, precedenceLHS, precedenceRHS] - // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, - // where 1 is added to one of the sides depending on associativity. This information is not - // used for unary operators and set to -1. - Expr\Clone_::class => [-10, 0, 1], - BinaryOp\Pow::class => [ 0, 0, 1], - Expr\BitwiseNot::class => [ 10, -1, -1], - Expr\UnaryPlus::class => [ 10, -1, -1], - Expr\UnaryMinus::class => [ 10, -1, -1], - Cast\Int_::class => [ 10, -1, -1], - Cast\Double::class => [ 10, -1, -1], - Cast\String_::class => [ 10, -1, -1], - Cast\Array_::class => [ 10, -1, -1], - Cast\Object_::class => [ 10, -1, -1], - Cast\Bool_::class => [ 10, -1, -1], - Cast\Unset_::class => [ 10, -1, -1], - Expr\ErrorSuppress::class => [ 10, -1, -1], - Expr\Instanceof_::class => [ 20, -1, -1], - Expr\BooleanNot::class => [ 30, -1, -1], - BinaryOp\Mul::class => [ 40, 41, 40], - BinaryOp\Div::class => [ 40, 41, 40], - BinaryOp\Mod::class => [ 40, 41, 40], - BinaryOp\Plus::class => [ 50, 51, 50], - BinaryOp\Minus::class => [ 50, 51, 50], - BinaryOp\Concat::class => [ 50, 51, 50], - BinaryOp\ShiftLeft::class => [ 60, 61, 60], - BinaryOp\ShiftRight::class => [ 60, 61, 60], - BinaryOp\Smaller::class => [ 70, 70, 70], - BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], - BinaryOp\Greater::class => [ 70, 70, 70], - BinaryOp\GreaterOrEqual::class => [ 70, 70, 70], - BinaryOp\Equal::class => [ 80, 80, 80], - BinaryOp\NotEqual::class => [ 80, 80, 80], - BinaryOp\Identical::class => [ 80, 80, 80], - BinaryOp\NotIdentical::class => [ 80, 80, 80], - BinaryOp\Spaceship::class => [ 80, 80, 80], - BinaryOp\BitwiseAnd::class => [ 90, 91, 90], - BinaryOp\BitwiseXor::class => [100, 101, 100], - BinaryOp\BitwiseOr::class => [110, 111, 110], - BinaryOp\BooleanAnd::class => [120, 121, 120], - BinaryOp\BooleanOr::class => [130, 131, 130], - BinaryOp\Coalesce::class => [140, 140, 141], - Expr\Ternary::class => [150, -1, -1], - Expr\Assign::class => [160, -1, -1], - Expr\AssignRef::class => [160, -1, -1], - AssignOp\Plus::class => [160, -1, -1], - AssignOp\Minus::class => [160, -1, -1], - AssignOp\Mul::class => [160, -1, -1], - AssignOp\Div::class => [160, -1, -1], - AssignOp\Concat::class => [160, -1, -1], - AssignOp\Mod::class => [160, -1, -1], - AssignOp\BitwiseAnd::class => [160, -1, -1], - AssignOp\BitwiseOr::class => [160, -1, -1], - AssignOp\BitwiseXor::class => [160, -1, -1], - AssignOp\ShiftLeft::class => [160, -1, -1], - AssignOp\ShiftRight::class => [160, -1, -1], - AssignOp\Pow::class => [160, -1, -1], - AssignOp\Coalesce::class => [160, -1, -1], - Expr\YieldFrom::class => [170, -1, -1], - Expr\Yield_::class => [175, -1, -1], - Expr\Print_::class => [180, -1, -1], - BinaryOp\LogicalAnd::class => [190, 191, 190], - BinaryOp\LogicalXor::class => [200, 201, 200], - BinaryOp\LogicalOr::class => [210, 211, 210], - Expr\Include_::class => [220, -1, -1], - Expr\ArrowFunction::class => [230, -1, -1], - Expr\Throw_::class => [240, -1, -1], - ]; - - /** @var int Current indentation level. */ - protected int $indentLevel; - /** @var string Newline style. Does not include current indentation. */ - protected string $newline; - /** @var string Newline including current indentation. */ - protected string $nl; - /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. - * Null if flexible doc strings are used. */ - protected ?string $docStringEndToken; - /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ - protected bool $canUseSemicolonNamespaces; - /** @var bool Whether to use short array syntax if the node specifies no preference */ - protected bool $shortArraySyntax; - /** @var PhpVersion PHP version to target */ - protected PhpVersion $phpVersion; - - /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ - protected ?TokenStream $origTokens; - /** @var Internal\Differ Differ for node lists */ - protected Differ $nodeListDiffer; - /** @var array Map determining whether a certain character is a label character */ - protected array $labelCharMap; - /** - * @var array> Map from token classes and subnode names to FIXUP_* constants. - * This is used during format-preserving prints to place additional parens/braces if necessary. - */ - protected array $fixupMap; - /** - * @var array Map from "{$node->getType()}->{$subNode}" - * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped - * when removing this node. - */ - protected array $removalMap; - /** - * @var array Map from - * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. - * $find is an optional token after which the insertion occurs. $extraLeft/Right - * are optionally added before/after the main insertions. - */ - protected array $insertionMap; - /** - * @var array Map From "{$class}->{$subNode}" to string that should be inserted - * between elements of this list subnode. - */ - protected array $listInsertionMap; - - /** - * @var array - */ - protected array $emptyListInsertionMap; - /** @var array Map from "{$class}->{$subNode}" to [$printFn, $token] - * where $printFn is the function to print the modifiers and $token is the token before which - * the modifiers should be reprinted. */ - protected array $modifierChangeMap; - - /** - * Creates a pretty printer instance using the given options. - * - * Supported options: - * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.4). This option - * controls compatibility of the generated code with older PHP - * versions in cases where a simple stylistic choice exists (e.g. - * array() vs []). It is safe to pretty-print an AST for a newer - * PHP version while specifying an older target (but the result will - * of course not be compatible with the older version in that case). - * * string $newline: The newline style to use. Should be "\n" (default) or "\r\n". - * * bool $shortArraySyntax: Whether to use [] instead of array() as the default array - * syntax, if the node does not specify a format. Defaults to whether - * the phpVersion support short array syntax. - * - * @param array{ - * phpVersion?: PhpVersion, newline?: string, shortArraySyntax?: bool - * } $options Dictionary of formatting options - */ - public function __construct(array $options = []) { - $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 4); - - $this->newline = $options['newline'] ?? "\n"; - if ($this->newline !== "\n" && $this->newline != "\r\n") { - throw new \LogicException('Option "newline" must be one of "\n" or "\r\n"'); - } - - $this->shortArraySyntax = - $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); - $this->docStringEndToken = - $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); - } - - /** - * Reset pretty printing state. - */ - protected function resetState(): void { - $this->indentLevel = 0; - $this->nl = $this->newline; - $this->origTokens = null; - } - - /** - * Set indentation level - * - * @param int $level Level in number of spaces - */ - protected function setIndentLevel(int $level): void { - $this->indentLevel = $level; - $this->nl = $this->newline . \str_repeat(' ', $level); - } - - /** - * Increase indentation level. - */ - protected function indent(): void { - $this->indentLevel += 4; - $this->nl .= ' '; - } - - /** - * Decrease indentation level. - */ - protected function outdent(): void { - assert($this->indentLevel >= 4); - $this->indentLevel -= 4; - $this->nl = $this->newline . str_repeat(' ', $this->indentLevel); - } - - /** - * Pretty prints an array of statements. - * - * @param Node[] $stmts Array of statements - * - * @return string Pretty printed statements - */ - public function prettyPrint(array $stmts): string { - $this->resetState(); - $this->preprocessNodes($stmts); - - return ltrim($this->handleMagicTokens($this->pStmts($stmts, false))); - } - - /** - * Pretty prints an expression. - * - * @param Expr $node Expression node - * - * @return string Pretty printed node - */ - public function prettyPrintExpr(Expr $node): string { - $this->resetState(); - return $this->handleMagicTokens($this->p($node)); - } - - /** - * Pretty prints a file of statements (includes the opening newline . $this->newline; - } - - $p = "newline . $this->newline . $this->prettyPrint($stmts); - - if ($stmts[0] instanceof Stmt\InlineHTML) { - $p = preg_replace('/^<\?php\s+\?>\r?\n?/', '', $p); - } - if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) { - $p = preg_replace('/<\?php$/', '', rtrim($p)); - } - - return $p; - } - - /** - * Preprocesses the top-level nodes to initialize pretty printer state. - * - * @param Node[] $nodes Array of nodes - */ - protected function preprocessNodes(array $nodes): void { - /* We can use semicolon-namespaces unless there is a global namespace declaration */ - $this->canUseSemicolonNamespaces = true; - foreach ($nodes as $node) { - if ($node instanceof Stmt\Namespace_ && null === $node->name) { - $this->canUseSemicolonNamespaces = false; - break; - } - } - } - - /** - * Handles (and removes) doc-string-end tokens. - */ - protected function handleMagicTokens(string $str): string { - if ($this->docStringEndToken !== null) { - // Replace doc-string-end tokens with nothing or a newline - $str = str_replace( - $this->docStringEndToken . ';' . $this->newline, - ';' . $this->newline, - $str); - $str = str_replace($this->docStringEndToken, $this->newline, $str); - } - - return $str; - } - - /** - * Pretty prints an array of nodes (statements) and indents them optionally. - * - * @param Node[] $nodes Array of nodes - * @param bool $indent Whether to indent the printed nodes - * - * @return string Pretty printed statements - */ - protected function pStmts(array $nodes, bool $indent = true): string { - if ($indent) { - $this->indent(); - } - - $result = ''; - foreach ($nodes as $node) { - $comments = $node->getComments(); - if ($comments) { - $result .= $this->nl . $this->pComments($comments); - if ($node instanceof Stmt\Nop) { - continue; - } - } - - $result .= $this->nl . $this->p($node); - } - - if ($indent) { - $this->outdent(); - } - - return $result; - } - - /** - * Pretty-print an infix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param Node $leftNode Left-hand side node - * @param string $operatorString String representation of the operator - * @param Node $rightNode Right-hand side node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed infix operation - */ - protected function pInfixOp( - string $class, Node $leftNode, string $operatorString, Node $rightNode, - int $precedence, int $lhsPrecedence - ): string { - list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $precedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) - . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; - } - - /** - * Pretty-print a prefix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param string $operatorString String representation of the operator - * @param Node $node Node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed prefix operation - */ - protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string { - $opPrecedence = $this->precedenceMap[$class][0]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $lhsPrecedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - $printedArg = $this->p($node, $opPrecedence, $lhsPrecedence); - if (($operatorString === '+' && $printedArg[0] === '+') || - ($operatorString === '-' && $printedArg[0] === '-') - ) { - // Avoid printing +(+$a) as ++$a and similar. - $printedArg = '(' . $printedArg . ')'; - } - return $prefix . $operatorString . $printedArg . $suffix; - } - - /** - * Pretty-print a postfix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param string $operatorString String representation of the operator - * @param Node $node Node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed postfix operation - */ - protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string { - $opPrecedence = $this->precedenceMap[$class][0]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $precedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - if ($opPrecedence < $lhsPrecedence) { - $lhsPrecedence = $opPrecedence; - } - return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix; - } - - /** - * Pretty prints an array of nodes and implodes the printed values. - * - * @param Node[] $nodes Array of Nodes to be printed - * @param string $glue Character to implode with - * - * @return string Imploded pretty printed nodes> $pre - */ - protected function pImplode(array $nodes, string $glue = ''): string { - $pNodes = []; - foreach ($nodes as $node) { - if (null === $node) { - $pNodes[] = ''; - } else { - $pNodes[] = $this->p($node); - } - } - - return implode($glue, $pNodes); - } - - /** - * Pretty prints an array of nodes and implodes the printed values with commas. - * - * @param Node[] $nodes Array of Nodes to be printed - * - * @return string Comma separated pretty printed nodes - */ - protected function pCommaSeparated(array $nodes): string { - return $this->pImplode($nodes, ', '); - } - - /** - * Pretty prints a comma-separated list of nodes in multiline style, including comments. - * - * The result includes a leading newline and one level of indentation (same as pStmts). - * - * @param Node[] $nodes Array of Nodes to be printed - * @param bool $trailingComma Whether to use a trailing comma - * - * @return string Comma separated pretty printed nodes in multiline style - */ - protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string { - $this->indent(); - - $result = ''; - $lastIdx = count($nodes) - 1; - foreach ($nodes as $idx => $node) { - if ($node !== null) { - $comments = $node->getComments(); - if ($comments) { - $result .= $this->nl . $this->pComments($comments); - } - - $result .= $this->nl . $this->p($node); - } else { - $result .= $this->nl; - } - if ($trailingComma || $idx !== $lastIdx) { - $result .= ','; - } - } - - $this->outdent(); - return $result; - } - - /** - * Prints reformatted text of the passed comments. - * - * @param Comment[] $comments List of comments - * - * @return string Reformatted text of comments - */ - protected function pComments(array $comments): string { - $formattedComments = []; - - foreach ($comments as $comment) { - $formattedComments[] = str_replace("\n", $this->nl, $comment->getReformattedText()); - } - - return implode($this->nl, $formattedComments); - } - - /** - * Perform a format-preserving pretty print of an AST. - * - * The format preservation is best effort. For some changes to the AST the formatting will not - * be preserved (at least not locally). - * - * In order to use this method a number of prerequisites must be satisfied: - * * The startTokenPos and endTokenPos attributes in the lexer must be enabled. - * * The CloningVisitor must be run on the AST prior to modification. - * * The original tokens must be provided, using the getTokens() method on the lexer. - * - * @param Node[] $stmts Modified AST with links to original AST - * @param Node[] $origStmts Original AST with token offset information - * @param Token[] $origTokens Tokens of the original code - */ - public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { - $this->initializeNodeListDiffer(); - $this->initializeLabelCharMap(); - $this->initializeFixupMap(); - $this->initializeRemovalMap(); - $this->initializeInsertionMap(); - $this->initializeListInsertionMap(); - $this->initializeEmptyListInsertionMap(); - $this->initializeModifierChangeMap(); - - $this->resetState(); - $this->origTokens = new TokenStream($origTokens); - - $this->preprocessNodes($stmts); - - $pos = 0; - $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); - if (null !== $result) { - $result .= $this->origTokens->getTokenCode($pos, count($origTokens) - 1, 0); - } else { - // Fallback - // TODO Add newline . $this->pStmts($stmts, false); - } - - return $this->handleMagicTokens($result); - } - - protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { - return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); - } - - /** - * Pretty prints a node. - * - * This method also handles formatting preservation for nodes. - * - * @param Node $node Node to be pretty printed - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * @param bool $parentFormatPreserved Whether parent node has preserved formatting - * - * @return string Pretty printed node - */ - protected function p( - Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, - bool $parentFormatPreserved = false - ): string { - // No orig tokens means this is a normal pretty print without preservation of formatting - if (!$this->origTokens) { - return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); - } - - /** @var Node|null $origNode */ - $origNode = $node->getAttribute('origNode'); - if (null === $origNode) { - return $this->pFallback($node, $precedence, $lhsPrecedence); - } - - $class = \get_class($node); - \assert($class === \get_class($origNode)); - - $startPos = $origNode->getStartTokenPos(); - $endPos = $origNode->getEndTokenPos(); - \assert($startPos >= 0 && $endPos >= 0); - - $fallbackNode = $node; - if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { - // Normalize node structure of anonymous classes - assert($origNode instanceof Expr\New_); - $node = PrintableNewAnonClassNode::fromNewNode($node); - $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); - $class = PrintableNewAnonClassNode::class; - } - - // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting - // is not preserved, then we need to use the fallback code to make sure the tags are - // printed. - if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); - - $type = $node->getType(); - $fixupInfo = $this->fixupMap[$class] ?? null; - - $result = ''; - $pos = $startPos; - foreach ($node->getSubNodeNames() as $subNodeName) { - $subNode = $node->$subNodeName; - $origSubNode = $origNode->$subNodeName; - - if ((!$subNode instanceof Node && $subNode !== null) - || (!$origSubNode instanceof Node && $origSubNode !== null) - ) { - if ($subNode === $origSubNode) { - // Unchanged, can reuse old code - continue; - } - - if (is_array($subNode) && is_array($origSubNode)) { - // Array subnode changed, we might be able to reconstruct it - $listResult = $this->pArray( - $subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, - $fixupInfo[$subNodeName] ?? null - ); - if (null === $listResult) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - $result .= $listResult; - continue; - } - - // Check if this is a modifier change - $key = $class . '->' . $subNodeName; - if (!isset($this->modifierChangeMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - [$printFn, $findToken] = $this->modifierChangeMap[$key]; - $result .= $this->$printFn($subNode); - $pos = $this->origTokens->findRight($pos, $findToken); - continue; - } - - $extraLeft = ''; - $extraRight = ''; - if ($origSubNode !== null) { - $subStartPos = $origSubNode->getStartTokenPos(); - $subEndPos = $origSubNode->getEndTokenPos(); - \assert($subStartPos >= 0 && $subEndPos >= 0); - } else { - if ($subNode === null) { - // Both null, nothing to do - continue; - } - - // A node has been inserted, check if we have insertion information for it - $key = $type . '->' . $subNodeName; - if (!isset($this->insertionMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; - if (null !== $findToken) { - $subStartPos = $this->origTokens->findRight($pos, $findToken) - + (int) !$beforeToken; - } else { - $subStartPos = $pos; - } - - if (null === $extraLeft && null !== $extraRight) { - // If inserting on the right only, skipping whitespace looks better - $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos); - } - $subEndPos = $subStartPos - 1; - } - - if (null === $subNode) { - // A node has been removed, check if we have removal information for it - $key = $type . '->' . $subNodeName; - if (!isset($this->removalMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - // Adjust positions to account for additional tokens that must be skipped - $removalInfo = $this->removalMap[$key]; - if (isset($removalInfo['left'])) { - $subStartPos = $this->origTokens->skipLeft($subStartPos - 1, $removalInfo['left']) + 1; - } - if (isset($removalInfo['right'])) { - $subEndPos = $this->origTokens->skipRight($subEndPos + 1, $removalInfo['right']) - 1; - } - } - - $result .= $this->origTokens->getTokenCode($pos, $subStartPos, $indentAdjustment); - - if (null !== $subNode) { - $result .= $extraLeft; - - $origIndentLevel = $this->indentLevel; - $this->setIndentLevel($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment); - - // If it's the same node that was previously in this position, it certainly doesn't - // need fixup. It's important to check this here, because our fixup checks are more - // conservative than strictly necessary. - if (isset($fixupInfo[$subNodeName]) - && $subNode->getAttribute('origNode') !== $origSubNode - ) { - $fixup = $fixupInfo[$subNodeName]; - $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); - } else { - $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - } - - $this->safeAppend($result, $res); - $this->setIndentLevel($origIndentLevel); - - $result .= $extraRight; - } - - $pos = $subEndPos + 1; - } - - $result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment); - return $result; - } - - /** - * Perform a format-preserving pretty print of an array. - * - * @param Node[] $nodes New nodes - * @param Node[] $origNodes Original nodes - * @param int $pos Current token position (updated by reference) - * @param int $indentAdjustment Adjustment for indentation - * @param string $parentNodeClass Class of the containing node. - * @param string $subNodeName Name of array subnode. - * @param null|int $fixup Fixup information for array item nodes - * - * @return null|string Result of pretty print or null if cannot preserve formatting - */ - protected function pArray( - array $nodes, array $origNodes, int &$pos, int $indentAdjustment, - string $parentNodeClass, string $subNodeName, ?int $fixup - ): ?string { - $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); - - $mapKey = $parentNodeClass . '->' . $subNodeName; - $insertStr = $this->listInsertionMap[$mapKey] ?? null; - $isStmtList = $subNodeName === 'stmts'; - - $beforeFirstKeepOrReplace = true; - $skipRemovedNode = false; - $delayedAdd = []; - $lastElemIndentLevel = $this->indentLevel; - - $insertNewline = false; - if ($insertStr === "\n") { - $insertStr = ''; - $insertNewline = true; - } - - if ($isStmtList && \count($origNodes) === 1 && \count($nodes) !== 1) { - $startPos = $origNodes[0]->getStartTokenPos(); - $endPos = $origNodes[0]->getEndTokenPos(); - \assert($startPos >= 0 && $endPos >= 0); - if (!$this->origTokens->haveBraces($startPos, $endPos)) { - // This was a single statement without braces, but either additional statements - // have been added, or the single statement has been removed. This requires the - // addition of braces. For now fall back. - // TODO: Try to preserve formatting - return null; - } - } - - $result = ''; - foreach ($diff as $i => $diffElem) { - $diffType = $diffElem->type; - /** @var Node|string|null $arrItem */ - $arrItem = $diffElem->new; - /** @var Node|string|null $origArrItem */ - $origArrItem = $diffElem->old; - - if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { - $beforeFirstKeepOrReplace = false; - - if ($origArrItem === null || $arrItem === null) { - // We can only handle the case where both are null - if ($origArrItem === $arrItem) { - continue; - } - return null; - } - - if (!$arrItem instanceof Node || !$origArrItem instanceof Node) { - // We can only deal with nodes. This can occur for Names, which use string arrays. - return null; - } - - $itemStartPos = $origArrItem->getStartTokenPos(); - $itemEndPos = $origArrItem->getEndTokenPos(); - \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos); - - $origIndentLevel = $this->indentLevel; - $lastElemIndentLevel = $this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment; - $this->setIndentLevel($lastElemIndentLevel); - - $comments = $arrItem->getComments(); - $origComments = $origArrItem->getComments(); - $commentStartPos = $origComments ? $origComments[0]->getStartTokenPos() : $itemStartPos; - \assert($commentStartPos >= 0); - - if ($commentStartPos < $pos) { - // Comments may be assigned to multiple nodes if they start at the same position. - // Make sure we don't try to print them multiple times. - $commentStartPos = $itemStartPos; - } - - if ($skipRemovedNode) { - if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { - // We'd remove an opening/closing PHP tag. - // TODO: Preserve formatting. - $this->setIndentLevel($origIndentLevel); - return null; - } - } else { - $result .= $this->origTokens->getTokenCode( - $pos, $commentStartPos, $indentAdjustment); - } - - if (!empty($delayedAdd)) { - /** @var Node $delayedAddNode */ - foreach ($delayedAdd as $delayedAddNode) { - if ($insertNewline) { - $delayedAddComments = $delayedAddNode->getComments(); - if ($delayedAddComments) { - $result .= $this->pComments($delayedAddComments) . $this->nl; - } - } - - $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true)); - - if ($insertNewline) { - $result .= $insertStr . $this->nl; - } else { - $result .= $insertStr; - } - } - - $delayedAdd = []; - } - - if ($comments !== $origComments) { - if ($comments) { - $result .= $this->pComments($comments) . $this->nl; - } - } else { - $result .= $this->origTokens->getTokenCode( - $commentStartPos, $itemStartPos, $indentAdjustment); - } - - // If we had to remove anything, we have done so now. - $skipRemovedNode = false; - } elseif ($diffType === DiffElem::TYPE_ADD) { - if (null === $insertStr) { - // We don't have insertion information for this list type - return null; - } - - if (!$arrItem instanceof Node) { - // We only support list insertion of nodes. - return null; - } - - // We go multiline if the original code was multiline, - // or if it's an array item with a comment above it. - // Match always uses multiline formatting. - if ($insertStr === ', ' && - ($this->isMultiline($origNodes) || $arrItem->getComments() || - $parentNodeClass === Expr\Match_::class) - ) { - $insertStr = ','; - $insertNewline = true; - } - - if ($beforeFirstKeepOrReplace) { - // Will be inserted at the next "replace" or "keep" element - $delayedAdd[] = $arrItem; - continue; - } - - $itemStartPos = $pos; - $itemEndPos = $pos - 1; - - $origIndentLevel = $this->indentLevel; - $this->setIndentLevel($lastElemIndentLevel); - - if ($insertNewline) { - $result .= $insertStr . $this->nl; - $comments = $arrItem->getComments(); - if ($comments) { - $result .= $this->pComments($comments) . $this->nl; - } - } else { - $result .= $insertStr; - } - } elseif ($diffType === DiffElem::TYPE_REMOVE) { - if (!$origArrItem instanceof Node) { - // We only support removal for nodes - return null; - } - - $itemStartPos = $origArrItem->getStartTokenPos(); - $itemEndPos = $origArrItem->getEndTokenPos(); - \assert($itemStartPos >= 0 && $itemEndPos >= 0); - - // Consider comments part of the node. - $origComments = $origArrItem->getComments(); - if ($origComments) { - $itemStartPos = $origComments[0]->getStartTokenPos(); - } - - if ($i === 0) { - // If we're removing from the start, keep the tokens before the node and drop those after it, - // instead of the other way around. - $result .= $this->origTokens->getTokenCode( - $pos, $itemStartPos, $indentAdjustment); - $skipRemovedNode = true; - } else { - if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { - // We'd remove an opening/closing PHP tag. - // TODO: Preserve formatting. - return null; - } - } - - $pos = $itemEndPos + 1; - continue; - } else { - throw new \Exception("Shouldn't happen"); - } - - if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { - $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); - } else { - $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - } - $this->safeAppend($result, $res); - - $this->setIndentLevel($origIndentLevel); - $pos = $itemEndPos + 1; - } - - if ($skipRemovedNode) { - // TODO: Support removing single node. - return null; - } - - if (!empty($delayedAdd)) { - if (!isset($this->emptyListInsertionMap[$mapKey])) { - return null; - } - - list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey]; - if (null !== $findToken) { - $insertPos = $this->origTokens->findRight($pos, $findToken) + 1; - $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment); - $pos = $insertPos; - } - - $first = true; - $result .= $extraLeft; - foreach ($delayedAdd as $delayedAddNode) { - if (!$first) { - $result .= $insertStr; - if ($insertNewline) { - $result .= $this->nl; - } - } - $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - $first = false; - } - $result .= $extraRight === "\n" ? $this->nl : $extraRight; - } - - return $result; - } - - /** - * Print node with fixups. - * - * Fixups here refer to the addition of extra parentheses, braces or other characters, that - * are required to preserve program semantics in a certain context (e.g. to maintain precedence - * or because only certain expressions are allowed in certain places). - * - * @param int $fixup Fixup type - * @param Node $subNode Subnode to print - * @param string|null $parentClass Class of parent node - * @param int $subStartPos Original start pos of subnode - * @param int $subEndPos Original end pos of subnode - * - * @return string Result of fixed-up print of subnode - */ - protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { - switch ($fixup) { - case self::FIXUP_PREC_LEFT: - // We use a conservative approximation where lhsPrecedence == precedence. - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][1]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_PREC_RIGHT: - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][2]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_PREC_UNARY: - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][0]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_CALL_LHS: - if ($this->callLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_DEREF_LHS: - if ($this->dereferenceLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_STATIC_DEREF_LHS: - if ($this->staticDereferenceLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_NEW: - if ($this->newOperandRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_BRACED_NAME: - case self::FIXUP_VAR_BRACED_NAME: - if ($subNode instanceof Expr - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { - return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '') - . '{' . $this->p($subNode) . '}'; - } - break; - case self::FIXUP_ENCAPSED: - if (!$subNode instanceof Node\InterpolatedStringPart - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { - return '{' . $this->p($subNode) . '}'; - } - break; - default: - throw new \Exception('Cannot happen'); - } - - // Nothing special to do - return $this->p($subNode); - } - - /** - * Appends to a string, ensuring whitespace between label characters. - * - * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". - * Without safeAppend the result would be "echox", which does not preserve semantics. - */ - protected function safeAppend(string &$str, string $append): void { - if ($str === "") { - $str = $append; - return; - } - - if ($append === "") { - return; - } - - if (!$this->labelCharMap[$append[0]] - || !$this->labelCharMap[$str[\strlen($str) - 1]]) { - $str .= $append; - } else { - $str .= " " . $append; - } - } - - /** - * Determines whether the LHS of a call must be wrapped in parenthesis. - * - * @param Node $node LHS of a call - * - * @return bool Whether parentheses are required - */ - protected function callLhsRequiresParens(Node $node): bool { - return !($node instanceof Node\Name - || $node instanceof Expr\Variable - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_); - } - - /** - * Determines whether the LHS of an array/object operation must be wrapped in parentheses. - * - * @param Node $node LHS of dereferencing operation - * - * @return bool Whether parentheses are required - */ - protected function dereferenceLhsRequiresParens(Node $node): bool { - // A constant can occur on the LHS of an array/object deref, but not a static deref. - return $this->staticDereferenceLhsRequiresParens($node) - && !$node instanceof Expr\ConstFetch; - } - - /** - * Determines whether the LHS of a static operation must be wrapped in parentheses. - * - * @param Node $node LHS of dereferencing operation - * - * @return bool Whether parentheses are required - */ - protected function staticDereferenceLhsRequiresParens(Node $node): bool { - return !($node instanceof Expr\Variable - || $node instanceof Node\Name - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\PropertyFetch - || $node instanceof Expr\NullsafePropertyFetch - || $node instanceof Expr\StaticPropertyFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_ - || $node instanceof Scalar\String_ - || $node instanceof Expr\ClassConstFetch); - } - - /** - * Determines whether an expression used in "new" or "instanceof" requires parentheses. - * - * @param Node $node New or instanceof operand - * - * @return bool Whether parentheses are required - */ - protected function newOperandRequiresParens(Node $node): bool { - if ($node instanceof Node\Name || $node instanceof Expr\Variable) { - return false; - } - if ($node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || - $node instanceof Expr\NullsafePropertyFetch - ) { - return $this->newOperandRequiresParens($node->var); - } - if ($node instanceof Expr\StaticPropertyFetch) { - return $this->newOperandRequiresParens($node->class); - } - return true; - } - - /** - * Print modifiers, including trailing whitespace. - * - * @param int $modifiers Modifier mask to print - * - * @return string Printed modifiers - */ - protected function pModifiers(int $modifiers): string { - return ($modifiers & Modifiers::FINAL ? 'final ' : '') - . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') - . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') - . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') - . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') - . ($modifiers & Modifiers::STATIC ? 'static ' : '') - . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); - } - - protected function pStatic(bool $static): string { - return $static ? 'static ' : ''; - } - - /** - * Determine whether a list of nodes uses multiline formatting. - * - * @param (Node|null)[] $nodes Node list - * - * @return bool Whether multiline formatting is used - */ - protected function isMultiline(array $nodes): bool { - if (\count($nodes) < 2) { - return false; - } - - $pos = -1; - foreach ($nodes as $node) { - if (null === $node) { - continue; - } - - $endPos = $node->getEndTokenPos() + 1; - if ($pos >= 0) { - $text = $this->origTokens->getTokenCode($pos, $endPos, 0); - if (false === strpos($text, "\n")) { - // We require that a newline is present between *every* item. If the formatting - // is inconsistent, with only some items having newlines, we don't consider it - // as multiline - return false; - } - } - $pos = $endPos; - } - - return true; - } - - /** - * Lazily initializes label char map. - * - * The label char map determines whether a certain character may occur in a label. - */ - protected function initializeLabelCharMap(): void { - if (isset($this->labelCharMap)) { - return; - } - - $this->labelCharMap = []; - for ($i = 0; $i < 256; $i++) { - $chr = chr($i); - $this->labelCharMap[$chr] = $i >= 0x80 || ctype_alnum($chr); - } - - if ($this->phpVersion->allowsDelInIdentifiers()) { - $this->labelCharMap["\x7f"] = true; - } - } - - /** - * Lazily initializes node list differ. - * - * The node list differ is used to determine differences between two array subnodes. - */ - protected function initializeNodeListDiffer(): void { - if (isset($this->nodeListDiffer)) { - return; - } - - $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { - if ($a instanceof Node && $b instanceof Node) { - return $a === $b->getAttribute('origNode'); - } - // Can happen for array destructuring - return $a === null && $b === null; - }); - } - - /** - * Lazily initializes fixup map. - * - * The fixup map is used to determine whether a certain subnode of a certain node may require - * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. - */ - protected function initializeFixupMap(): void { - if (isset($this->fixupMap)) { - return; - } - - $this->fixupMap = [ - Expr\Instanceof_::class => [ - 'expr' => self::FIXUP_PREC_UNARY, - 'class' => self::FIXUP_NEW, - ], - Expr\Ternary::class => [ - 'cond' => self::FIXUP_PREC_LEFT, - 'else' => self::FIXUP_PREC_RIGHT, - ], - Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], - - Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], - Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], - Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\ClassConstFetch::class => [ - 'class' => self::FIXUP_STATIC_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\New_::class => ['class' => self::FIXUP_NEW], - Expr\MethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafeMethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\StaticPropertyFetch::class => [ - 'class' => self::FIXUP_STATIC_DEREF_LHS, - 'name' => self::FIXUP_VAR_BRACED_NAME, - ], - Expr\PropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafePropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Scalar\InterpolatedString::class => [ - 'parts' => self::FIXUP_ENCAPSED, - ], - ]; - - $binaryOps = [ - BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class, - BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class, - BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class, - BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class, - BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class, - BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, - BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, - BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, - BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, - ]; - foreach ($binaryOps as $binaryOp) { - $this->fixupMap[$binaryOp] = [ - 'left' => self::FIXUP_PREC_LEFT, - 'right' => self::FIXUP_PREC_RIGHT - ]; - } - - $prefixOps = [ - Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, - Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, - Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, - Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, - Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, - AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, - AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, - Expr\ArrowFunction::class, Expr\Throw_::class, - ]; - foreach ($prefixOps as $prefixOp) { - $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; - } - } - - /** - * Lazily initializes the removal map. - * - * The removal map is used to determine which additional tokens should be removed when a - * certain node is replaced by null. - */ - protected function initializeRemovalMap(): void { - if (isset($this->removalMap)) { - return; - } - - $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; - $stripLeft = ['left' => \T_WHITESPACE]; - $stripRight = ['right' => \T_WHITESPACE]; - $stripDoubleArrow = ['right' => \T_DOUBLE_ARROW]; - $stripColon = ['left' => ':']; - $stripEquals = ['left' => '=']; - $this->removalMap = [ - 'Expr_ArrayDimFetch->dim' => $stripBoth, - 'ArrayItem->key' => $stripDoubleArrow, - 'Expr_ArrowFunction->returnType' => $stripColon, - 'Expr_Closure->returnType' => $stripColon, - 'Expr_Exit->expr' => $stripBoth, - 'Expr_Ternary->if' => $stripBoth, - 'Expr_Yield->key' => $stripDoubleArrow, - 'Expr_Yield->value' => $stripBoth, - 'Param->type' => $stripRight, - 'Param->default' => $stripEquals, - 'Stmt_Break->num' => $stripBoth, - 'Stmt_Catch->var' => $stripLeft, - 'Stmt_ClassConst->type' => $stripRight, - 'Stmt_ClassMethod->returnType' => $stripColon, - 'Stmt_Class->extends' => ['left' => \T_EXTENDS], - 'Stmt_Enum->scalarType' => $stripColon, - 'Stmt_EnumCase->expr' => $stripEquals, - 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], - 'Stmt_Continue->num' => $stripBoth, - 'Stmt_Foreach->keyVar' => $stripDoubleArrow, - 'Stmt_Function->returnType' => $stripColon, - 'Stmt_If->else' => $stripLeft, - 'Stmt_Namespace->name' => $stripLeft, - 'Stmt_Property->type' => $stripRight, - 'PropertyItem->default' => $stripEquals, - 'Stmt_Return->expr' => $stripBoth, - 'Stmt_StaticVar->default' => $stripEquals, - 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, - 'Stmt_TryCatch->finally' => $stripLeft, - // 'Stmt_Case->cond': Replace with "default" - // 'Stmt_Class->name': Unclear what to do - // 'Stmt_Declare->stmts': Not a plain node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a plain node - ]; - } - - protected function initializeInsertionMap(): void { - if (isset($this->insertionMap)) { - return; - } - - // TODO: "yield" where both key and value are inserted doesn't work - // [$find, $beforeToken, $extraLeft, $extraRight] - $this->insertionMap = [ - 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], - 'ArrayItem->key' => [null, false, null, ' => '], - 'Expr_ArrowFunction->returnType' => [')', false, ': ', null], - 'Expr_Closure->returnType' => [')', false, ': ', null], - 'Expr_Ternary->if' => ['?', false, ' ', ' '], - 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], - 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], - 'Param->type' => [null, false, null, ' '], - 'Param->default' => [null, false, ' = ', null], - 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], - 'Stmt_Catch->var' => [null, false, ' ', null], - 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], - 'Stmt_ClassConst->type' => [\T_CONST, false, ' ', null], - 'Stmt_Class->extends' => [null, false, ' extends ', null], - 'Stmt_Enum->scalarType' => [null, false, ' : ', null], - 'Stmt_EnumCase->expr' => [null, false, ' = ', null], - 'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', null], - 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], - 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], - 'Stmt_Function->returnType' => [')', false, ': ', null], - 'Stmt_If->else' => [null, false, ' ', null], - 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], - 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], - 'PropertyItem->default' => [null, false, ' = ', null], - 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], - 'Stmt_StaticVar->default' => [null, false, ' = ', null], - //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO - 'Stmt_TryCatch->finally' => [null, false, ' ', null], - - // 'Expr_Exit->expr': Complicated due to optional () - // 'Stmt_Case->cond': Conversion from default to case - // 'Stmt_Class->name': Unclear - // 'Stmt_Declare->stmts': Not a proper node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a proper node - ]; - } - - protected function initializeListInsertionMap(): void { - if (isset($this->listInsertionMap)) { - return; - } - - $this->listInsertionMap = [ - // special - //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully - //'Scalar_InterpolatedString->parts' => '', - Stmt\Catch_::class . '->types' => '|', - UnionType::class . '->types' => '|', - IntersectionType::class . '->types' => '&', - Stmt\If_::class . '->elseifs' => ' ', - Stmt\TryCatch::class . '->catches' => ' ', - - // comma-separated lists - Expr\Array_::class . '->items' => ', ', - Expr\ArrowFunction::class . '->params' => ', ', - Expr\Closure::class . '->params' => ', ', - Expr\Closure::class . '->uses' => ', ', - Expr\FuncCall::class . '->args' => ', ', - Expr\Isset_::class . '->vars' => ', ', - Expr\List_::class . '->items' => ', ', - Expr\MethodCall::class . '->args' => ', ', - Expr\NullsafeMethodCall::class . '->args' => ', ', - Expr\New_::class . '->args' => ', ', - PrintableNewAnonClassNode::class . '->args' => ', ', - Expr\StaticCall::class . '->args' => ', ', - Stmt\ClassConst::class . '->consts' => ', ', - Stmt\ClassMethod::class . '->params' => ', ', - Stmt\Class_::class . '->implements' => ', ', - Stmt\Enum_::class . '->implements' => ', ', - PrintableNewAnonClassNode::class . '->implements' => ', ', - Stmt\Const_::class . '->consts' => ', ', - Stmt\Declare_::class . '->declares' => ', ', - Stmt\Echo_::class . '->exprs' => ', ', - Stmt\For_::class . '->init' => ', ', - Stmt\For_::class . '->cond' => ', ', - Stmt\For_::class . '->loop' => ', ', - Stmt\Function_::class . '->params' => ', ', - Stmt\Global_::class . '->vars' => ', ', - Stmt\GroupUse::class . '->uses' => ', ', - Stmt\Interface_::class . '->extends' => ', ', - Expr\Match_::class . '->arms' => ', ', - Stmt\Property::class . '->props' => ', ', - Stmt\StaticVar::class . '->vars' => ', ', - Stmt\TraitUse::class . '->traits' => ', ', - Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ', - Stmt\Unset_::class . '->vars' => ', ', - Stmt\UseUse::class . '->uses' => ', ', - MatchArm::class . '->conds' => ', ', - AttributeGroup::class . '->attrs' => ', ', - - // statement lists - Expr\Closure::class . '->stmts' => "\n", - Stmt\Case_::class . '->stmts' => "\n", - Stmt\Catch_::class . '->stmts' => "\n", - Stmt\Class_::class . '->stmts' => "\n", - Stmt\Enum_::class . '->stmts' => "\n", - PrintableNewAnonClassNode::class . '->stmts' => "\n", - Stmt\Interface_::class . '->stmts' => "\n", - Stmt\Trait_::class . '->stmts' => "\n", - Stmt\ClassMethod::class . '->stmts' => "\n", - Stmt\Declare_::class . '->stmts' => "\n", - Stmt\Do_::class . '->stmts' => "\n", - Stmt\ElseIf_::class . '->stmts' => "\n", - Stmt\Else_::class . '->stmts' => "\n", - Stmt\Finally_::class . '->stmts' => "\n", - Stmt\Foreach_::class . '->stmts' => "\n", - Stmt\For_::class . '->stmts' => "\n", - Stmt\Function_::class . '->stmts' => "\n", - Stmt\If_::class . '->stmts' => "\n", - Stmt\Namespace_::class . '->stmts' => "\n", - Stmt\Block::class . '->stmts' => "\n", - - // Attribute groups - Stmt\Class_::class . '->attrGroups' => "\n", - Stmt\Enum_::class . '->attrGroups' => "\n", - Stmt\EnumCase::class . '->attrGroups' => "\n", - Stmt\Interface_::class . '->attrGroups' => "\n", - Stmt\Trait_::class . '->attrGroups' => "\n", - Stmt\Function_::class . '->attrGroups' => "\n", - Stmt\ClassMethod::class . '->attrGroups' => "\n", - Stmt\ClassConst::class . '->attrGroups' => "\n", - Stmt\Property::class . '->attrGroups' => "\n", - PrintableNewAnonClassNode::class . '->attrGroups' => ' ', - Expr\Closure::class . '->attrGroups' => ' ', - Expr\ArrowFunction::class . '->attrGroups' => ' ', - Param::class . '->attrGroups' => ' ', - Stmt\Switch_::class . '->cases' => "\n", - Stmt\TraitUse::class . '->adaptations' => "\n", - Stmt\TryCatch::class . '->stmts' => "\n", - Stmt\While_::class . '->stmts' => "\n", - - // dummy for top-level context - 'File->stmts' => "\n", - ]; - } - - protected function initializeEmptyListInsertionMap(): void { - if (isset($this->emptyListInsertionMap)) { - return; - } - - // TODO Insertion into empty statement lists. - - // [$find, $extraLeft, $extraRight] - $this->emptyListInsertionMap = [ - Expr\ArrowFunction::class . '->params' => ['(', '', ''], - Expr\Closure::class . '->uses' => [')', ' use (', ')'], - Expr\Closure::class . '->params' => ['(', '', ''], - Expr\FuncCall::class . '->args' => ['(', '', ''], - Expr\MethodCall::class . '->args' => ['(', '', ''], - Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], - Expr\New_::class . '->args' => ['(', '', ''], - PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], - PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], - Expr\StaticCall::class . '->args' => ['(', '', ''], - Stmt\Class_::class . '->implements' => [null, ' implements ', ''], - Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], - Stmt\ClassMethod::class . '->params' => ['(', '', ''], - Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], - Stmt\Function_::class . '->params' => ['(', '', ''], - Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], - Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], - Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], - Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], - Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], - Stmt\Property::class . '->attrGroups' => [null, '', "\n"], - Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], - Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], - Expr\Closure::class . '->attrGroups' => [null, '', ' '], - PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], - - /* These cannot be empty to start with: - * Expr_Isset->vars - * Stmt_Catch->types - * Stmt_Const->consts - * Stmt_ClassConst->consts - * Stmt_Declare->declares - * Stmt_Echo->exprs - * Stmt_Global->vars - * Stmt_GroupUse->uses - * Stmt_Property->props - * Stmt_StaticVar->vars - * Stmt_TraitUse->traits - * Stmt_TraitUseAdaptation_Precedence->insteadof - * Stmt_Unset->vars - * Stmt_Use->uses - * UnionType->types - */ - - /* TODO - * Stmt_If->elseifs - * Stmt_TryCatch->catches - * Expr_Array->items - * Expr_List->items - * Stmt_For->init - * Stmt_For->cond - * Stmt_For->loop - */ - ]; - } - - protected function initializeModifierChangeMap(): void { - if (isset($this->modifierChangeMap)) { - return; - } - - $this->modifierChangeMap = [ - Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST], - Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], - Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], - Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], - PrintableNewAnonClassNode::class . '->flags' => ['pModifiers', \T_CLASS], - Param::class . '->flags' => ['pModifiers', \T_VARIABLE], - Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], - Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], - //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO - ]; - - // List of integer subnodes that are not modifiers: - // Expr_Include->type - // Stmt_GroupUse->type - // Stmt_Use->type - // UseItem->type - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/psr/cache/CHANGELOG.md b/fixtures/symfony_5_local_deps/vendor/psr/cache/CHANGELOG.md deleted file mode 100644 index 58ddab05a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/psr/cache/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file, in reverse chronological order by release. - -## 1.0.1 - 2016-08-06 - -### Fixed - -- Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr -- Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr -- Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell -- For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell - -## 1.0.0 - 2015-12-11 - -Initial stable release; reflects accepted PSR-6 specification diff --git a/fixtures/symfony_5_local_deps/vendor/psr/cache/LICENSE.txt b/fixtures/symfony_5_local_deps/vendor/psr/cache/LICENSE.txt deleted file mode 100644 index b1c2c97b9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/psr/cache/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/psr/cache/README.md b/fixtures/symfony_5_local_deps/vendor/psr/cache/README.md deleted file mode 100644 index 9855a318b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/psr/cache/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Caching Interface -============== - -This repository holds all interfaces related to [PSR-6 (Caching Interface)][psr-url]. - -Note that this is not a Caching implementation of its own. It is merely interfaces that describe the components of a Caching mechanism. - -The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. - -[psr-url]: https://www.php-fig.org/psr/psr-6/ -[package-url]: https://packagist.org/packages/psr/cache -[implementation-url]: https://packagist.org/providers/psr/cache-implementation diff --git a/fixtures/symfony_5_local_deps/vendor/psr/cache/composer.json b/fixtures/symfony_5_local_deps/vendor/psr/cache/composer.json deleted file mode 100644 index 4b687971e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/psr/cache/composer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "psr/cache", - "description": "Common interface for caching libraries", - "keywords": ["psr", "psr-6", "cache"], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "require": { - "php": ">=8.0.0" - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/psr/cache/src/CacheException.php b/fixtures/symfony_5_local_deps/vendor/psr/cache/src/CacheException.php deleted file mode 100644 index bb785f46c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/psr/cache/src/CacheException.php +++ /dev/null @@ -1,10 +0,0 @@ -=7.4.0" - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/psr/container/src/ContainerExceptionInterface.php b/fixtures/symfony_5_local_deps/vendor/psr/container/src/ContainerExceptionInterface.php deleted file mode 100644 index 0f213f2fe..000000000 --- a/fixtures/symfony_5_local_deps/vendor/psr/container/src/ContainerExceptionInterface.php +++ /dev/null @@ -1,12 +0,0 @@ -=7.2.0" - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php b/fixtures/symfony_5_local_deps/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php deleted file mode 100644 index 4306fa915..000000000 --- a/fixtures/symfony_5_local_deps/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -logger = $logger; - } - - public function doSomething() - { - if ($this->logger) { - $this->logger->info('Doing work'); - } - - try { - $this->doSomethingElse(); - } catch (Exception $exception) { - $this->logger->error('Oh no!', array('exception' => $exception)); - } - - // do something useful - } -} -``` - -You can then pick one of the implementations of the interface to get a logger. - -If you want to implement the interface, you can require this package and -implement `Psr\Log\LoggerInterface` in your code. Please read the -[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) -for details. diff --git a/fixtures/symfony_5_local_deps/vendor/psr/log/composer.json b/fixtures/symfony_5_local_deps/vendor/psr/log/composer.json deleted file mode 100644 index 879fc6f53..000000000 --- a/fixtures/symfony_5_local_deps/vendor/psr/log/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "psr/log", - "description": "Common interface for logging libraries", - "keywords": ["psr", "psr-3", "log"], - "homepage": "https://github.com/php-fig/log", - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "require": { - "php": ">=8.0.0" - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/apache-pack/composer.json b/fixtures/symfony_5_local_deps/vendor/symfony/apache-pack/composer.json deleted file mode 100644 index 5b4125a1f..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/apache-pack/composer.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "symfony/apache-pack", - "type": "symfony-pack", - "license": "MIT", - "description": "A pack for Apache support in Symfony" -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/CHANGELOG.md b/fixtures/symfony_5_local_deps/vendor/symfony/asset/CHANGELOG.md deleted file mode 100644 index 51827cadc..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/CHANGELOG.md +++ /dev/null @@ -1,43 +0,0 @@ -CHANGELOG -========= - -6.1 ---- - -* `UrlPackage` accepts empty strings as `base_url`, in order to simplify local dev configuration - -6.0 ---- - -* Remove `RemoteJsonManifestVersionStrategy`, use `JsonManifestVersionStrategy` instead - -5.3 ---- - - * deprecated `RemoteJsonManifestVersionStrategy`, use `JsonManifestVersionStrategy` instead. - -5.1.0 ------ - - * added `RemoteJsonManifestVersionStrategy` to download manifest over HTTP. - -4.2.0 ------ - - * added different protocols to be allowed as asset base_urls - -3.4.0 ------ - - * added optional arguments `$basePath` and `$secure` in `RequestStackContext::__construct()` - to provide a default request context in case the stack is empty - -3.3.0 ------ - * Added `JsonManifestVersionStrategy` as a way to read final, - versioned paths from a JSON manifest file. - -2.7.0 ------ - - * added the component diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Context/ContextInterface.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/Context/ContextInterface.php deleted file mode 100644 index f3c2f89b6..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Context/ContextInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset\Context; - -/** - * Holds information about the current request. - * - * @author Fabien Potencier - */ -interface ContextInterface -{ - /** - * Gets the base path. - */ - public function getBasePath(): string; - - /** - * Checks whether the request is secure or not. - */ - public function isSecure(): bool; -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Context/NullContext.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/Context/NullContext.php deleted file mode 100644 index 982ca3cb8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Context/NullContext.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset\Context; - -/** - * A context that does nothing. - * - * @author Fabien Potencier - */ -class NullContext implements ContextInterface -{ - public function getBasePath(): string - { - return ''; - } - - public function isSecure(): bool - { - return false; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Context/RequestStackContext.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/Context/RequestStackContext.php deleted file mode 100644 index 431c7f1a8..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Context/RequestStackContext.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset\Context; - -use Symfony\Component\HttpFoundation\RequestStack; - -/** - * Uses a RequestStack to populate the context. - * - * @author Fabien Potencier - */ -class RequestStackContext implements ContextInterface -{ - private RequestStack $requestStack; - private string $basePath; - private bool $secure; - - public function __construct(RequestStack $requestStack, string $basePath = '', bool $secure = false) - { - $this->requestStack = $requestStack; - $this->basePath = $basePath; - $this->secure = $secure; - } - - public function getBasePath(): string - { - if (!$request = $this->requestStack->getMainRequest()) { - return $this->basePath; - } - - return $request->getBasePath(); - } - - public function isSecure(): bool - { - if (!$request = $this->requestStack->getMainRequest()) { - return $this->secure; - } - - return $request->isSecure(); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Exception/ExceptionInterface.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/Exception/ExceptionInterface.php deleted file mode 100644 index 777f64b32..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset\Exception; - -/** - * Base ExceptionInterface for the Asset component. - * - * @author Fabien Potencier - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Exception/InvalidArgumentException.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/Exception/InvalidArgumentException.php deleted file mode 100644 index 0945d8fad..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset\Exception; - -/** - * Base InvalidArgumentException for the Asset component. - * - * @author Fabien Potencier - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Exception/LogicException.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/Exception/LogicException.php deleted file mode 100644 index f291d88d5..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Exception/LogicException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset\Exception; - -/** - * Base LogicException for the Asset component. - * - * @author Fabien Potencier - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/LICENSE b/fixtures/symfony_5_local_deps/vendor/symfony/asset/LICENSE deleted file mode 100644 index 0138f8f07..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Package.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/Package.php deleted file mode 100644 index 049a61920..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Package.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset; - -use Symfony\Component\Asset\Context\ContextInterface; -use Symfony\Component\Asset\Context\NullContext; -use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface; - -/** - * Basic package that adds a version to asset URLs. - * - * @author Kris Wallsmith - * @author Fabien Potencier - */ -class Package implements PackageInterface -{ - private VersionStrategyInterface $versionStrategy; - private ContextInterface $context; - - public function __construct(VersionStrategyInterface $versionStrategy, ?ContextInterface $context = null) - { - $this->versionStrategy = $versionStrategy; - $this->context = $context ?? new NullContext(); - } - - public function getVersion(string $path): string - { - return $this->versionStrategy->getVersion($path); - } - - public function getUrl(string $path): string - { - if ($this->isAbsoluteUrl($path)) { - return $path; - } - - return $this->versionStrategy->applyVersion($path); - } - - protected function getContext(): ContextInterface - { - return $this->context; - } - - protected function getVersionStrategy(): VersionStrategyInterface - { - return $this->versionStrategy; - } - - protected function isAbsoluteUrl(string $url): bool - { - return str_contains($url, '://') || str_starts_with($url, '//'); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/PackageInterface.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/PackageInterface.php deleted file mode 100644 index ece3686e3..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/PackageInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset; - -/** - * Asset package interface. - * - * @author Kris Wallsmith - */ -interface PackageInterface -{ - /** - * Returns the asset version for an asset. - */ - public function getVersion(string $path): string; - - /** - * Returns an absolute or root-relative public path. - */ - public function getUrl(string $path): string; -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Packages.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/Packages.php deleted file mode 100644 index 8456a8a32..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/Packages.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset; - -use Symfony\Component\Asset\Exception\InvalidArgumentException; -use Symfony\Component\Asset\Exception\LogicException; - -/** - * Helps manage asset URLs. - * - * @author Fabien Potencier - * @author Kris Wallsmith - */ -class Packages -{ - private ?PackageInterface $defaultPackage; - private array $packages = []; - - /** - * @param PackageInterface[] $packages Additional packages indexed by name - */ - public function __construct(?PackageInterface $defaultPackage = null, iterable $packages = []) - { - $this->defaultPackage = $defaultPackage; - - foreach ($packages as $name => $package) { - $this->addPackage($name, $package); - } - } - - /** - * @return void - */ - public function setDefaultPackage(PackageInterface $defaultPackage) - { - $this->defaultPackage = $defaultPackage; - } - - /** - * @return void - */ - public function addPackage(string $name, PackageInterface $package) - { - $this->packages[$name] = $package; - } - - /** - * Returns an asset package. - * - * @param string|null $name The name of the package or null for the default package - * - * @throws InvalidArgumentException If there is no package by that name - * @throws LogicException If no default package is defined - */ - public function getPackage(?string $name = null): PackageInterface - { - if (null === $name) { - if (null === $this->defaultPackage) { - throw new LogicException('There is no default asset package, configure one first.'); - } - - return $this->defaultPackage; - } - - if (!isset($this->packages[$name])) { - throw new InvalidArgumentException(sprintf('There is no "%s" asset package.', $name)); - } - - return $this->packages[$name]; - } - - /** - * Gets the version to add to public URL. - * - * @param string $path A public path - * @param string|null $packageName A package name - */ - public function getVersion(string $path, ?string $packageName = null): string - { - return $this->getPackage($packageName)->getVersion($path); - } - - /** - * Returns the public path. - * - * Absolute paths (i.e. http://...) are returned unmodified. - * - * @param string $path A public path - * @param string|null $packageName The name of the asset package to use - * - * @return string A public path which takes into account the base path and URL path - */ - public function getUrl(string $path, ?string $packageName = null): string - { - return $this->getPackage($packageName)->getUrl($path); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/PathPackage.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/PathPackage.php deleted file mode 100644 index d03a8c8d1..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/PathPackage.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset; - -use Symfony\Component\Asset\Context\ContextInterface; -use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface; - -/** - * Package that adds a base path to asset URLs in addition to a version. - * - * In addition to the provided base path, this package also automatically - * prepends the current request base path if a Context is available to - * allow a website to be hosted easily under any given path under the Web - * Server root directory. - * - * @author Fabien Potencier - */ -class PathPackage extends Package -{ - private string $basePath; - - /** - * @param string $basePath The base path to be prepended to relative paths - */ - public function __construct(string $basePath, VersionStrategyInterface $versionStrategy, ?ContextInterface $context = null) - { - parent::__construct($versionStrategy, $context); - - if (!$basePath) { - $this->basePath = '/'; - } else { - if ('/' != $basePath[0]) { - $basePath = '/'.$basePath; - } - - $this->basePath = rtrim($basePath, '/').'/'; - } - } - - public function getUrl(string $path): string - { - $versionedPath = parent::getUrl($path); - - // if absolute or begins with /, we're done - if ($this->isAbsoluteUrl($versionedPath) || ($versionedPath && '/' === $versionedPath[0])) { - return $versionedPath; - } - - return $this->getBasePath().ltrim($versionedPath, '/'); - } - - /** - * Returns the base path. - */ - public function getBasePath(): string - { - return $this->getContext()->getBasePath().$this->basePath; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/README.md b/fixtures/symfony_5_local_deps/vendor/symfony/asset/README.md deleted file mode 100644 index 37e7ea370..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Asset Component -=============== - -The Asset component manages URL generation and versioning of web assets such as -CSS stylesheets, JavaScript files and image files. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/asset/introduction.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/UrlPackage.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/UrlPackage.php deleted file mode 100644 index 0b884f42e..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/UrlPackage.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset; - -use Symfony\Component\Asset\Context\ContextInterface; -use Symfony\Component\Asset\Exception\InvalidArgumentException; -use Symfony\Component\Asset\Exception\LogicException; -use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface; - -/** - * Package that adds a base URL to asset URLs in addition to a version. - * - * The package allows to use more than one base URLs in which case - * it randomly chooses one for each asset; it also guarantees that - * any given path will always use the same base URL to be nice with - * HTTP caching mechanisms. - * - * When the request context is available, this package can choose the - * best base URL to use based on the current request scheme: - * - * * For HTTP request, it chooses between all base URLs; - * * For HTTPs requests, it chooses between HTTPs base URLs and relative protocol URLs - * or falls back to any base URL if no secure ones are available. - * - * @author Fabien Potencier - */ -class UrlPackage extends Package -{ - private array $baseUrls = []; - private ?self $sslPackage = null; - - /** - * @param string|string[] $baseUrls Base asset URLs - */ - public function __construct(string|array $baseUrls, VersionStrategyInterface $versionStrategy, ?ContextInterface $context = null) - { - parent::__construct($versionStrategy, $context); - - if (!\is_array($baseUrls)) { - $baseUrls = (array) $baseUrls; - } - - if (!$baseUrls) { - throw new LogicException('You must provide at least one base URL.'); - } - - foreach ($baseUrls as $baseUrl) { - $this->baseUrls[] = rtrim($baseUrl, '/'); - } - - $sslUrls = $this->getSslUrls($baseUrls); - - if ($sslUrls && $baseUrls !== $sslUrls) { - $this->sslPackage = new self($sslUrls, $versionStrategy); - } - } - - public function getUrl(string $path): string - { - if ($this->isAbsoluteUrl($path)) { - return $path; - } - - if (null !== $this->sslPackage && $this->getContext()->isSecure()) { - return $this->sslPackage->getUrl($path); - } - - $url = $this->getVersionStrategy()->applyVersion($path); - - if ($this->isAbsoluteUrl($url)) { - return $url; - } - - if ($url && '/' != $url[0]) { - $url = '/'.$url; - } - - return $this->getBaseUrl($path).$url; - } - - /** - * Returns the base URL for a path. - */ - public function getBaseUrl(string $path): string - { - if (1 === \count($this->baseUrls)) { - return $this->baseUrls[0]; - } - - return $this->baseUrls[$this->chooseBaseUrl($path)]; - } - - /** - * Determines which base URL to use for the given path. - * - * Override this method to change the default distribution strategy. - * This method should always return the same base URL index for a given path. - */ - protected function chooseBaseUrl(string $path): int - { - return abs(crc32($path)) % \count($this->baseUrls); - } - - private function getSslUrls(array $urls): array - { - $sslUrls = []; - foreach ($urls as $url) { - if (str_starts_with($url, 'https://') || str_starts_with($url, '//') || '' === $url) { - $sslUrls[] = $url; - } elseif (null === parse_url($url, \PHP_URL_SCHEME)) { - throw new InvalidArgumentException(sprintf('"%s" is not a valid URL.', $url)); - } - } - - return $sslUrls; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/EmptyVersionStrategy.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/EmptyVersionStrategy.php deleted file mode 100644 index 6903d7b62..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/EmptyVersionStrategy.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset\VersionStrategy; - -/** - * Disable version for all assets. - * - * @author Fabien Potencier - */ -class EmptyVersionStrategy implements VersionStrategyInterface -{ - public function getVersion(string $path): string - { - return ''; - } - - public function applyVersion(string $path): string - { - return $path; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/JsonManifestVersionStrategy.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/JsonManifestVersionStrategy.php deleted file mode 100644 index 28cd50bbd..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/JsonManifestVersionStrategy.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset\VersionStrategy; - -use Symfony\Component\Asset\Exception\AssetNotFoundException; -use Symfony\Component\Asset\Exception\LogicException; -use Symfony\Component\Asset\Exception\RuntimeException; -use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -/** - * Reads the versioned path of an asset from a JSON manifest file. - * - * For example, the manifest file might look like this: - * { - * "main.js": "main.abc123.js", - * "css/styles.css": "css/styles.555abc.css" - * } - * - * You could then ask for the version of "main.js" or "css/styles.css". - */ -class JsonManifestVersionStrategy implements VersionStrategyInterface -{ - private string $manifestPath; - private array $manifestData; - private ?HttpClientInterface $httpClient; - private bool $strictMode; - - /** - * @param string $manifestPath Absolute path to the manifest file - * @param bool $strictMode Throws an exception for unknown paths - */ - public function __construct(string $manifestPath, ?HttpClientInterface $httpClient = null, bool $strictMode = false) - { - $this->manifestPath = $manifestPath; - $this->httpClient = $httpClient; - $this->strictMode = $strictMode; - - if (null === $this->httpClient && ($scheme = parse_url($this->manifestPath, \PHP_URL_SCHEME)) && str_starts_with($scheme, 'http')) { - throw new LogicException(sprintf('The "%s" class needs an HTTP client to use a remote manifest. Try running "composer require symfony/http-client".', self::class)); - } - } - - /** - * With a manifest, we don't really know or care about what - * the version is. Instead, this returns the path to the - * versioned file. - */ - public function getVersion(string $path): string - { - return $this->applyVersion($path); - } - - public function applyVersion(string $path): string - { - return $this->getManifestPath($path) ?: $path; - } - - private function getManifestPath(string $path): ?string - { - if (!isset($this->manifestData)) { - if (null !== $this->httpClient && ($scheme = parse_url($this->manifestPath, \PHP_URL_SCHEME)) && str_starts_with($scheme, 'http')) { - try { - $this->manifestData = $this->httpClient->request('GET', $this->manifestPath, [ - 'headers' => ['accept' => 'application/json'], - ])->toArray(); - } catch (DecodingExceptionInterface $e) { - throw new RuntimeException(sprintf('Error parsing JSON from asset manifest URL "%s".', $this->manifestPath), 0, $e); - } catch (ClientExceptionInterface $e) { - throw new RuntimeException(sprintf('Error loading JSON from asset manifest URL "%s".', $this->manifestPath), 0, $e); - } - } else { - if (!is_file($this->manifestPath)) { - throw new RuntimeException(sprintf('Asset manifest file "%s" does not exist. Did you forget to build the assets with npm or yarn?', $this->manifestPath)); - } - - try { - $this->manifestData = json_decode(file_get_contents($this->manifestPath), true, flags: \JSON_THROW_ON_ERROR); - } catch (\JsonException $e) { - throw new RuntimeException(sprintf('Error parsing JSON from asset manifest file "%s": ', $this->manifestPath).$e->getMessage(), previous: $e); - } - } - } - - if (isset($this->manifestData[$path])) { - return $this->manifestData[$path]; - } - - if ($this->strictMode) { - $message = sprintf('Asset "%s" not found in manifest "%s".', $path, $this->manifestPath); - $alternatives = $this->findAlternatives($path, $this->manifestData); - if (\count($alternatives) > 0) { - $message .= sprintf(' Did you mean one of these? "%s".', implode('", "', $alternatives)); - } - - throw new AssetNotFoundException($message, $alternatives); - } - - return null; - } - - private function findAlternatives(string $path, array $manifestData): array - { - $path = strtolower($path); - $alternatives = []; - - foreach ($manifestData as $key => $value) { - $lev = levenshtein($path, strtolower($key)); - if ($lev <= \strlen($path) / 3 || false !== stripos($key, $path)) { - $alternatives[$key] = isset($alternatives[$key]) ? min($lev, $alternatives[$key]) : $lev; - } - - $lev = levenshtein($path, strtolower($value)); - if ($lev <= \strlen($path) / 3 || false !== stripos($key, $path)) { - $alternatives[$key] = isset($alternatives[$key]) ? min($lev, $alternatives[$key]) : $lev; - } - } - - asort($alternatives); - - return array_keys($alternatives); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/StaticVersionStrategy.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/StaticVersionStrategy.php deleted file mode 100644 index 2a30219ba..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/StaticVersionStrategy.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset\VersionStrategy; - -/** - * Returns the same version for all assets. - * - * @author Fabien Potencier - */ -class StaticVersionStrategy implements VersionStrategyInterface -{ - private string $version; - private string $format; - - /** - * @param string $version Version number - * @param string $format Url format - */ - public function __construct(string $version, ?string $format = null) - { - $this->version = $version; - $this->format = $format ?: '%s?%s'; - } - - public function getVersion(string $path): string - { - return $this->version; - } - - public function applyVersion(string $path): string - { - $versionized = sprintf($this->format, ltrim($path, '/'), $this->getVersion($path)); - - if ($path && '/' === $path[0]) { - return '/'.$versionized; - } - - return $versionized; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/VersionStrategyInterface.php b/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/VersionStrategyInterface.php deleted file mode 100644 index d4b447d45..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/VersionStrategy/VersionStrategyInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Asset\VersionStrategy; - -/** - * Asset version strategy interface. - * - * @author Fabien Potencier - */ -interface VersionStrategyInterface -{ - /** - * Returns the asset version for an asset. - */ - public function getVersion(string $path): string; - - /** - * Applies version to the supplied path. - */ - public function applyVersion(string $path): string; -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/asset/composer.json b/fixtures/symfony_5_local_deps/vendor/symfony/asset/composer.json deleted file mode 100644 index fa5e2f87a..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/asset/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "symfony/asset", - "type": "library", - "description": "Manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=8.1" - }, - "require-dev": { - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^5.4|^6.0|^7.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0" - }, - "conflict": { - "symfony/http-foundation": "<5.4" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Asset\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/browser-kit/AbstractBrowser.php b/fixtures/symfony_5_local_deps/vendor/symfony/browser-kit/AbstractBrowser.php deleted file mode 100644 index 16420c7f2..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/browser-kit/AbstractBrowser.php +++ /dev/null @@ -1,692 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\BrowserKit; - -use Symfony\Component\BrowserKit\Exception\BadMethodCallException; -use Symfony\Component\BrowserKit\Exception\InvalidArgumentException; -use Symfony\Component\BrowserKit\Exception\LogicException; -use Symfony\Component\BrowserKit\Exception\RuntimeException; -use Symfony\Component\DomCrawler\Crawler; -use Symfony\Component\DomCrawler\Form; -use Symfony\Component\DomCrawler\Link; -use Symfony\Component\Process\PhpProcess; - -/** - * Simulates a browser. - * - * To make the actual request, you need to implement the doRequest() method. - * - * If you want to be able to run requests in their own process (insulated flag), - * you need to also implement the getScript() method. - * - * @author Fabien Potencier - */ -abstract class AbstractBrowser -{ - protected $history; - protected $cookieJar; - protected $server = []; - protected $internalRequest; - protected $request; - protected $internalResponse; - protected $response; - protected $crawler; - protected bool $useHtml5Parser = true; - protected $insulated = false; - protected $redirect; - protected $followRedirects = true; - protected $followMetaRefresh = false; - - private int $maxRedirects = -1; - private int $redirectCount = 0; - private array $redirects = []; - private bool $isMainRequest = true; - - /** - * @param array $server The server parameters (equivalent of $_SERVER) - */ - public function __construct(array $server = [], ?History $history = null, ?CookieJar $cookieJar = null) - { - $this->setServerParameters($server); - $this->history = $history ?? new History(); - $this->cookieJar = $cookieJar ?? new CookieJar(); - } - - /** - * Sets whether to automatically follow redirects or not. - * - * @return void - */ - public function followRedirects(bool $followRedirects = true) - { - $this->followRedirects = $followRedirects; - } - - /** - * Sets whether to automatically follow meta refresh redirects or not. - * - * @return void - */ - public function followMetaRefresh(bool $followMetaRefresh = true) - { - $this->followMetaRefresh = $followMetaRefresh; - } - - /** - * Returns whether client automatically follows redirects or not. - */ - public function isFollowingRedirects(): bool - { - return $this->followRedirects; - } - - /** - * Sets the maximum number of redirects that crawler can follow. - * - * @return void - */ - public function setMaxRedirects(int $maxRedirects) - { - $this->maxRedirects = $maxRedirects < 0 ? -1 : $maxRedirects; - $this->followRedirects = -1 !== $this->maxRedirects; - } - - /** - * Returns the maximum number of redirects that crawler can follow. - */ - public function getMaxRedirects(): int - { - return $this->maxRedirects; - } - - /** - * Sets the insulated flag. - * - * @return void - * - * @throws LogicException When Symfony Process Component is not installed - */ - public function insulate(bool $insulated = true) - { - if ($insulated && !class_exists(\Symfony\Component\Process\Process::class)) { - throw new LogicException('Unable to isolate requests as the Symfony Process Component is not installed. Try running "composer require symfony/process".'); - } - - $this->insulated = $insulated; - } - - /** - * Sets server parameters. - * - * @return void - */ - public function setServerParameters(array $server) - { - $this->server = array_merge([ - 'HTTP_USER_AGENT' => 'Symfony BrowserKit', - ], $server); - } - - /** - * Sets single server parameter. - * - * @return void - */ - public function setServerParameter(string $key, string $value) - { - $this->server[$key] = $value; - } - - /** - * Gets single server parameter for specified key. - */ - public function getServerParameter(string $key, mixed $default = ''): mixed - { - return $this->server[$key] ?? $default; - } - - public function xmlHttpRequest(string $method, string $uri, array $parameters = [], array $files = [], array $server = [], ?string $content = null, bool $changeHistory = true): Crawler - { - $this->setServerParameter('HTTP_X_REQUESTED_WITH', 'XMLHttpRequest'); - - try { - return $this->request($method, $uri, $parameters, $files, $server, $content, $changeHistory); - } finally { - unset($this->server['HTTP_X_REQUESTED_WITH']); - } - } - - /** - * Converts the request parameters into a JSON string and uses it as request content. - */ - public function jsonRequest(string $method, string $uri, array $parameters = [], array $server = [], bool $changeHistory = true): Crawler - { - $content = json_encode($parameters); - - $this->setServerParameter('CONTENT_TYPE', 'application/json'); - $this->setServerParameter('HTTP_ACCEPT', 'application/json'); - - try { - return $this->request($method, $uri, [], [], $server, $content, $changeHistory); - } finally { - unset($this->server['CONTENT_TYPE']); - unset($this->server['HTTP_ACCEPT']); - } - } - - /** - * Returns the History instance. - */ - public function getHistory(): History - { - return $this->history; - } - - /** - * Returns the CookieJar instance. - */ - public function getCookieJar(): CookieJar - { - return $this->cookieJar; - } - - /** - * Returns the current Crawler instance. - */ - public function getCrawler(): Crawler - { - return $this->crawler ?? throw new BadMethodCallException(sprintf('The "request()" method must be called before "%s()".', __METHOD__)); - } - - /** - * Sets whether parsing should be done using "masterminds/html5". - * - * @return $this - */ - public function useHtml5Parser(bool $useHtml5Parser): static - { - $this->useHtml5Parser = $useHtml5Parser; - - return $this; - } - - /** - * Returns the current BrowserKit Response instance. - */ - public function getInternalResponse(): Response - { - return $this->internalResponse ?? throw new BadMethodCallException(sprintf('The "request()" method must be called before "%s()".', __METHOD__)); - } - - /** - * Returns the current origin response instance. - * - * The origin response is the response instance that is returned - * by the code that handles requests. - * - * @see doRequest() - */ - public function getResponse(): object - { - return $this->response ?? throw new BadMethodCallException(sprintf('The "request()" method must be called before "%s()".', __METHOD__)); - } - - /** - * Returns the current BrowserKit Request instance. - */ - public function getInternalRequest(): Request - { - return $this->internalRequest ?? throw new BadMethodCallException(sprintf('The "request()" method must be called before "%s()".', __METHOD__)); - } - - /** - * Returns the current origin Request instance. - * - * The origin request is the request instance that is sent - * to the code that handles requests. - * - * @see doRequest() - */ - public function getRequest(): object - { - return $this->request ?? throw new BadMethodCallException(sprintf('The "request()" method must be called before "%s()".', __METHOD__)); - } - - /** - * Clicks on a given link. - * - * @param array $serverParameters An array of server parameters - */ - public function click(Link $link/* , array $serverParameters = [] */): Crawler - { - $serverParameters = 1 < \func_num_args() ? func_get_arg(1) : []; - - if ($link instanceof Form) { - return $this->submit($link, [], $serverParameters); - } - - return $this->request($link->getMethod(), $link->getUri(), [], [], $serverParameters); - } - - /** - * Clicks the first link (or clickable image) that contains the given text. - * - * @param string $linkText The text of the link or the alt attribute of the clickable image - * @param array $serverParameters An array of server parameters - */ - public function clickLink(string $linkText/* , array $serverParameters = [] */): Crawler - { - $serverParameters = 1 < \func_num_args() ? func_get_arg(1) : []; - - $crawler = $this->crawler ?? throw new BadMethodCallException(sprintf('The "request()" method must be called before "%s()".', __METHOD__)); - - return $this->click($crawler->selectLink($linkText)->link(), $serverParameters); - } - - /** - * Submits a form. - * - * @param array $values An array of form field values - * @param array $serverParameters An array of server parameters - */ - public function submit(Form $form, array $values = [], array $serverParameters = []): Crawler - { - $form->setValues($values); - - return $this->request($form->getMethod(), $form->getUri(), $form->getPhpValues(), $form->getPhpFiles(), $serverParameters); - } - - /** - * Finds the first form that contains a button with the given content and - * uses it to submit the given form field values. - * - * @param string $button The text content, id, value or name of the form
#s', '\\1', $code); - // split multiline code tags - $code = preg_replace_callback('#]++)>((?:[^<]*+\\n)++[^<]*+)#', fn ($m) => "".str_replace("\n", "\n", $m[2]).'', $code); - // Convert spaces to html entities to preserve indentation when rendered - $code = str_replace(' ', ' ', $code); - $content = explode("\n", $code); - } else { - // remove main code/span tags - $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); - // split multiline spans - $code = preg_replace_callback('#]++)>((?:[^<]*+
)++[^<]*+)
#', fn ($m) => "".str_replace('
', "

", $m[2]).'', $code); - $content = explode('
', $code); - } - - $lines = []; - if (0 > $srcContext) { - $srcContext = \count($content); - } - - for ($i = max($line - $srcContext, 1), $max = min($line + $srcContext, \count($content)); $i <= $max; ++$i) { - $lines[] = ''.$this->fixCodeMarkup($content[$i - 1]).''; - } - - return '
    '.implode("\n", $lines).'
'; - } - - return ''; - } - - private function fixCodeMarkup(string $line): string - { - // ending tag from previous line - $opening = strpos($line, ''); - if (false !== $closing && (false === $opening || $closing < $opening)) { - $line = substr_replace($line, '', $closing, 7); - } - - // missing tag at the end of line - $opening = strrpos($line, ''); - if (false !== $opening && (false === $closing || $closing < $opening)) { - $line .= ''; - } - - return trim($line); - } - - private function formatFileFromText(string $text): string - { - return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', fn ($match) => 'in '.$this->formatFile($match[2], $match[3]), $text); - } - - private function formatLogMessage(string $message, array $context): string - { - if ($context && str_contains($message, '{')) { - $replacements = []; - foreach ($context as $key => $val) { - if (\is_scalar($val)) { - $replacements['{'.$key.'}'] = $val; - } - } - - if ($replacements) { - $message = strtr($message, $replacements); - } - } - - return $this->escape($message); - } - - private function addElementToGhost(): string - { - if (!isset(self::GHOST_ADDONS[date('m-d')])) { - return ''; - } - - return ''; - } - - private function include(string $name, array $context = []): string - { - extract($context, \EXTR_SKIP); - ob_start(); - - include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name : $name; - - return trim(ob_get_clean()); - } - - /** - * Allows overriding the default non-debug template. - * - * @param string $template path to the custom template file to render - */ - public static function setTemplate(string $template): void - { - self::$template = $template; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php deleted file mode 100644 index a42ce3f2b..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorRenderer; - -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Serializer\Exception\NotEncodableValueException; -use Symfony\Component\Serializer\SerializerInterface; - -/** - * Formats an exception using Serializer for rendering. - * - * @author Nicolas Grekas - */ -class SerializerErrorRenderer implements ErrorRendererInterface -{ - private SerializerInterface $serializer; - private string|\Closure $format; - private ErrorRendererInterface $fallbackErrorRenderer; - private bool|\Closure $debug; - - /** - * @param string|callable(FlattenException) $format The format as a string or a callable that should return it - * formats not supported by Request::getMimeTypes() should be given as mime types - * @param bool|callable $debug The debugging mode as a boolean or a callable that should return it - */ - public function __construct(SerializerInterface $serializer, string|callable $format, ?ErrorRendererInterface $fallbackErrorRenderer = null, bool|callable $debug = false) - { - $this->serializer = $serializer; - $this->format = \is_string($format) ? $format : $format(...); - $this->fallbackErrorRenderer = $fallbackErrorRenderer ?? new HtmlErrorRenderer(); - $this->debug = \is_bool($debug) ? $debug : $debug(...); - } - - public function render(\Throwable $exception): FlattenException - { - $headers = ['Vary' => 'Accept']; - $debug = \is_bool($this->debug) ? $this->debug : ($this->debug)($exception); - if ($debug) { - $headers['X-Debug-Exception'] = rawurlencode($exception->getMessage()); - $headers['X-Debug-Exception-File'] = rawurlencode($exception->getFile()).':'.$exception->getLine(); - } - - $flattenException = FlattenException::createFromThrowable($exception, null, $headers); - - try { - $format = \is_string($this->format) ? $this->format : ($this->format)($flattenException); - $headers['Content-Type'] = Request::getMimeTypes($format)[0] ?? $format; - - $flattenException->setAsString($this->serializer->serialize($flattenException, $format, [ - 'exception' => $exception, - 'debug' => $debug, - ])); - } catch (NotEncodableValueException) { - $flattenException = $this->fallbackErrorRenderer->render($exception); - } - - return $flattenException->setHeaders($flattenException->getHeaders() + $headers); - } - - public static function getPreferredFormat(RequestStack $requestStack): \Closure - { - return static function () use ($requestStack) { - if (!$request = $requestStack->getCurrentRequest()) { - throw new NotEncodableValueException(); - } - - return $request->getPreferredFormat(); - }; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Exception/FlattenException.php b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Exception/FlattenException.php deleted file mode 100644 index 39473151d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Exception/FlattenException.php +++ /dev/null @@ -1,440 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Exception; - -use Symfony\Component\HttpFoundation\Exception\RequestExceptionInterface; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\Stub; -use Symfony\Component\VarDumper\Cloner\VarCloner; - -/** - * FlattenException wraps a PHP Error or Exception to be able to serialize it. - * - * Basically, this class removes all objects from the trace. - * - * @author Fabien Potencier - */ -class FlattenException -{ - private string $message; - private string|int $code; - private ?self $previous = null; - private array $trace; - private string $traceAsString; - private string $class; - private int $statusCode; - private string $statusText; - private array $headers; - private string $file; - private int $line; - private ?string $asString = null; - private Data $dataRepresentation; - - public static function create(\Exception $exception, ?int $statusCode = null, array $headers = []): static - { - return static::createFromThrowable($exception, $statusCode, $headers); - } - - public static function createFromThrowable(\Throwable $exception, ?int $statusCode = null, array $headers = []): static - { - $e = new static(); - $e->setMessage($exception->getMessage()); - $e->setCode($exception->getCode()); - - if ($exception instanceof HttpExceptionInterface) { - $statusCode = $exception->getStatusCode(); - $headers = array_merge($headers, $exception->getHeaders()); - } elseif ($exception instanceof RequestExceptionInterface) { - $statusCode = 400; - } - - $statusCode ??= 500; - - if (class_exists(Response::class) && isset(Response::$statusTexts[$statusCode])) { - $statusText = Response::$statusTexts[$statusCode]; - } else { - $statusText = 'Whoops, looks like something went wrong.'; - } - - $e->setStatusText($statusText); - $e->setStatusCode($statusCode); - $e->setHeaders($headers); - $e->setTraceFromThrowable($exception); - $e->setClass(get_debug_type($exception)); - $e->setFile($exception->getFile()); - $e->setLine($exception->getLine()); - - $previous = $exception->getPrevious(); - - if ($previous instanceof \Throwable) { - $e->setPrevious(static::createFromThrowable($previous)); - } - - return $e; - } - - public static function createWithDataRepresentation(\Throwable $throwable, ?int $statusCode = null, array $headers = [], ?VarCloner $cloner = null): static - { - $e = static::createFromThrowable($throwable, $statusCode, $headers); - - static $defaultCloner; - - if (!$cloner ??= $defaultCloner) { - $cloner = $defaultCloner = new VarCloner(); - $cloner->addCasters([ - \Throwable::class => function (\Throwable $e, array $a, Stub $s, bool $isNested): array { - if (!$isNested) { - unset($a[Caster::PREFIX_PROTECTED.'message']); - unset($a[Caster::PREFIX_PROTECTED.'code']); - unset($a[Caster::PREFIX_PROTECTED.'file']); - unset($a[Caster::PREFIX_PROTECTED.'line']); - unset($a["\0Error\0trace"], $a["\0Exception\0trace"]); - unset($a["\0Error\0previous"], $a["\0Exception\0previous"]); - } - - return $a; - }, - ]); - } - - return $e->setDataRepresentation($cloner->cloneVar($throwable)); - } - - public function toArray(): array - { - $exceptions = []; - foreach (array_merge([$this], $this->getAllPrevious()) as $exception) { - $exceptions[] = [ - 'message' => $exception->getMessage(), - 'class' => $exception->getClass(), - 'trace' => $exception->getTrace(), - 'data' => $exception->getDataRepresentation(), - ]; - } - - return $exceptions; - } - - public function getStatusCode(): int - { - return $this->statusCode; - } - - /** - * @return $this - */ - public function setStatusCode(int $code): static - { - $this->statusCode = $code; - - return $this; - } - - public function getHeaders(): array - { - return $this->headers; - } - - /** - * @return $this - */ - public function setHeaders(array $headers): static - { - $this->headers = $headers; - - return $this; - } - - public function getClass(): string - { - return $this->class; - } - - /** - * @return $this - */ - public function setClass(string $class): static - { - $this->class = str_contains($class, "@anonymous\0") ? (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous' : $class; - - return $this; - } - - public function getFile(): string - { - return $this->file; - } - - /** - * @return $this - */ - public function setFile(string $file): static - { - $this->file = $file; - - return $this; - } - - public function getLine(): int - { - return $this->line; - } - - /** - * @return $this - */ - public function setLine(int $line): static - { - $this->line = $line; - - return $this; - } - - public function getStatusText(): string - { - return $this->statusText; - } - - /** - * @return $this - */ - public function setStatusText(string $statusText): static - { - $this->statusText = $statusText; - - return $this; - } - - public function getMessage(): string - { - return $this->message; - } - - /** - * @return $this - */ - public function setMessage(string $message): static - { - if (str_contains($message, "@anonymous\0")) { - $message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $message); - } - - $this->message = $message; - - return $this; - } - - /** - * @return int|string int most of the time (might be a string with PDOException) - */ - public function getCode(): int|string - { - return $this->code; - } - - /** - * @return $this - */ - public function setCode(int|string $code): static - { - $this->code = $code; - - return $this; - } - - public function getPrevious(): ?self - { - return $this->previous; - } - - /** - * @return $this - */ - public function setPrevious(?self $previous): static - { - $this->previous = $previous; - - return $this; - } - - /** - * @return self[] - */ - public function getAllPrevious(): array - { - $exceptions = []; - $e = $this; - while ($e = $e->getPrevious()) { - $exceptions[] = $e; - } - - return $exceptions; - } - - public function getTrace(): array - { - return $this->trace; - } - - /** - * @return $this - */ - public function setTraceFromThrowable(\Throwable $throwable): static - { - $this->traceAsString = $throwable->getTraceAsString(); - - return $this->setTrace($throwable->getTrace(), $throwable->getFile(), $throwable->getLine()); - } - - /** - * @return $this - */ - public function setTrace(array $trace, ?string $file, ?int $line): static - { - $this->trace = []; - $this->trace[] = [ - 'namespace' => '', - 'short_class' => '', - 'class' => '', - 'type' => '', - 'function' => '', - 'file' => $file, - 'line' => $line, - 'args' => [], - ]; - foreach ($trace as $entry) { - $class = ''; - $namespace = ''; - if (isset($entry['class'])) { - $parts = explode('\\', $entry['class']); - $class = array_pop($parts); - $namespace = implode('\\', $parts); - } - - $this->trace[] = [ - 'namespace' => $namespace, - 'short_class' => $class, - 'class' => $entry['class'] ?? '', - 'type' => $entry['type'] ?? '', - 'function' => $entry['function'] ?? null, - 'file' => $entry['file'] ?? null, - 'line' => $entry['line'] ?? null, - 'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : [], - ]; - } - - return $this; - } - - public function getDataRepresentation(): ?Data - { - return $this->dataRepresentation ?? null; - } - - /** - * @return $this - */ - public function setDataRepresentation(Data $data): static - { - $this->dataRepresentation = $data; - - return $this; - } - - private function flattenArgs(array $args, int $level = 0, int &$count = 0): array - { - $result = []; - foreach ($args as $key => $value) { - if (++$count > 1e4) { - return ['array', '*SKIPPED over 10000 entries*']; - } - if ($value instanceof \__PHP_Incomplete_Class) { - $result[$key] = ['incomplete-object', $this->getClassNameFromIncomplete($value)]; - } elseif (\is_object($value)) { - $result[$key] = ['object', get_debug_type($value)]; - } elseif (\is_array($value)) { - if ($level > 10) { - $result[$key] = ['array', '*DEEP NESTED ARRAY*']; - } else { - $result[$key] = ['array', $this->flattenArgs($value, $level + 1, $count)]; - } - } elseif (null === $value) { - $result[$key] = ['null', null]; - } elseif (\is_bool($value)) { - $result[$key] = ['boolean', $value]; - } elseif (\is_int($value)) { - $result[$key] = ['integer', $value]; - } elseif (\is_float($value)) { - $result[$key] = ['float', $value]; - } elseif (\is_resource($value)) { - $result[$key] = ['resource', get_resource_type($value)]; - } else { - $result[$key] = ['string', (string) $value]; - } - } - - return $result; - } - - private function getClassNameFromIncomplete(\__PHP_Incomplete_Class $value): string - { - $array = new \ArrayObject($value); - - return $array['__PHP_Incomplete_Class_Name']; - } - - public function getTraceAsString(): string - { - return $this->traceAsString; - } - - /** - * @return $this - */ - public function setAsString(?string $asString): static - { - $this->asString = $asString; - - return $this; - } - - public function getAsString(): string - { - if (null !== $this->asString) { - return $this->asString; - } - - $message = ''; - $next = false; - - foreach (array_reverse(array_merge([$this], $this->getAllPrevious())) as $exception) { - if ($next) { - $message .= 'Next '; - } else { - $next = true; - } - $message .= $exception->getClass(); - - if ('' != $exception->getMessage()) { - $message .= ': '.$exception->getMessage(); - } - - $message .= ' in '.$exception->getFile().':'.$exception->getLine(). - "\nStack trace:\n".$exception->getTraceAsString()."\n\n"; - } - - return rtrim($message); - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Exception/SilencedErrorContext.php b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Exception/SilencedErrorContext.php deleted file mode 100644 index ac19e6391..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Exception/SilencedErrorContext.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Exception; - -/** - * Data Object that represents a Silenced Error. - * - * @author Grégoire Pineau - */ -class SilencedErrorContext implements \JsonSerializable -{ - public $count = 1; - - private int $severity; - private string $file; - private int $line; - private array $trace; - - public function __construct(int $severity, string $file, int $line, array $trace = [], int $count = 1) - { - $this->severity = $severity; - $this->file = $file; - $this->line = $line; - $this->trace = $trace; - $this->count = $count; - } - - public function getSeverity(): int - { - return $this->severity; - } - - public function getFile(): string - { - return $this->file; - } - - public function getLine(): int - { - return $this->line; - } - - public function getTrace(): array - { - return $this->trace; - } - - public function jsonSerialize(): array - { - return [ - 'severity' => $this->severity, - 'file' => $this->file, - 'line' => $this->line, - 'trace' => $this->trace, - 'count' => $this->count, - ]; - } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/LICENSE b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/LICENSE deleted file mode 100644 index f37c76b59..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2019-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/README.md b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/README.md deleted file mode 100644 index 12c0bfa6d..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/README.md +++ /dev/null @@ -1,44 +0,0 @@ -ErrorHandler Component -====================== - -The ErrorHandler component provides tools to manage errors and ease debugging PHP code. - -Getting Started ---------------- - -``` -$ composer require symfony/error-handler -``` - -```php -use Symfony\Component\ErrorHandler\Debug; -use Symfony\Component\ErrorHandler\ErrorHandler; -use Symfony\Component\ErrorHandler\DebugClassLoader; - -Debug::enable(); - -// or enable only one feature -//ErrorHandler::register(); -//DebugClassLoader::enable(); - -// If you want a custom generic template when debug is not enabled -// HtmlErrorRenderer::setTemplate('/path/to/custom/error.html.php'); - -$data = ErrorHandler::call(static function () use ($filename, $datetimeFormat) { - // if any code executed inside this anonymous function fails, a PHP exception - // will be thrown, even if the code uses the '@' PHP silence operator - $data = json_decode(file_get_contents($filename), true); - $data['read_at'] = date($datetimeFormat); - file_put_contents($filename, json_encode($data)); - - return $data; -}); -``` - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/css/error.css b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/css/error.css deleted file mode 100644 index 332d81876..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/css/error.css +++ /dev/null @@ -1,4 +0,0 @@ -body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; } -.container { margin: 30px; max-width: 600px; } -h1 { color: #dc3545; font-size: 24px; } -h2 { font-size: 18px; } diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/css/exception.css b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/css/exception.css deleted file mode 100644 index 3e6eae5a9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/css/exception.css +++ /dev/null @@ -1,359 +0,0 @@ -/* This file is based on WebProfilerBundle/Resources/views/Profiler/profiler.css.twig. - If you make any change in this file, verify the same change is needed in the other file. */ -:root { - --font-sans-serif: Helvetica, Arial, sans-serif; - --page-background: #f9f9f9; - --color-text: #222; - /* when updating any of these colors, do the same in toolbar.css.twig */ - --color-success: #4f805d; - --color-warning: #a46a1f; - --color-error: #b0413e; - --color-muted: #999; - --tab-background: #f0f0f0; - --tab-border-color: #e5e5e5; - --tab-active-border-color: #d4d4d4; - --tab-color: #444; - --tab-active-background: #fff; - --tab-active-color: var(--color-text); - --tab-disabled-background: #f5f5f5; - --tab-disabled-color: #999; - --selected-badge-background: #e5e5e5; - --selected-badge-color: #525252; - --selected-badge-shadow: inset 0 0 0 1px #d4d4d4; - --selected-badge-warning-background: #fde496; - --selected-badge-warning-color: #785b02; - --selected-badge-warning-shadow: inset 0 0 0 1px #e6af05; - --selected-badge-danger-background: #FCE9ED; - --selected-badge-danger-color: #83122A; - --selected-badge-danger-shadow: inset 0 0 0 1px #F5B8C5; - --metric-value-background: #fff; - --metric-value-color: inherit; - --metric-unit-color: #999; - --metric-label-background: #e0e0e0; - --metric-label-color: inherit; - --table-border: #e0e0e0; - --table-background: #fff; - --table-header: #e0e0e0; - --trace-selected-background: #F7E5A1; - --tree-active-background: #F7E5A1; - --exception-title-color: var(--base-2); - --shadow: 0px 0px 1px rgba(128, 128, 128, .2); - --border: 1px solid #e0e0e0; - --background-error: var(--color-error); - --highlight-comment: #969896; - --highlight-default: #222222; - --highlight-keyword: #a71d5d; - --highlight-string: #183691; - --base-0: #fff; - --base-1: #f5f5f5; - --base-2: #e0e0e0; - --base-3: #ccc; - --base-4: #666; - --base-5: #444; - --base-6: #222; -} - -.theme-dark { - --page-background: #36393e; - --color-text: #e0e0e0; - --color-muted: #777; - --color-error: #d43934; - --tab-background: #404040; - --tab-border-color: #737373; - --tab-active-border-color: #171717; - --tab-color: var(--color-text); - --tab-active-background: #d4d4d4; - --tab-active-color: #262626; - --tab-disabled-background: var(--page-background); - --tab-disabled-color: #a3a3a3; - --selected-badge-background: #555; - --selected-badge-color: #ddd; - --selected-badge-shadow: none; - --selected-badge-warning-background: #fcd55f; - --selected-badge-warning-color: #785b02; - --selected-badge-warning-shadow: inset 0 0 0 1px #af8503; - --selected-badge-danger-background: #B41939; - --selected-badge-danger-color: #FCE9ED; - --selected-badge-danger-shadow: none; - --metric-value-background: #555; - --metric-value-color: inherit; - --metric-unit-color: #999; - --metric-label-background: #777; - --metric-label-color: #e0e0e0; - --trace-selected-background: #71663acc; - --table-border: #444; - --table-background: #333; - --table-header: #555; - --info-background: rgba(79, 148, 195, 0.5); - --tree-active-background: var(--metric-label-background); - --exception-title-color: var(--base-2); - --shadow: 0px 0px 1px rgba(32, 32, 32, .2); - --border: 1px solid #666; - --background-error: #b0413e; - --highlight-comment: #dedede; - --highlight-default: var(--base-6); - --highlight-keyword: #ff413c; - --highlight-string: #70a6fd; - --base-0: #2e3136; - --base-1: #444; - --base-2: #666; - --base-3: #666; - --base-4: #666; - --base-5: #e0e0e0; - --base-6: #f5f5f5; - --card-label-background: var(--tab-active-background); - --card-label-color: var(--tab-active-color); -} - -html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}summary{cursor: pointer} - -html { - /* always display the vertical scrollbar to avoid jumps when toggling contents */ - overflow-y: scroll; -} -body { background-color: var(--page-background); color: var(--base-6); font: 14px/1.4 Helvetica, Arial, sans-serif; padding-bottom: 45px; } - -a { cursor: pointer; text-decoration: none; } -a:hover { text-decoration: underline; } -abbr[title] { border-bottom: none; cursor: help; text-decoration: none; } - -code, pre { font: 13px/1.5 Consolas, Monaco, Menlo, "Ubuntu Mono", "Liberation Mono", monospace; } - -table, tr, th, td { background: var(--base-0); border-collapse: collapse; vertical-align: top; } -table { background: var(--base-0); border: var(--border); box-shadow: 0px 0px 1px rgba(128, 128, 128, .2); margin: 1em 0; width: 100%; } -table th, table td { border: solid var(--base-2); border-width: 1px 0; padding: 8px 10px; } -table th { background-color: var(--base-2); font-weight: bold; text-align: left; } - -.m-t-5 { margin-top: 5px; } -.hidden-xs-down { display: none; } -.block { display: block; } -.full-width { width: 100%; } -.hidden { display: none; } -.prewrap { white-space: pre-wrap; } -.nowrap { white-space: nowrap; } -.newline { display: block; } -.break-long-words { word-wrap: break-word; overflow-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; min-width: 0; } -.text-small { font-size: 12px !important; } -.text-muted { color: #999; } -.text-bold { font-weight: bold; } -.empty { border: 4px dashed var(--base-2); color: #999; margin: 1em 0; padding: .5em 2em; } - -.status-success { background: rgba(94, 151, 110, 0.3); } -.status-warning { background: rgba(240, 181, 24, 0.3); } -.status-error { background: rgba(176, 65, 62, 0.2); } -.status-success td, .status-warning td, .status-error td { background: transparent; } -tr.status-error td, tr.status-warning td { border-bottom: 1px solid var(--base-2); border-top: 1px solid var(--base-2); } -.status-warning .colored { color: #A46A1F; } -.status-error .colored { color: var(--color-error); } - -.sf-toggle { cursor: pointer; position: relative; } -.sf-toggle-content { -moz-transition: display .25s ease; -webkit-transition: display .25s ease; transition: display .25s ease; } -.sf-toggle-content.sf-toggle-hidden { display: none; } -.sf-toggle-content.sf-toggle-visible { display: block; } -thead.sf-toggle-content.sf-toggle-visible, tbody.sf-toggle-content.sf-toggle-visible { display: table-row-group; } -.sf-toggle-off .icon-close, .sf-toggle-on .icon-open { display: none; } -.sf-toggle-off .icon-open, .sf-toggle-on .icon-close { display: block; } - -.tab-navigation { - background-color: var(--tab-background); - border-radius: 6px; - box-shadow: inset 0 0 0 1px var(--tab-border-color), 0 0 0 5px var(--page-background); - display: inline-flex; - flex-wrap: wrap; - margin: 0 0 15px; - padding: 0; - user-select: none; - -webkit-user-select: none; -} -.sf-tabs-sm .tab-navigation { - box-shadow: inset 0 0 0 1px var(--tab-border-color), 0 0 0 4px var(--page-background); - margin: 0 0 10px; -} -.tab-navigation .tab-control { - background: transparent; - border: 0; - box-shadow: none; - transition: box-shadow .05s ease-in, background-color .05s ease-in; - cursor: pointer; - font-size: 14px; - font-weight: 500; - line-height: 1.4; - margin: 0; - padding: 4px 14px; - position: relative; - text-align: center; - z-index: 1; -} -.sf-tabs-sm .tab-navigation .tab-control { - font-size: 13px; - padding: 2.5px 10px; -} -.tab-navigation .tab-control:before { - background: var(--tab-border-color); - bottom: 15%; - content: ""; - left: 0; - position: absolute; - top: 15%; - width: 1px; -} -.tab-navigation .tab-control:first-child:before, -.tab-navigation .tab-control.active + .tab-control:before, -.tab-navigation .tab-control.active:before { - width: 0; -} -.tab-navigation .tab-control .badge { - background: var(--selected-badge-background); - box-shadow: var(--selected-badge-shadow); - color: var(--selected-badge-color); - display: inline-block; - font-size: 12px; - font-weight: bold; - line-height: 1; - margin-left: 8px; - min-width: 10px; - padding: 2px 6px; - text-align: center; - white-space: nowrap; -} -.tab-navigation .tab-control.disabled { - color: var(--tab-disabled-color); -} -.tab-navigation .tab-control.active { - background-color: var(--tab-active-background); - border-radius: 6px; - box-shadow: inset 0 0 0 1.5px var(--tab-active-border-color); - color: var(--tab-active-color); - position: relative; - z-index: 1; -} -.theme-dark .tab-navigation li.active { - box-shadow: inset 0 0 0 1px var(--tab-border-color); -} -.tab-content > *:first-child { - margin-top: 0; -} -.tab-navigation .tab-control .badge.status-warning { - background: var(--selected-badge-warning-background); - box-shadow: var(--selected-badge-warning-shadow); - color: var(--selected-badge-warning-color); -} -.tab-navigation .tab-control .badge.status-error { - background: var(--selected-badge-danger-background); - box-shadow: var(--selected-badge-danger-shadow); - color: var(--selected-badge-danger-color); -} - -.sf-tabs .tab:not(:first-child) { display: none; } - -[data-filters] { position: relative; } -[data-filtered] { cursor: pointer; } -[data-filtered]:after { content: '\00a0\25BE'; } -[data-filtered]:hover .filter-list li { display: inline-flex; } -[class*="filter-hidden-"] { display: none; } -.filter-list { position: absolute; border: var(--border); box-shadow: var(--shadow); margin: 0; padding: 0; display: flex; flex-direction: column; } -.filter-list :after { content: ''; } -.filter-list li { - background: var(--tab-disabled-background); - border-bottom: var(--border); - color: var(--tab-disabled-color); - display: none; - list-style: none; - margin: 0; - padding: 5px 10px; - text-align: left; - font-weight: normal; -} -.filter-list li.active { - background: var(--tab-background); - color: var(--tab-color); -} -.filter-list li.last-active { - background: var(--tab-active-background); - color: var(--tab-active-color); -} - -.filter-list-level li { cursor: s-resize; } -.filter-list-level li.active { cursor: n-resize; } -.filter-list-level li.last-active { cursor: default; } -.filter-list-level li.last-active:before { content: '\2714\00a0'; } -.filter-list-choice li:before { content: '\2714\00a0'; color: transparent; } -.filter-list-choice li.active:before { color: unset; } - -.container { max-width: 1024px; margin: 0 auto; padding: 0 15px; } -.container::after { content: ""; display: table; clear: both; } - -header { background-color: #222; color: rgba(255, 255, 255, 0.75); font-size: 13px; height: 33px; line-height: 33px; padding: 0; } -header .container { display: flex; justify-content: space-between; } -.logo { flex: 1; font-size: 13px; font-weight: normal; margin: 0; padding: 0; } -.logo svg { height: 18px; width: 18px; opacity: .8; vertical-align: -5px; } - -.help-link { margin-left: 15px; } -.help-link a { color: inherit; } -.help-link .icon svg { height: 15px; width: 15px; opacity: .7; vertical-align: -2px; } -.help-link a:hover { color: #EEE; text-decoration: none; } -.help-link a:hover svg { opacity: .9; } - -.exception-summary { background: var(--background-error); border-bottom: 2px solid rgba(0, 0, 0, 0.1); border-top: 1px solid rgba(0, 0, 0, .3); flex: 0 0 auto; margin-bottom: 15px; } -.exception-metadata { background: rgba(0, 0, 0, 0.1); padding: 7px 0; } -.exception-metadata .container { display: flex; flex-direction: row; justify-content: space-between; } -.exception-metadata h2, .exception-metadata h2 > a { color: rgba(255, 255, 255, 0.8); font-size: 13px; font-weight: 400; margin: 0; } -.exception-http small { font-size: 13px; opacity: .7; } -.exception-hierarchy { flex: 1; } -.exception-hierarchy .icon { margin: 0 3px; opacity: .7; } -.exception-hierarchy .icon svg { height: 13px; width: 13px; vertical-align: -2px; } - -.exception-without-message .exception-message-wrapper { display: none; } -.exception-message-wrapper .container { display: flex; align-items: flex-start; min-height: 70px; padding: 10px 15px 8px; } -.exception-message { flex-grow: 1; } -.exception-message, .exception-message a { color: #FFF; font-size: 21px; font-weight: 400; margin: 0; } -.exception-message.long { font-size: 18px; } -.exception-message a { border-bottom: 1px solid rgba(255, 255, 255, 0.5); font-size: inherit; text-decoration: none; } -.exception-message a:hover { border-bottom-color: #ffffff; } - -.exception-properties-wrapper { margin: .8em 0; } -.exception-properties { background: var(--base-0); border: var(--border); box-shadow: 0px 0px 1px rgba(128, 128, 128, .2); } -.exception-properties pre { margin: 0; padding: 0.2em 0; } - -.exception-illustration { flex-basis: 111px; flex-shrink: 0; height: 66px; margin-left: 15px; opacity: .7; } - -.trace + .trace { margin-top: 30px; } -.trace-head { background-color: var(--base-2); padding: 10px; position: relative; } -.trace-head .trace-class { color: var(--base-6); font-size: 18px; font-weight: bold; line-height: 1.3; margin: 0; position: relative; } -.trace-head .trace-namespace { color: #999; display: block; font-size: 13px; } -.trace-head .icon { position: absolute; right: 0; top: 0; } -.trace-head .icon svg { fill: var(--base-5); height: 24px; width: 24px; } - -.trace-details { background: var(--base-0); border: var(--border); box-shadow: 0px 0px 1px rgba(128, 128, 128, .2); margin: 0 0 1em; table-layout: fixed; } - -.trace-message { font-size: 14px; font-weight: normal; margin: .5em 0 0; } - -.trace-line { position: relative; padding-top: 8px; padding-bottom: 8px; } -.trace-line + .trace-line { border-top: var(--border); } -.trace-line:hover { background: var(--base-1); } -.trace-line a { color: var(--base-6); } -.trace-line .icon { opacity: .4; position: absolute; left: 10px; } -.trace-line .icon svg { fill: var(--base-5); height: 16px; width: 16px; } -.trace-line .icon.icon-copy { left: auto; top: auto; padding-left: 5px; display: none } -.trace-line:hover .icon.icon-copy:not(.hidden) { display: inline-block } -.trace-line-header { padding-left: 36px; padding-right: 10px; } - -.trace-file-path, .trace-file-path a { color: var(--base-6); font-size: 13px; } -.trace-class { color: var(--color-error); } -.trace-type { padding: 0 2px; } -.trace-method { color: var(--color-error); font-weight: bold; } -.trace-arguments { color: #777; font-weight: normal; padding-left: 2px; } - -.trace-code { background: var(--base-0); font-size: 12px; margin: 10px 10px 2px 10px; padding: 10px; overflow-x: auto; white-space: nowrap; } -.trace-code ol { margin: 0; float: left; } -.trace-code li { color: #969896; margin: 0; padding-left: 10px; float: left; width: 100%; } -.trace-code li + li { margin-top: 5px; } -.trace-code li.selected { background: var(--trace-selected-background); margin-top: 2px; } -.trace-code li code { color: var(--base-6); white-space: nowrap; } - -.trace-as-text .stacktrace { line-height: 1.8; margin: 0 0 15px; white-space: pre-wrap; } - -@media (min-width: 575px) { - .hidden-xs-down { display: initial; } - .help-link { margin-left: 30px; } -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/css/exception_full.css b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/css/exception_full.css deleted file mode 100644 index fa77cb324..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/css/exception_full.css +++ /dev/null @@ -1,128 +0,0 @@ -.sf-reset .traces { - padding-bottom: 14px; -} -.sf-reset .traces li { - font-size: 12px; - color: #868686; - padding: 5px 4px; - list-style-type: decimal; - margin-left: 20px; -} -.sf-reset #logs .traces li.error { - font-style: normal; - color: #AA3333; - background: #f9ecec; -} -.sf-reset #logs .traces li.warning { - font-style: normal; - background: #ffcc00; -} -/* fix for Opera not liking empty
  • */ -.sf-reset .traces li:after { - content: "\00A0"; -} -.sf-reset .trace { - border: 1px solid #D3D3D3; - padding: 10px; - overflow: auto; - margin: 10px 0 20px; -} -.sf-reset .block-exception { - -moz-border-radius: 16px; - -webkit-border-radius: 16px; - border-radius: 16px; - margin-bottom: 20px; - background-color: #f6f6f6; - border: 1px solid #dfdfdf; - padding: 30px 28px; - word-wrap: break-word; - overflow: hidden; -} -.sf-reset .block-exception div { - color: #313131; - font-size: 10px; -} -.sf-reset .block-exception-detected .illustration-exception, -.sf-reset .block-exception-detected .text-exception { - float: left; -} -.sf-reset .block-exception-detected .illustration-exception { - width: 152px; -} -.sf-reset .block-exception-detected .text-exception { - width: 670px; - padding: 30px 44px 24px 46px; - position: relative; -} -.sf-reset .text-exception .open-quote, -.sf-reset .text-exception .close-quote { - font-family: Arial, Helvetica, sans-serif; - position: absolute; - color: #C9C9C9; - font-size: 8em; -} -.sf-reset .open-quote { - top: 0; - left: 0; -} -.sf-reset .close-quote { - bottom: -0.5em; - right: 50px; -} -.sf-reset .block-exception p { - font-family: Arial, Helvetica, sans-serif; -} -.sf-reset .block-exception p a, -.sf-reset .block-exception p a:hover { - color: #565656; -} -.sf-reset .logs h2 { - float: left; - width: 654px; -} -.sf-reset .error-count, .sf-reset .support { - float: right; - width: 170px; - text-align: right; -} -.sf-reset .error-count span { - display: inline-block; - background-color: #aacd4e; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; - padding: 4px; - color: white; - margin-right: 2px; - font-size: 11px; - font-weight: bold; -} - -.sf-reset .support a { - display: inline-block; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; - padding: 4px; - color: #000000; - margin-right: 2px; - font-size: 11px; - font-weight: bold; -} - -.sf-reset .toggle { - vertical-align: middle; -} -.sf-reset .linked ul, -.sf-reset .linked li { - display: inline; -} -.sf-reset #output-content { - color: #000; - font-size: 12px; -} -.sf-reset #traces-text pre { - white-space: pre; - font-size: 12px; - font-family: monospace; -} diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/chevron-right.svg b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/chevron-right.svg deleted file mode 100644 index 6837aff18..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/chevron-right.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/favicon.png.base64 b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/favicon.png.base64 deleted file mode 100644 index fb076ed16..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/favicon.png.base64 +++ /dev/null @@ -1 +0,0 @@ -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAgCAYAAAABtRhCAAADVUlEQVRIx82XX0jTURTHLYPyqZdefQx66CEo80+aYpoIkqzUikz6Z5klQoWUWYRIJYEUGpQ+lIr9U5dOTLdCtkmWZis3rbnC5fw/neYW002307mX/cZvP3/7o1PwwOdh95x7vnf39zvnd29AgBer2xO6DclAXiMqZAqxIiNIN/IYSUS2BPhjmGATchUxI+ADWiRhpWK7HKuHFVBFdmU5YvnI4grFGCaReF/EBH4KsZlGgj2JBTuCYBWRIYF8YoEOJ6wBt/gEs7mBbyOjQXruPLSdOgPCiEiPSUUHDoL8Ug5IUo9B/d5wrt+G7OAKNrODPuVdB6vRCIzN6SdBlpW9RIgk/1FeAXabzRlrUPVCS/JhbmwudztnGeeH9AyXBIwtmM3wLinZJZHifjHw2V+NBoRh+9ixQrbgbnaSIcl7cGea6hoXQbNe7za241oeO5Z0p42M4BV2EqP2D50wo+6HzvwC6C4sApNOR8cmOrtcnhtj2kYRyC9eBvXzKrBZrXSs72kFd1t3MoKVbMekQkEnSNKOO8fac3LpmK6l1TlGtsxmsdKFsecPYgwxst0cwROMYDXboSotg0WLBRqjY51jLYcENElXwW2XJKPydvoI2GN9T8rBtrAArYIUruBJXkFheCQYlCpQP6uk5dAQFQNaUROMSGVQFxLmkoQsxDJrhLbTZ+nvVsERME9MgPJRKV/58AsyomTSzE813WLFvWK++qI0xSfQl8k8Pg46sYRuv5t6dS+4RqxDwaa4BGjYH+NTQvKScIp9+YL/hoZh3jDtLRHtt2C3g6bmhX+CpsFBWg7ilDSPgj0lD2ncr5ev/BP8VvyAJhqVyZeUhPOrEhEFxgEtjft846Z/guQTNT89Q5P9flMLoth4F7808wKtWWKzAwNQHxrh/1vaid2F+XpYTSbQf1XA2McOmOpROnvpvMEA4tSjq1cW0sws2gCYxswY6TKkvzYnJq1NHZLnRU4BX+4U0uburvusu8Kv8iHY7qefkM4IFngJHEOUXmLEPgiGsI8YnlZILit3vSSLRTQe/MPIZva5pshNIEmyFQlCvruJKXPkCEfmePzkphXHdzZNQdoRI9KPlBAxlj/I8U97ERPS5bjGbWDFbEdqHVe5caTBeZZx2H/IMvzeN15yoQAAAABJRU5ErkJggg== diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-book.svg b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-book.svg deleted file mode 100644 index 498a74f40..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-book.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square-o.svg b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square-o.svg deleted file mode 100644 index be534ad44..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square-o.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square.svg b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square.svg deleted file mode 100644 index 471c2741c..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square-o.svg b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square-o.svg deleted file mode 100644 index b2593a9fe..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square-o.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square.svg b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square.svg deleted file mode 100644 index 2f5c3b358..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-support.svg b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-support.svg deleted file mode 100644 index 03fd8e767..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/icon-support.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/symfony-ghost.svg.php b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/symfony-ghost.svg.php deleted file mode 100644 index 4b2f9c1b9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/symfony-ghost.svg.php +++ /dev/null @@ -1 +0,0 @@ -addElementToGhost(); ?> diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/symfony-logo.svg b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/symfony-logo.svg deleted file mode 100644 index f10824ae9..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/images/symfony-logo.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/js/exception.js b/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/js/exception.js deleted file mode 100644 index 22ce675df..000000000 --- a/fixtures/symfony_5_local_deps/vendor/symfony/error-handler/Resources/assets/js/exception.js +++ /dev/null @@ -1,304 +0,0 @@ -/* This file is based on WebProfilerBundle/Resources/views/Profiler/base_js.html.twig. - If you make any change in this file, verify the same change is needed in the other file. */ -/* .tab'); - var tabNavigation = document.createElement('div'); - tabNavigation.className = 'tab-navigation'; - tabNavigation.setAttribute('role', 'tablist'); - - var selectedTabId = 'tab-' + i + '-0'; /* select the first tab by default */ - for (var j = 0; j < tabs.length; j++) { - var tabId = 'tab-' + i + '-' + j; - var tabTitle = tabs[j].querySelector('.tab-title').innerHTML; - - var tabNavigationItem = document.createElement('button'); - addClass(tabNavigationItem, 'tab-control'); - tabNavigationItem.setAttribute('data-tab-id', tabId); - tabNavigationItem.setAttribute('role', 'tab'); - tabNavigationItem.setAttribute('aria-controls', tabId); - if (hasClass(tabs[j], 'active')) { selectedTabId = tabId; } - if (hasClass(tabs[j], 'disabled')) { - addClass(tabNavigationItem, 'disabled'); - } - tabNavigationItem.innerHTML = tabTitle; - tabNavigation.appendChild(tabNavigationItem); - - var tabContent = tabs[j].querySelector('.tab-content'); - tabContent.parentElement.setAttribute('id', tabId); - } - - tabGroups[i].insertBefore(tabNavigation, tabGroups[i].firstChild); - addClass(document.querySelector('[data-tab-id="' + selectedTabId + '"]'), 'active'); - } - - /* display the active tab and add the 'click' event listeners */ - for (i = 0; i < tabGroups.length; i++) { - tabNavigation = tabGroups[i].querySelectorAll(':scope > .tab-navigation .tab-control'); - - for (j = 0; j < tabNavigation.length; j++) { - tabId = tabNavigation[j].getAttribute('data-tab-id'); - var tabPanel = document.getElementById(tabId); - tabPanel.setAttribute('role', 'tabpanel'); - tabPanel.setAttribute('aria-labelledby', tabId); - tabPanel.querySelector('.tab-title').className = 'hidden'; - - if (hasClass(tabNavigation[j], 'active')) { - tabPanel.className = 'block'; - tabNavigation[j].setAttribute('aria-selected', 'true'); - tabNavigation[j].removeAttribute('tabindex'); - } else { - tabPanel.className = 'hidden'; - tabNavigation[j].removeAttribute('aria-selected'); - tabNavigation[j].setAttribute('tabindex', '-1'); - } - - tabNavigation[j].addEventListener('click', function(e) { - var activeTab = e.target || e.srcElement; - - /* needed because when the tab contains HTML contents, user can click */ - /* on any of those elements instead of their parent '