Skip to content

Commit cf5e12d

Browse files
committed
minor #1291 Add various comments in the codebase (Antoine Makdessi, 94noni)
This PR was merged into the main branch. Discussion ---------- Add various comments in the codebase Add some comments while reading some source code Ref https://symfony.com/doc/current/setup.html#the-symfony-demo-application Commits ------- f632ba7 Composer v2.2 1f1e6b9 Add various comments in the codebase
2 parents 43404e8 + f632ba7 commit cf5e12d

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@
6565
"preferred-install": {
6666
"*": "dist"
6767
},
68-
"sort-packages": true
68+
"sort-packages": true,
69+
"allow-plugins": {
70+
"composer/package-versions-deprecated": true,
71+
"symfony/flex": true,
72+
"symfony/runtime": true
73+
}
6974
},
7075
"autoload": {
7176
"psr-4": {

src/Controller/Admin/BlogController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* purposes. However, in your real Symfony application you should use any of the
3131
* existing bundles that let you generate ready-to-use backends without effort.
3232
*
33-
* See http://knpbundles.com/keyword/admin
33+
* See https://symfony.com/bundles/EasyAdminBundle/current/index.html
3434
*
3535
* @author Ryan Weaver <[email protected]>
3636
* @author Javier Eguiluz <[email protected]>

src/Controller/BlogController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ public function postShow(Post $post): Response
8181
// have enabled the DebugBundle. Uncomment the following line to see it in action:
8282
//
8383
// dump($post, $this->getUser(), new \DateTime());
84+
//
85+
// The result will be displayed either in the Symfony Profiler or in the stream output.
86+
// See https://symfony.com/doc/current/profiler.html
87+
// See https://symfony.com/doc/current/templates.html#the-dump-twig-utilities
88+
//
89+
// You can also leverage Symfony's 'dd()' function that dump and
90+
// stop the execution
8491

8592
return $this->render('blog/post_show.html.twig', ['post' => $post]);
8693
}

src/Security/PostVoter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class PostVoter extends Voter
3737
*/
3838
protected function supports(string $attribute, $subject): bool
3939
{
40-
// this voter is only executed for three specific permissions on Post objects
40+
// this voter is only executed on Post objects and for three specific permissions
4141
return $subject instanceof Post && \in_array($attribute, [self::SHOW, self::EDIT, self::DELETE], true);
4242
}
4343

src/Utils/Validator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/**
1818
* This class is used to provide an example of integrating simple classes as
1919
* services into a Symfony application.
20+
* See https://symfony.com/doc/current/service_container.html#creating-configuring-services-in-the-container
2021
*
2122
* @author Javier Eguiluz <[email protected]>
2223
*/

0 commit comments

Comments
 (0)