Migrate Twig namespace registration to Symfony 7+ auto-discovery#6
Merged
Migrate Twig namespace registration to Symfony 7+ auto-discovery#6
Conversation
- Move templates from src/Resources/views/ to templates/ directory - Delete GraphpinatorExtension.php (no longer needed) - Simplify GraphpinatorBundle to only include getPath() method - Update tests to reflect new structure - Add TwigBundle as dev dependency - Add TwigNamespaceTest integration test Co-authored-by: peldax <10790033+peldax@users.noreply.github.com>
- Make kernel property nullable for safer tearDown - Add null check in tearDown before accessing kernel - Add scandir error handling - Use @ operator for unlink/rmdir to suppress warnings Co-authored-by: peldax <10790033+peldax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor Twig namespace registration for Symfony 7+
Migrate Twig namespace registration to Symfony 7+ auto-discovery
Jan 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bundle's manual Twig namespace registration via
PrependExtensionInterfacefails in Symfony 7.3+/8.0 with "There are no registered paths for namespace 'Graphpinator'". Symfony 7+ automatically discovers bundle templates when usingAbstractBundlewith proper directory structure.Changes
Template structure modernization
src/Resources/views/*.twig→templates/*.twigsrc/Resources/directoryBundle simplification
getContainerExtension()override inGraphpinatorBundlesrc/DependencyInjection/GraphpinatorExtension.php(35 lines)getPath()method returning\dirname(__DIR__)Test updates
GraphpinatorExtensionTest.php(tested deleted code)GraphpinatorBundleTest.php(remove extension tests)tests/Integration/TwigNamespaceTest.phpverifying namespace auto-registrationDependencies
symfony/twig-bundle: ^7.3 || ^8.0to dev requirementsHow it works
Symfony 7+ calls
getPath(), findstemplates/at that location, and registers@Graphpinatornamespace without configuration. Controllers using@Graphpinator/ui.html.twigwork unchanged.Net: -127 lines, +150 lines (mostly comprehensive integration test)
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/OndraM/ci-detector/zipball/8b0223b5ed235fd377c75fdd1bfcad05c0f168b8/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0525c73950de35ded110cffafb9892946d7771b5/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/845eb62303d2ca9b289ef216356568ccc075ffd1/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/colinodell/json5/zipball/5724d21bc5c910c2560af1b8915f0cc0163579c8/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/graphpql/graphpinator-common/zipball/fbe087fb00cdd023b3c584cd6bf403c77d0fd5be/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/graphpql/graphpinator-constraint-directives/zipball/26a479c702a2b2a29893bc2af04ef5ba3aa51cdc/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/graphpql/graphpinator-parser/zipball/95f03d4ca204e769f31e5c0a50a4bc246848386e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/graphpql/graphpinator-persisted-queries/zipball/97470e281d396d925105ce07e63f21d2a1771213/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/graphpql/graphpinator-printer/zipball/99450230e8e09c0e9176d08222541fe62e607f44/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/graphpql/graphpinator-source/zipball/657532e333ca5b567611c1e12581f563544c15f1/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/graphpql/graphpinator-tokenizer/zipball/315ebecf3aa6199960883e36e7d9b49011a9e611/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/graphpql/graphpinator-upload/zipball/e88aad18c0843192e6240de5e48cb8ebe8916277/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/graphpql/graphpinator/zipball/e8283f02aef82e8673f10029e20611ee6923e2e0/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/graphpql/utils/zipball/88d67d3f86013d9a1e1694f21444235e489af005/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/infection/abstract-testframework-adapter/zipball/18925e20d15d1a5995bb85c9dc09e8751e1e069b/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/infection/extension-installer/zipball/9b351d2910b9a23ab4815542e93d541e0ca0cdcf/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/infection/include-interceptor/zipball/0cc76d95a79d9832d74e74492b0a30139904bdf7/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/infection/infection/zipball/feea2a48a8aeedd3a4d2105167b41a46f0e568a3/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/infection/mutator/zipball/3c976d721b02b32f851ee4e15d553ef1e9186d1d/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/jsonrainbow/json-schema/zipball/2eeb75d21cf73211335888e7f5e6fd7440723ec7/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/marc-mabe/php-enum/zipball/bb426fcdd65c60fb3638ef741e8782508fda7eef/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/phpstan/phpdoc-parser/zipball/16dbf9937da8d4528ceb2145c9c7c0bd29e26374/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/468e02c9176891cc901143da118f09dc9505fc2f/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/d6211c46213d4181054b3d77b10a5c5cb0d59538/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/phpstan/phpstan-symfony/zipball/24d8c157aa483141b0579d705ef0aac9e1b95436/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/phpstan/phpstan/zipball/9e800e6bee7d5bd02784d4c6069b48032d16224f/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sanmai/later/zipball/72a82d783864bca90412d8a26c1878f8981fee97/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sanmai/pipeline/zipball/fb8d0c23b4ef085315a36d397fafa052203020ce/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/comparator/zipball/e8e53097718d2b53cfb2aa859b06a41abf58c62e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/exporter/zipball/0735b90f4da94969541dac1da743446e276defa6/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f2e26f52f80ef77832e359205f216eeac00e320c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/47e34210757a2f37a97dcd207d032e1b01e64c7a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/shipmonk-rnd/composer-dependency-analyser/zipball/975e5873b519d5180b1017a5dfb43d80781abd45/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/slevomat/coding-standard/zipball/d247cdc04b91956bdcfaa0b1313c01960b189d3c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/cache-contracts/zipball/5d68a57d66910405e5c0b63d6f0af941e66fc868/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/cache/zipball/fae016390a2e6b451abc0f4805cbfe0bf70f437f/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/config/zipball/800ce889e358a53a9678b3212b0c8cecd8c6aace/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/console/zipball/732a9ca6cd9dfd940c639062d5edbde2f6727fb6/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/dependency-injection/zipball/54122901b6d772e94f1e71a75e0533bc16563499/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/error-handler/zipball/48be2b0653594eea32dcef130cca1c811dcf25c2/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/event-dispatcher/zipball/9dddcddff1ef974ad87b3708e4b442dc38b2261d/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/filesystem/zipball/d551b38811096d0be9c4691d406991b47c0c630a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/finder/zipball/fffe05569336549b20a1be64250b40516d6e8d06/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/framework-bundle/zipball/df908e8f9e5f6cc3c9e0d0172e030a5c1c280582/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/http-foundation/zipball/a70c745d4cea48dbd609f4075e5f5cbce453bd52/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/http-kernel/zipball/885211d4bed3f857b8c964011923528a55702aa5/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/polyfill-php85/zipball/d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/process/zipball/2f8e1a6cdf590ca63715da4d3a7a3327404a523f/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/routing/zipball/5d3fd7adf8896c2fdb54e2f0f35b1bcbd9e45090/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/string/zipball/d50e862cb0a0e0886f73ca1f31b865efbb795003/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/var-dumper/zipball/7e99bebcb3f90d8721890f2963463280848cba92/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/var-exporter/zipball/03a60f169c79a28513a78c967316fbc8bf17816f/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/thecodingmachine/phpstan-safe-rule/zipball/5c804889253ce9498ef185e108e9f94b6023208e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/thecodingmachine/safe/zipball/2cdd579eeaa2e78e51c7509b50cc9fb89a956236/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/webthinx/codestyle/zipball/61f5b3acfae64db179211625e7d7bf6c2b8ece59/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/duVawZ /usr/bin/composer install --no-interaction(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Problem
The current Twig namespace registration approach using
Resources/views/with Extension/Compiler Pass is not working correctly in Symfony 7.3+/8.0. The error persists:Solution
Refactor to use the modern Symfony 7+ approach with
templates/directory structure, which is automatically recognized byAbstractBundlewithout requiring manual registration.Changes Required
1. Move template files
Move templates from old structure to new:
src/Resources/views/ui.html.twig→templates/ui.html.twigsrc/Resources/views/schema.html.twig→templates/schema.html.twig2. Delete unnecessary files
Remove the Extension class that is no longer needed:
src/DependencyInjection/GraphpinatorExtension.php3. Simplify GraphpinatorBundle
Update
src/GraphpinatorBundle.phpto only includegetPath()method:Symfony 7+ automatically discovers templates in the
templates/directory at the bundle root whengetPath()is defined.4. Add integration test
Create
tests/Integration/TwigNamespaceTest.phpto verify Twig namespace registration: