-
-
Couldn't load subscription status.
- Fork 5.3k
Lots of automated migrations to Symfony Flex structure #8569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| | ||
| .. code-block:: php-annotations | ||
| // src/AppBundle/Controller/DefaultController.php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to keep such comments? We can probably automatically just strip the AppBundle directory. The new one would be src/Controller/DefaultController.php in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I changed it everywhere, but we're in the components section, we shouldn't talk about framework conventions here. (probably, this needs to be extracted to its own subguide).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, makes sense.
bundles/override.rst Outdated
| Routing is never automatically imported in Symfony. If you want to include | ||
| the routes from any bundle, then they must be manually imported from somewhere | ||
| in your application (e.g. ``app/config/routing.yml``). | ||
| in your application (e.g. ``app/config/routes.yaml``). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config/routes.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted this change, the whole paragraph needs to be rewritten (and thus done in a non-automatic PR).
console.rst Outdated
| | ||
| // tests/AppBundle/Command/CreateUserCommandTest.php | ||
| namespace Tests\AppBundle\Command; | ||
| namespace Tests\App\Command; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App\Tests everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed (every other occurence of this as well)
form/form_dependencies.rst Outdated
| .. code-block:: yaml | ||
| # src/AppBundle/Resources/config/services.yml | ||
| # src/Resources/config/services.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should refer to config/services.yaml? same for other formats.
| // ... | ||
| $kernel = new AppKernel('prod', false); | ||
| $kernel = new Kernel('prod', false); | ||
| $kernel->loadClassCache(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is obsolete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted, all front controller and kernel changes should be done manually.
| .. code-block:: yaml | ||
| # app/config/services.yml | ||
| # app/config/services.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config/* everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done for all services and routes files, the remaining onces need all be visited manually.
deployment/azure-website.rst Outdated
| The code of the Symfony application has now been deployed to the Azure Website | ||
| which you can browse from the file explorer of the Kudu application. You should | ||
| see the ``app/``, ``src/`` and ``web/`` directories under your ``site/wwwroot`` | ||
| see the ``app/``, ``src/`` and ``public/`` directories under your ``site/wwwroot`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"see the ``config/``, ..."
| {# templates/static/about.html.twig #} | ||
| {# you can use a controller reference #} | ||
| {{ render_esi(controller('AppBundle:News:latest', { 'maxPerPage': 5 })) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App\Controller\NewsController::latestAction use FQNC notation everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change that in a manual PR as well (not so easy to automate)
security/csrf_in_login_form.rst Outdated
| .. code-block:: html+twig | ||
| | ||
| {# src/AppBundle/Resources/views/Security/login.html.twig #} | ||
| {# src/Resources/views/Security/login.html.twig #} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this templates should be moved to templates/?
| | ||
| // src/AppBundle/AppBundle.php | ||
| // src/AppBundle.php | ||
| namespace AppBundle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both lines should be updated, probably this code lives now in Kernel.php.
| Thanks a lot for your detailed review @yceruto ! I've now fixed everything or reverted the change as they have to be done in another PR (to not make this too big and hard to merge). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
service_container.rst Outdated
| | ||
| .. _`service-oriented architecture`: https://en.wikipedia.org/wiki/Service-oriented_architecture | ||
| .. _`Symfony Standard Edition (version 3.3) services.yaml`: https://github.com/symfony/symfony-standard/blob/3.3/app/config/services.yaml | ||
| .. _`Symfony Standard Edition (version 3.3) services.yaml`: https://github.com/symfony/symfony-standard/blob/3.3/config/services.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be reverted or referenced to the recipe instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
7064286 to 57baceb Compare | Applied the comment and also fixed the build |
| | ||
| use App\DependencyInjection\Security\Factory\WsseFactory; | ||
| use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
| use Symfony\Component\DependencyInjection\ContainerBuilder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add use Symfony\Component\HttpKernel\Kernel as BaseKernel?
| YES, awesome! Thank you Wouter! Thanks to the review from @yceruto, I'm happy to merge this quickly. If we find any bugs, we can make sure to automate those "fixes" across everything. So I think merging this right now is a great idea :) |
…(wouterj) This PR was squashed before being merged into the master branch (closes #8569). Discussion ---------- Lots of automated migrations to Symfony Flex structure Almost all of these changes need a check if the paragraphs surrounding the code block still make sense, but at least, it is a start. I skipped the Best Pratices and Create Your Own Framework guides. Both of these need to be completely revisited. Also, lots of other (configuration, bundles, controller and services) guides need to be checked carefully. Please review and merge quickly @symfony/team-symfony-docs Commits ------- 57baceb Fixed build failures 6853f61 Some manual tweaks to the automated migrations 9e5cd17 Lots of automated migrations to Symfony Flex structure
Almost all of these changes need a check if the paragraphs surrounding the code block still make sense, but at least, it is a start.
I skipped the Best Pratices and Create Your Own Framework guides. Both of these need to be completely revisited.
Also, lots of other (configuration, bundles, controller and services) guides need to be checked carefully.
Please review and merge quickly @symfony/team-symfony-docs