mirror of
https://github.com/symfony/demo.git
synced 2026-03-24 00:02:32 +01:00
Always use https:// when linking to symfony.com
This commit is contained in:
@@ -4,4 +4,4 @@ Contributing
|
||||
The Symfony Demo application is an open source project. Contributions made by
|
||||
the community are welcome. Send us your ideas, code reviews, pull requests and
|
||||
feature requests to help us improve this project. All contributions must follow
|
||||
the [usual Symfony contribution requirements](http://symfony.com/doc/current/contributing/index.html).
|
||||
the [usual Symfony contribution requirements](https://symfony.com/doc/current/contributing/index.html).
|
||||
|
||||
@@ -11,7 +11,7 @@ Requirements
|
||||
|
||||
* PHP 5.5.9 or higher;
|
||||
* PDO-SQLite PHP extension enabled;
|
||||
* and the [usual Symfony application requirements](http://symfony.com/doc/current/reference/requirements.html).
|
||||
* and the [usual Symfony application requirements](https://symfony.com/doc/current/reference/requirements.html).
|
||||
|
||||
If unsure about meeting these requirements, download the demo application and
|
||||
browse the `http://localhost:8000/config.php` script to get more detailed
|
||||
@@ -66,7 +66,7 @@ terminal.
|
||||
> If you want to use a fully-featured web server (like Nginx or Apache) to run
|
||||
> Symfony Demo application, configure it to point at the `web/` directory of the project.
|
||||
> For more details, see:
|
||||
> http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html
|
||||
> https://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
In case you need it, you can also hook into the internal exception handling
|
||||
made by Symfony. This allows you to perform advanced tasks and even recover
|
||||
your application from some errors.
|
||||
See http://symfony.com/doc/current/cookbook/controller/error_pages.html
|
||||
See https://symfony.com/doc/current/cookbook/controller/error_pages.html
|
||||
#}
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
In case you need it, you can also hook into the internal exception handling
|
||||
made by Symfony. This allows you to perform advanced tasks and even recover
|
||||
your application from some errors.
|
||||
See http://symfony.com/doc/current/cookbook/controller/error_pages.html
|
||||
See https://symfony.com/doc/current/cookbook/controller/error_pages.html
|
||||
#}
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
In case you need it, you can also hook into the internal exception handling
|
||||
made by Symfony. This allows you to perform advanced tasks and even recover
|
||||
your application from some errors.
|
||||
See http://symfony.com/doc/current/cookbook/controller/error_pages.html
|
||||
See https://symfony.com/doc/current/cookbook/controller/error_pages.html
|
||||
#}
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
In case you need it, you can also hook into the internal exception handling
|
||||
made by Symfony. This allows you to perform advanced tasks and even recover
|
||||
your application from some errors.
|
||||
See http://symfony.com/doc/current/cookbook/controller/error_pages.html
|
||||
See https://symfony.com/doc/current/cookbook/controller/error_pages.html
|
||||
#}
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Per a més informació, consulta la <a href="http://symfony.com/doc">documentació de Symfony</a>.]]></target>
|
||||
<target><![CDATA[Per a més informació, consulta la <a href="https://symfony.com/doc">documentació de Symfony</a>.]]></target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Pro více informací přejděte do <a href="http://symfony.com/doc">Symfony dokumentace</a>.]]></target>
|
||||
<target><![CDATA[Pro více informací přejděte do <a href="https://symfony.com/doc">Symfony dokumentace</a>.]]></target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Für mehr Informationen schaue in die offizielle <a href="http://symfony.com/doc">Symfony Dokumentation</a>.]]></target>
|
||||
<target><![CDATA[Für mehr Informationen schaue in die offizielle <a href="https://symfony.com/doc">Symfony Dokumentation</a>.]]></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="action.show_post">
|
||||
<source>action.show_post</source>
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[For more information, check out the <a href="http://symfony.com/doc">Symfony doc</a>.]]></target>
|
||||
<target><![CDATA[For more information, check out the <a href="https://symfony.com/doc">Symfony doc</a>.]]></target>
|
||||
</trans-unit>
|
||||
|
||||
<trans-unit id="rss.title">
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Para más información, consulta la <a href="http://symfony.com/doc">documentación de Symfony</a>.]]></target>
|
||||
<target><![CDATA[Para más información, consulta la <a href="https://symfony.com/doc">documentación de Symfony</a>.]]></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="action.show_post">
|
||||
<source>action.show_post</source>
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Pour plus d'informations, consultez la <a href="http://symfony.com/doc">documentation de Symfony</a>.]]></target>
|
||||
<target><![CDATA[Pour plus d'informations, consultez la <a href="https://symfony.com/doc">documentation de Symfony</a>.]]></target>
|
||||
</trans-unit>
|
||||
|
||||
<trans-unit id="rss.title">
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Za više informacija, provjerite <a href="http://symfony.com/doc">Symfony dokumentaciju</a>.]]></target>
|
||||
<target><![CDATA[Za više informacija, provjerite <a href="https://symfony.com/doc">Symfony dokumentaciju</a>.]]></target>
|
||||
</trans-unit>
|
||||
|
||||
<trans-unit id="rss.title">
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Informasi selengkapnya, kunjungi <a href="http://symfony.com/doc">Symfony doc</a>.]]></target>
|
||||
<target><![CDATA[Informasi selengkapnya, kunjungi <a href="https://symfony.com/doc">Symfony doc</a>.]]></target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Per altre informazioni, visita la <a href="http://symfony.com/doc">documentazione di Symfony</a>.]]></target>
|
||||
<target><![CDATA[Per altre informazioni, visita la <a href="https://symfony.com/doc">documentazione di Symfony</a>.]]></target>
|
||||
</trans-unit>
|
||||
|
||||
<trans-unit id="rss.title">
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[さらに詳しく知りたい場合は, <a href="http://symfony.com/doc">Symfony doc</a>を参照してください。]]></target>
|
||||
<target><![CDATA[さらに詳しく知りたい場合は, <a href="https://symfony.com/doc">Symfony doc</a>を参照してください。]]></target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Voor meer informatie bekijk de <a href="http://symfony.com/doc">Symfony documentatie</a>.]]></target>
|
||||
<target><![CDATA[Voor meer informatie bekijk de <a href="https://symfony.com/doc">Symfony documentatie</a>.]]></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="delete_post_modal.title">
|
||||
<source>delete_post_modal.title</source>
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Sprawdź <a href="http://symfony.com/doc">dokumentację Symfony</a>, aby uzyskać więcej informacji.]]></target>
|
||||
<target><![CDATA[Sprawdź <a href="https://symfony.com/doc">dokumentację Symfony</a>, aby uzyskać więcej informacji.]]></target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Para mais informações, visite a <a href="http://symfony.com/doc">documentação do Symfony</a>.]]></target>
|
||||
<target><![CDATA[Para mais informações, visite a <a href="https://symfony.com/doc">documentação do Symfony</a>.]]></target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Pentru mai multe informaţii, citeşte <a href="http://symfony.com/doc">documentaţia Symfony</a>.]]></target>
|
||||
<target><![CDATA[Pentru mai multe informaţii, citeşte <a href="https://symfony.com/doc">documentaţia Symfony</a>.]]></target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Для дополнительной информации обратитесь к <a href="http://symfony.com/doc">Symfony документации</a>.]]></target>
|
||||
<target><![CDATA[Для дополнительной информации обратитесь к <a href="https://symfony.com/doc">Symfony документации</a>.]]></target>
|
||||
</trans-unit>
|
||||
|
||||
<trans-unit id="rss.title">
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Za več informacij poglejte <a href="http://symfony.com/doc">dokumentacijo Symfony</a>.]]></target>
|
||||
<target><![CDATA[Za več informacij poglejte <a href="https://symfony.com/doc">dokumentacijo Symfony</a>.]]></target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="help.more_information">
|
||||
<source>help.more_information</source>
|
||||
<target><![CDATA[Для додаткової інформації зверніться до <a href="http://symfony.com/doc">Symfony документації</a>.]]></target>
|
||||
<target><![CDATA[Для додаткової інформації зверніться до <a href="https://symfony.com/doc">Symfony документації</a>.]]></target>
|
||||
</trans-unit>
|
||||
|
||||
<trans-unit id="rss.title">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
to the global layout, we inherit from it to just change the contents of some
|
||||
blocks. In practice, backend templates are using a three-level inheritance,
|
||||
showing how powerful, yet easy to use, is Twig's inheritance mechanism.
|
||||
See http://symfony.com/doc/current/book/templating.html#template-inheritance-and-layouts
|
||||
See https://symfony.com/doc/current/book/templating.html#template-inheritance-and-layouts
|
||||
#}
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{#
|
||||
This is the base template used as the application layout which contains the
|
||||
common elements and decorates all the other templates.
|
||||
See http://symfony.com/doc/current/book/templating.html#template-inheritance-and-layouts
|
||||
See https://symfony.com/doc/current/book/templating.html#template-inheritance-and-layouts
|
||||
#}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app.request.locale }}">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
his/her credentials (login + password) during this session. If he/she
|
||||
is automatically logged via the 'Remember Me' functionality, he/she won't
|
||||
be able to add a comment.
|
||||
See http://symfony.com/doc/current/cookbook/security/remember_me.html#forcing-the-user-to-re-authenticate-before-accessing-certain-resources
|
||||
See https://symfony.com/doc/current/cookbook/security/remember_me.html#forcing-the-user-to-re-authenticate-before-accessing-certain-resources
|
||||
#}
|
||||
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
|
||||
{{ render(controller('AppBundle:Blog:commentForm', {'id': post.id})) }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{#
|
||||
This is a template fragment designed to be included in other templates
|
||||
See http://symfony.com/doc/current/book/templating.html#including-other-templates
|
||||
See https://symfony.com/doc/current/book/templating.html#including-other-templates
|
||||
|
||||
A common practice to better distinguish between templates and fragments is to
|
||||
prefix fragments with an underscore. That's why this template is called
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
and the suffix "_widget". This can be controlled by overriding getBlockPrefix()
|
||||
in DateTimePickerType.
|
||||
|
||||
See http://symfony.com/doc/current/cookbook/form/create_custom_field_type.html#creating-a-template-for-the-field
|
||||
See https://symfony.com/doc/current/cookbook/form/create_custom_field_type.html#creating-a-template-for-the-field
|
||||
#}
|
||||
|
||||
{% block date_time_picker_widget %}
|
||||
|
||||
@@ -11,7 +11,7 @@ imports:
|
||||
|
||||
# These are the configuration parameters that define the application's behavior
|
||||
# and which are independent from the underlying technical infrastructure
|
||||
# See http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
|
||||
# See https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
|
||||
parameters:
|
||||
# This parameter defines the codes of the locales (languages) enabled in the application
|
||||
app_locales: en|fr|de|es|cs|nl|ru|uk|ro|pt_BR|pl|it|ja|id|ca|sl|hr
|
||||
@@ -23,12 +23,12 @@ framework:
|
||||
# into clickable links that open the given file using your favorite IDE.
|
||||
# Supported values are 'phpstorm', 'sublime', 'textmate', 'macvim' and 'emacs'.
|
||||
# When 'ide' is set to null the file is opened in your web browser.
|
||||
# See http://symfony.com/doc/current/reference/configuration/framework.html#ide
|
||||
# See https://symfony.com/doc/current/reference/configuration/framework.html#ide
|
||||
ide: ~
|
||||
|
||||
# When using the HTTP Cache, ESI allows to render page fragments separately
|
||||
# and with different cache configurations for each fragment
|
||||
# http://symfony.com/doc/current/book/http_cache.html#edge-side-includes
|
||||
# https://symfony.com/doc/current/book/http_cache.html#edge-side-includes
|
||||
esi: { enabled: true }
|
||||
translator: { fallback: "%locale%" }
|
||||
secret: "%env(SYMFONY_SECRET)%"
|
||||
|
||||
@@ -24,7 +24,7 @@ doctrine:
|
||||
path: "%kernel.root_dir%/../var/data/blog_test.sqlite"
|
||||
|
||||
# this configuration simplifies testing URLs protected by the security mechanism
|
||||
# See http://symfony.com/doc/current/cookbook/testing/http_authentication.html
|
||||
# See https://symfony.com/doc/current/cookbook/testing/http_authentication.html
|
||||
security:
|
||||
firewalls:
|
||||
secured_area:
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# This file defines the canonical configuration parameters of the application.
|
||||
# Symfony uses this file as a template to generate the real app/config/parameters.yml
|
||||
# used by the application.
|
||||
# See http://symfony.com/doc/current/best_practices/configuration.html#canonical-parameters
|
||||
# See https://symfony.com/doc/current/best_practices/configuration.html#canonical-parameters
|
||||
parameters:
|
||||
# The code of the default language used by the application ('en' = English)
|
||||
locale: en
|
||||
|
||||
# The 'secret' value is a random string of characters used by Symfony to
|
||||
# to add more entropy to security related operations.
|
||||
# see: http://symfony.com/doc/current/reference/configuration/framework.html#secret
|
||||
# see: https://symfony.com/doc/current/reference/configuration/framework.html#secret
|
||||
env(SYMFONY_SECRET): 'secret_value_for_symfony_demo_application'
|
||||
|
||||
# Destination for log files; can also be "php://stderr" etc
|
||||
@@ -32,7 +32,7 @@ parameters:
|
||||
# $ php bin/console doctrine:fixtures:load
|
||||
|
||||
# If you don't use a real mail server, you can send emails via your Gmail account.
|
||||
# see http://symfony.com/doc/current/cookbook/email/gmail.html
|
||||
# see https://symfony.com/doc/current/cookbook/email/gmail.html
|
||||
mailer_transport: smtp
|
||||
mailer_host: 127.0.0.1
|
||||
mailer_user: ~
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# are loaded recursively, so you can separate them into subdirectories.
|
||||
# If you don't like to add annotations in your applications, you can also define
|
||||
# the routes in YAML, XML or PHP files.
|
||||
# See http://symfony.com/doc/current/book/routing.html
|
||||
# See https://symfony.com/doc/current/book/routing.html
|
||||
app:
|
||||
resource: '@AppBundle/Controller/'
|
||||
type: annotation
|
||||
@@ -16,7 +16,7 @@ app:
|
||||
# These lines define a route using YAML configuration. The controller used by
|
||||
# the route (FrameworkBundle:Template:template) is a convenient shortcut when
|
||||
# the template can be rendered without executing any logic in your own controller.
|
||||
# See http://symfony.com/doc/current/cookbook/templating/render_without_controller.html
|
||||
# See https://symfony.com/doc/current/cookbook/templating/render_without_controller.html
|
||||
homepage:
|
||||
path: /{_locale}
|
||||
requirements:
|
||||
|
||||
@@ -11,7 +11,7 @@ _profiler:
|
||||
# this imports the route used to test error pages. Just browse the following URL:
|
||||
# /{_locale}/_error/{status_code}.{format}
|
||||
# (e.g. /en/_error/404, /en/_error/403.json, /fr/_error/500.xml)
|
||||
# See http://symfony.com/doc/current/cookbook/controller/error_pages.html#testing-error-pages-during-development
|
||||
# See https://symfony.com/doc/current/cookbook/controller/error_pages.html#testing-error-pages-during-development
|
||||
_errors:
|
||||
resource: "@TwigBundle/Resources/config/routing/errors.xml"
|
||||
prefix: /{_locale}/_error
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
security:
|
||||
encoders:
|
||||
# Our user class and the algorithm we'll use to encode passwords
|
||||
# http://symfony.com/doc/current/security.html#c-encoding-the-user-s-password
|
||||
# https://symfony.com/doc/current/security.html#c-encoding-the-user-s-password
|
||||
AppBundle\Entity\User: bcrypt
|
||||
|
||||
providers:
|
||||
# http://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
|
||||
# https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
|
||||
# In this example, users are stored via Doctrine in the database
|
||||
# To see the users at src/AppBundle/DataFixtures/ORM/LoadFixtures.php
|
||||
# To load users from somewhere else: http://symfony.com/doc/current/security/custom_provider.html
|
||||
# To load users from somewhere else: https://symfony.com/doc/current/security/custom_provider.html
|
||||
database_users:
|
||||
entity: { class: AppBundle:User, property: username }
|
||||
|
||||
# http://symfony.com/doc/current/security.html#initial-security-yml-setup-authentication
|
||||
# https://symfony.com/doc/current/security.html#initial-security-yml-setup-authentication
|
||||
firewalls:
|
||||
secured_area:
|
||||
# this firewall applies to all URLs
|
||||
@@ -23,7 +23,7 @@ security:
|
||||
anonymous: true
|
||||
|
||||
# This allows the user to login by submitting a username and password
|
||||
# Reference: http://symfony.com/doc/current/security/form_login_setup.html
|
||||
# Reference: https://symfony.com/doc/current/security/form_login_setup.html
|
||||
form_login:
|
||||
# The route name that the login form submits to
|
||||
check_path: security_login
|
||||
@@ -31,7 +31,7 @@ security:
|
||||
# When the user tries to access a protected page, they are redirected here
|
||||
login_path: security_login
|
||||
# Secure the login form against CSRF
|
||||
# Reference: http://symfony.com/doc/current/security/csrf_in_login_form.html
|
||||
# Reference: https://symfony.com/doc/current/security/csrf_in_login_form.html
|
||||
csrf_token_generator: security.csrf.token_manager
|
||||
# The page users are redirect to when there is no previous page stored in the
|
||||
# session (for example when the users access directly to the login page).
|
||||
|
||||
@@ -24,7 +24,7 @@ services:
|
||||
|
||||
# Defining a form type as a service is only required when the form type
|
||||
# needs to use some other services, such as the entity manager.
|
||||
# See http://symfony.com/doc/current/best_practices/forms.html
|
||||
# See https://symfony.com/doc/current/best_practices/forms.html
|
||||
app.form.type.tagsinput:
|
||||
class: AppBundle\Form\Type\TagsInputType
|
||||
arguments: ['@doctrine.orm.entity_manager']
|
||||
@@ -33,7 +33,7 @@ services:
|
||||
|
||||
# Event Listeners are classes that listen to one or more specific events.
|
||||
# Those events are defined in the tags added to the service definition.
|
||||
# See http://symfony.com/doc/current/event_dispatcher.html#creating-an-event-listener
|
||||
# See https://symfony.com/doc/current/event_dispatcher.html#creating-an-event-listener
|
||||
app.redirect_to_preferred_locale_listener:
|
||||
class: AppBundle\EventListener\RedirectToPreferredLocaleListener
|
||||
arguments: ['@router', '%app_locales%', '%locale%']
|
||||
@@ -51,7 +51,7 @@ services:
|
||||
# Event subscribers are similar to event listeners but they don't need service tags.
|
||||
# Instead, the PHP class of the event subscriber includes a method that returns
|
||||
# the list of events listened by that class.
|
||||
# See http://symfony.com/doc/current/event_dispatcher.html#creating-an-event-subscriber
|
||||
# See https://symfony.com/doc/current/event_dispatcher.html#creating-an-event-subscriber
|
||||
app.requirements_subscriber:
|
||||
class: AppBundle\EventListener\CheckRequirementsSubscriber
|
||||
arguments: ['@doctrine.orm.entity_manager']
|
||||
@@ -59,7 +59,7 @@ services:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
# To inject the voter into the security layer, you must declare it as a service and tag it with security.voter.
|
||||
# See http://symfony.com/doc/current/security/voters.html#configuring-the-voter
|
||||
# See https://symfony.com/doc/current/security/voters.html#configuring-the-voter
|
||||
app.post_voter:
|
||||
class: AppBundle\Security\PostVoter
|
||||
public: false
|
||||
|
||||
@@ -6,7 +6,7 @@ use Symfony\Component\Console\Input\ArgvInput;
|
||||
use Symfony\Component\Debug\Debug;
|
||||
|
||||
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
|
||||
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
||||
// read https://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
||||
//umask(0000);
|
||||
|
||||
set_time_limit(0);
|
||||
|
||||
@@ -21,11 +21,11 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
*
|
||||
* * Reusable Bundles: they are meant to be shared between different applications.
|
||||
* A lot of them are even publicly available in sites like packagist.org.
|
||||
* See http://symfony.com/doc/current/cookbook/bundles/best_practices.html
|
||||
* See https://symfony.com/doc/current/cookbook/bundles/best_practices.html
|
||||
* * Application bundles: they are never shared, not even with other of your
|
||||
* applications. This allows them to be less strict in some conventions and
|
||||
* their code is usually simpler.
|
||||
* See http://symfony.com/doc/current/best_practices/business-logic.html
|
||||
* See https://symfony.com/doc/current/best_practices/business-logic.html
|
||||
*
|
||||
* The AppBundle is an application bundle that is already created when you install
|
||||
* Symfony. Using AppBundle to start developing your Symfony application is
|
||||
|
||||
@@ -32,7 +32,7 @@ use Symfony\Component\Console\Question\Question;
|
||||
*
|
||||
* $ php bin/console app:add-user -vv
|
||||
*
|
||||
* See http://symfony.com/doc/current/cookbook/console/console_command.html
|
||||
* See https://symfony.com/doc/current/cookbook/console/console_command.html
|
||||
* For more advanced uses, commands can be defined as services too. See
|
||||
* https://symfony.com/doc/current/console/commands_as_services.html
|
||||
*
|
||||
@@ -59,7 +59,7 @@ class AddUserCommand extends ContainerAwareCommand
|
||||
->setDescription('Creates users and stores them in the database')
|
||||
->setHelp($this->getCommandHelp())
|
||||
// commands can optionally define arguments and/or options (mandatory and optional)
|
||||
// see http://symfony.com/doc/current/components/console/console_arguments.html
|
||||
// see https://symfony.com/doc/current/components/console/console_arguments.html
|
||||
->addArgument('username', InputArgument::OPTIONAL, 'The username of the new user')
|
||||
->addArgument('password', InputArgument::OPTIONAL, 'The plain password of the new user')
|
||||
->addArgument('email', InputArgument::OPTIONAL, 'The email of the new user')
|
||||
@@ -118,7 +118,7 @@ class AddUserCommand extends ContainerAwareCommand
|
||||
'',
|
||||
]);
|
||||
|
||||
// See http://symfony.com/doc/current/components/console/helpers/questionhelper.html
|
||||
// See https://symfony.com/doc/current/components/console/helpers/questionhelper.html
|
||||
$console = $this->getHelper('question');
|
||||
|
||||
// Ask for the username if it's not defined
|
||||
@@ -205,7 +205,7 @@ class AddUserCommand extends ContainerAwareCommand
|
||||
$user->setEmail($email);
|
||||
$user->setRoles([$isAdmin ? 'ROLE_ADMIN' : 'ROLE_USER']);
|
||||
|
||||
// See http://symfony.com/doc/current/book/security.html#security-encoding-password
|
||||
// See https://symfony.com/doc/current/book/security.html#security-encoding-password
|
||||
$encoder = $this->getContainer()->get('security.password_encoder');
|
||||
$encodedPassword = $encoder->encodePassword($user, $plainPassword);
|
||||
$user->setPassword($encodedPassword);
|
||||
|
||||
@@ -30,7 +30,7 @@ use Symfony\Component\Console\Question\Question;
|
||||
* Check out the code of the src/AppBundle/Command/AddUserCommand.php file for
|
||||
* the full explanation about Symfony commands.
|
||||
*
|
||||
* See http://symfony.com/doc/current/cookbook/console/console_command.html
|
||||
* See https://symfony.com/doc/current/cookbook/console/console_command.html
|
||||
* For more advanced uses, commands can be defined as services too. See
|
||||
* https://symfony.com/doc/current/console/commands_as_services.html
|
||||
*
|
||||
|
||||
@@ -28,7 +28,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
*
|
||||
* $ php bin/console app:list-users
|
||||
*
|
||||
* See http://symfony.com/doc/current/cookbook/console/console_command.html
|
||||
* See https://symfony.com/doc/current/cookbook/console/console_command.html
|
||||
* For more advanced uses, commands can be defined as services too. See
|
||||
* https://symfony.com/doc/current/console/commands_as_services.html
|
||||
*
|
||||
@@ -68,7 +68,7 @@ the email address specified in the <comment>--send-to</comment> option:
|
||||
HELP
|
||||
)
|
||||
// commands can optionally define arguments and/or options (mandatory and optional)
|
||||
// see http://symfony.com/doc/current/components/console/console_arguments.html
|
||||
// see https://symfony.com/doc/current/components/console/console_arguments.html
|
||||
->addOption('max-results', null, InputOption::VALUE_OPTIONAL, 'Limits the number of users listed', 50)
|
||||
->addOption('send-to', null, InputOption::VALUE_OPTIONAL, 'If set, the result is sent to the given email address')
|
||||
;
|
||||
@@ -132,7 +132,7 @@ HELP
|
||||
*/
|
||||
private function sendReport($contents, $recipient)
|
||||
{
|
||||
// See http://symfony.com/doc/current/cookbook/email/email.html
|
||||
// See https://symfony.com/doc/current/cookbook/email/email.html
|
||||
$mailer = $this->getContainer()->get('mailer');
|
||||
|
||||
$message = $mailer->createMessage()
|
||||
|
||||
@@ -75,7 +75,7 @@ class BlogController extends Controller
|
||||
$post = new Post();
|
||||
$post->setAuthor($this->getUser());
|
||||
|
||||
// See http://symfony.com/doc/current/book/forms.html#submitting-forms-with-multiple-buttons
|
||||
// See https://symfony.com/doc/current/book/forms.html#submitting-forms-with-multiple-buttons
|
||||
$form = $this->createForm(PostType::class, $post)
|
||||
->add('saveAndCreateNew', SubmitType::class);
|
||||
|
||||
@@ -84,7 +84,7 @@ class BlogController extends Controller
|
||||
// the isSubmitted() method is completely optional because the other
|
||||
// isValid() method already checks whether the form is submitted.
|
||||
// However, we explicitly add it to improve code readability.
|
||||
// See http://symfony.com/doc/current/best_practices/forms.html#handling-form-submits
|
||||
// See https://symfony.com/doc/current/best_practices/forms.html#handling-form-submits
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$post->setSlug($this->get('slugger')->slugify($post->getTitle()));
|
||||
|
||||
@@ -95,7 +95,7 @@ class BlogController extends Controller
|
||||
// Flash messages are used to notify the user about the result of the
|
||||
// actions. They are deleted automatically from the session as soon
|
||||
// as they are accessed.
|
||||
// See http://symfony.com/doc/current/book/controller.html#flash-messages
|
||||
// See https://symfony.com/doc/current/book/controller.html#flash-messages
|
||||
$this->addFlash('success', 'post.created_successfully');
|
||||
|
||||
if ($form->get('saveAndCreateNew')->isClicked()) {
|
||||
|
||||
@@ -44,7 +44,7 @@ class BlogController extends Controller
|
||||
*
|
||||
* NOTE: For standard formats, Symfony will also automatically choose the best
|
||||
* Content-Type header for the response.
|
||||
* See http://symfony.com/doc/current/quick_tour/the_controller.html#using-formats
|
||||
* See https://symfony.com/doc/current/quick_tour/the_controller.html#using-formats
|
||||
*/
|
||||
public function indexAction($page, $_format)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ class BlogController extends Controller
|
||||
* NOTE: The $post controller argument is automatically injected by Symfony
|
||||
* after performing a database query looking for a Post with the 'slug'
|
||||
* value given in the route.
|
||||
* See http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
|
||||
* See https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
|
||||
*/
|
||||
public function postShowAction(Post $post)
|
||||
{
|
||||
@@ -88,7 +88,7 @@ class BlogController extends Controller
|
||||
*
|
||||
* NOTE: The ParamConverter mapping is required because the route parameter
|
||||
* (postSlug) doesn't match any of the Doctrine entity properties (slug).
|
||||
* See http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html#doctrine-converter
|
||||
* See https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html#doctrine-converter
|
||||
*/
|
||||
public function commentNewAction(Request $request, Post $post)
|
||||
{
|
||||
@@ -109,14 +109,14 @@ class BlogController extends Controller
|
||||
// For simple applications, use the GenericEvent object provided by Symfony
|
||||
// to pass some PHP variables. For more complex applications, define your
|
||||
// own event object classes.
|
||||
// See http://symfony.com/doc/current/components/event_dispatcher/generic_event.html
|
||||
// See https://symfony.com/doc/current/components/event_dispatcher/generic_event.html
|
||||
$event = new GenericEvent($comment);
|
||||
|
||||
// When an event is dispatched, Symfony notifies it to all the listeners
|
||||
// and subscribers registered to it. Listeners can modify the information
|
||||
// passed in the event and they can even modify the execution flow, so
|
||||
// there's no guarantee that the rest of this controller will be executed.
|
||||
// See http://symfony.com/doc/current/components/event_dispatcher.html
|
||||
// See https://symfony.com/doc/current/components/event_dispatcher.html
|
||||
$this->get('event_dispatcher')->dispatch(Events::COMMENT_CREATED, $event);
|
||||
|
||||
return $this->redirectToRoute('blog_post', ['slug' => $post->getSlug()]);
|
||||
|
||||
@@ -16,7 +16,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
/**
|
||||
* Controller used to manage the application security.
|
||||
* See http://symfony.com/doc/current/cookbook/security/form_login_setup.html.
|
||||
* See https://symfony.com/doc/current/cookbook/security/form_login_setup.html.
|
||||
*
|
||||
* @author Ryan Weaver <weaverryan@gmail.com>
|
||||
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
|
||||
|
||||
@@ -26,7 +26,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareTrait;
|
||||
*
|
||||
* $ php bin/console doctrine:fixtures:load
|
||||
*
|
||||
* See http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html
|
||||
* See https://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html
|
||||
*
|
||||
* @author Ryan Weaver <weaverryan@gmail.com>
|
||||
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
|
||||
|
||||
@@ -22,7 +22,7 @@ use Doctrine\Common\Persistence\ObjectManager;
|
||||
*
|
||||
* $ php bin/console doctrine:fixtures:load
|
||||
*
|
||||
* See http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html
|
||||
* See https://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html
|
||||
*
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareTrait;
|
||||
*
|
||||
* $ php bin/console doctrine:fixtures:load
|
||||
*
|
||||
* See http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html
|
||||
* See https://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html
|
||||
*
|
||||
* @author Ryan Weaver <weaverryan@gmail.com>
|
||||
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
|
||||
|
||||
@@ -19,10 +19,10 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
* @ORM\Table(name="symfony_demo_comment")
|
||||
*
|
||||
* Defines the properties of the Comment entity to represent the blog comments.
|
||||
* See http://symfony.com/doc/current/book/doctrine.html#creating-an-entity-class
|
||||
* See https://symfony.com/doc/current/book/doctrine.html#creating-an-entity-class
|
||||
*
|
||||
* Tip: if you have an existing database, you can generate these entity class automatically.
|
||||
* See http://symfony.com/doc/current/cookbook/doctrine/reverse_engineering.html
|
||||
* See https://symfony.com/doc/current/cookbook/doctrine/reverse_engineering.html
|
||||
*
|
||||
* @author Ryan Weaver <weaverryan@gmail.com>
|
||||
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
|
||||
|
||||
@@ -21,10 +21,10 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
*
|
||||
* Defines the properties of the Post entity to represent the blog posts.
|
||||
*
|
||||
* See http://symfony.com/doc/current/book/doctrine.html#creating-an-entity-class
|
||||
* See https://symfony.com/doc/current/book/doctrine.html#creating-an-entity-class
|
||||
*
|
||||
* Tip: if you have an existing database, you can generate these entity class automatically.
|
||||
* See http://symfony.com/doc/current/cookbook/doctrine/reverse_engineering.html
|
||||
* See https://symfony.com/doc/current/cookbook/doctrine/reverse_engineering.html
|
||||
*
|
||||
* @author Ryan Weaver <weaverryan@gmail.com>
|
||||
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
|
||||
@@ -36,7 +36,7 @@ class Post
|
||||
* Use constants to define configuration options that rarely change instead
|
||||
* of specifying them in app/config/config.yml.
|
||||
*
|
||||
* See http://symfony.com/doc/current/best_practices/configuration.html#constants-vs-configuration-options
|
||||
* See https://symfony.com/doc/current/best_practices/configuration.html#constants-vs-configuration-options
|
||||
*/
|
||||
const NUM_ITEMS = 10;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
*
|
||||
* Defines the properties of the Tag entity to represent the post tags.
|
||||
*
|
||||
* See http://symfony.com/doc/current/book/doctrine.html#creating-an-entity-class
|
||||
* See https://symfony.com/doc/current/book/doctrine.html#creating-an-entity-class
|
||||
*
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*/
|
||||
|
||||
@@ -19,10 +19,10 @@ use Symfony\Component\Security\Core\User\UserInterface;
|
||||
* @ORM\Table(name="symfony_demo_user")
|
||||
*
|
||||
* Defines the properties of the User entity to represent the application users.
|
||||
* See http://symfony.com/doc/current/book/doctrine.html#creating-an-entity-class
|
||||
* See https://symfony.com/doc/current/book/doctrine.html#creating-an-entity-class
|
||||
*
|
||||
* Tip: if you have an existing database, you can generate these entity class automatically.
|
||||
* See http://symfony.com/doc/current/cookbook/doctrine/reverse_engineering.html
|
||||
* See https://symfony.com/doc/current/cookbook/doctrine/reverse_engineering.html
|
||||
*
|
||||
* @author Ryan Weaver <weaverryan@gmail.com>
|
||||
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
|
||||
@@ -157,7 +157,7 @@ class User implements UserInterface, \Serializable
|
||||
*/
|
||||
public function getSalt()
|
||||
{
|
||||
// See "Do you need to use a Salt?" at http://symfony.com/doc/current/cookbook/security/entity_provider.html
|
||||
// See "Do you need to use a Salt?" at https://symfony.com/doc/current/cookbook/security/entity_provider.html
|
||||
// we're using bcrypt in security.yml to encode the password, so
|
||||
// the salt value is built-in and you don't have to generate one
|
||||
}
|
||||
|
||||
@@ -44,12 +44,12 @@ class CheckRequirementsSubscriber implements EventSubscriberInterface
|
||||
// Event Subscribers must define this method to declare the events they
|
||||
// listen to. You can listen to several events, execute more than one method
|
||||
// for each event and set the priority of each event too.
|
||||
// See http://symfony.com/doc/current/event_dispatcher.html#creating-an-event-subscriber
|
||||
// See https://symfony.com/doc/current/event_dispatcher.html#creating-an-event-subscriber
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return [
|
||||
// Exceptions are one of the events defined by the Console. See the
|
||||
// rest here: http://symfony.com/doc/current/components/console/events.html
|
||||
// rest here: https://symfony.com/doc/current/components/console/events.html
|
||||
ConsoleEvents::EXCEPTION => 'handleConsoleException',
|
||||
// See: http://api.symfony.com/master/Symfony/Component/HttpKernel/KernelEvents.html
|
||||
KernelEvents::EXCEPTION => 'handleKernelException',
|
||||
|
||||
@@ -81,7 +81,7 @@ class CommentNotificationListener
|
||||
|
||||
// Symfony uses a library called SwiftMailer to send emails. That's why
|
||||
// email messages are created instantiating a Swift_Message class.
|
||||
// See http://symfony.com/doc/current/email.html#sending-emails
|
||||
// See https://symfony.com/doc/current/email.html#sending-emails
|
||||
$message = \Swift_Message::newInstance()
|
||||
->setSubject($subject)
|
||||
->setTo($post->getAuthor()->getEmail())
|
||||
@@ -92,7 +92,7 @@ class CommentNotificationListener
|
||||
// In app/config/config_dev.yml the 'disable_delivery' option is set to 'true'.
|
||||
// That's why in the development environment you won't actually receive any email.
|
||||
// However, you can inspect the contents of those unsent emails using the debug toolbar.
|
||||
// See http://symfony.com/doc/current/email/dev_environment.html#viewing-from-the-web-debug-toolbar
|
||||
// See https://symfony.com/doc/current/email/dev_environment.html#viewing-from-the-web-debug-toolbar
|
||||
$this->mailer->send($message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
* When visiting the homepage, this listener redirects the user to the most
|
||||
* appropriate localized version according to the browser settings.
|
||||
*
|
||||
* See http://symfony.com/doc/current/components/http_kernel/introduction.html#the-kernel-request-event
|
||||
* See https://symfony.com/doc/current/components/http_kernel/introduction.html#the-kernel-request-event
|
||||
*
|
||||
* @author Oleg Voronkovich <oleg-voronkovich@yandex.ru>
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@ final class Events
|
||||
{
|
||||
/**
|
||||
* For the event naming conventions, see:
|
||||
* http://symfony.com/doc/current/components/event_dispatcher.html#naming-conventions.
|
||||
* https://symfony.com/doc/current/components/event_dispatcher.html#naming-conventions.
|
||||
*
|
||||
* @Event("Symfony\Component\EventDispatcher\GenericEvent")
|
||||
*
|
||||
|
||||
@@ -21,7 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
* case the form is trivial and we could build it inside the controller, a good
|
||||
* practice is to always define your forms as classes.
|
||||
*
|
||||
* See http://symfony.com/doc/current/book/forms.html#creating-form-classes
|
||||
* See https://symfony.com/doc/current/book/forms.html#creating-form-classes
|
||||
*
|
||||
* @author Ryan Weaver <weaverryan@gmail.com>
|
||||
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
|
||||
|
||||
@@ -19,7 +19,7 @@ use Symfony\Component\Form\DataTransformerInterface;
|
||||
* This data transformer is used to translate the array of tags into a comma separated format
|
||||
* that can be displayed and managed by Bootstrap-tagsinput js plugin (and back on submit).
|
||||
*
|
||||
* See http://symfony.com/doc/current/form/data_transformers.html
|
||||
* See https://symfony.com/doc/current/form/data_transformers.html
|
||||
*
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
* @author Jonathan Boyer <contact@grafikart.fr>
|
||||
|
||||
@@ -34,7 +34,7 @@ class PostType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
// For the full reference of options defined by each form field type
|
||||
// see http://symfony.com/doc/current/reference/forms/types.html
|
||||
// see https://symfony.com/doc/current/reference/forms/types.html
|
||||
|
||||
// By default, form fields include the 'required' attribute, which enables
|
||||
// the client-side form validation. This means that you can't test the
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
* Defines the custom form field type used to manipulate datetime values across
|
||||
* Bootstrap Date\Time Picker javascript plugin.
|
||||
*
|
||||
* See http://symfony.com/doc/current/cookbook/form/create_custom_field_type.html
|
||||
* See https://symfony.com/doc/current/cookbook/form/create_custom_field_type.html
|
||||
*
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*/
|
||||
|
||||
@@ -25,7 +25,7 @@ use Symfony\Component\Form\FormView;
|
||||
* Defines the custom form field type used to manipulate tags values across
|
||||
* Bootstrap-tagsinput javascript plugin.
|
||||
*
|
||||
* See http://symfony.com/doc/current/cookbook/form/create_custom_field_type.html
|
||||
* See https://symfony.com/doc/current/cookbook/form/create_custom_field_type.html
|
||||
*
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ use Pagerfanta\Pagerfanta;
|
||||
* This custom Doctrine repository contains some methods which are useful when
|
||||
* querying for blog post information.
|
||||
*
|
||||
* See http://symfony.com/doc/current/book/doctrine.html#custom-repository-classes
|
||||
* See https://symfony.com/doc/current/book/doctrine.html#custom-repository-classes
|
||||
*
|
||||
* @author Ryan Weaver <weaverryan@gmail.com>
|
||||
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
|
||||
|
||||
@@ -18,7 +18,7 @@ use Doctrine\ORM\EntityRepository;
|
||||
* method to query for application user information. But it's always a good practice
|
||||
* to define a custom repository that will be used when the application grows.
|
||||
*
|
||||
* See http://symfony.com/doc/current/book/doctrine.html#custom-repository-classes
|
||||
* See https://symfony.com/doc/current/book/doctrine.html#custom-repository-classes
|
||||
*
|
||||
* @author Ryan Weaver <weaverryan@gmail.com>
|
||||
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
|
||||
|
||||
@@ -20,7 +20,7 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
|
||||
* It grants or denies permissions for actions related to blog posts (such as
|
||||
* showing, editing and deleting posts).
|
||||
*
|
||||
* See http://symfony.com/doc/current/security/voters.html
|
||||
* See https://symfony.com/doc/current/security/voters.html
|
||||
*
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\Intl\Intl;
|
||||
* This Twig extension adds a new 'md2html' filter to easily transform Markdown
|
||||
* contents into HTML contents inside Twig templates.
|
||||
*
|
||||
* See http://symfony.com/doc/current/cookbook/templating/twig_extension.html
|
||||
* See https://symfony.com/doc/current/cookbook/templating/twig_extension.html
|
||||
*
|
||||
* In addition to creating the Twig extension class, before using it you must also
|
||||
* register it as a service. See app/config/services.yml file for details.
|
||||
|
||||
@@ -18,11 +18,11 @@ use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||
* Defines the method that 'listens' to the 'kernel.controller' event, which is
|
||||
* triggered whenever a controller is executed in the application.
|
||||
*
|
||||
* See http://symfony.com/doc/current/book/internals.html#kernel-controller-event
|
||||
* See https://symfony.com/doc/current/book/internals.html#kernel-controller-event
|
||||
*
|
||||
* Tip: listeners are common in Symfony applications, but this particular listener
|
||||
* is too advanced and too specific for the demo application needs. For more common
|
||||
* examples see http://symfony.com/doc/current/cookbook/service_container/event_listener.html
|
||||
* examples see https://symfony.com/doc/current/cookbook/service_container/event_listener.html
|
||||
*
|
||||
* @author Ryan Weaver <weaverryan@gmail.com>
|
||||
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
|
||||
@@ -40,7 +40,7 @@ class ControllerListener
|
||||
{
|
||||
// this check is needed because in Symfony a request can perform any
|
||||
// number of sub-requests. See
|
||||
// http://symfony.com/doc/current/components/http_kernel/introduction.html#sub-requests
|
||||
// https://symfony.com/doc/current/components/http_kernel/introduction.html#sub-requests
|
||||
if ($event->isMasterRequest()) {
|
||||
$this->twigExtension->setController($event->getController());
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
* Functional test for the controllers defined inside the BlogController used
|
||||
* for managing the blog in the backend.
|
||||
*
|
||||
* See http://symfony.com/doc/current/book/testing.html#functional-tests
|
||||
* See https://symfony.com/doc/current/book/testing.html#functional-tests
|
||||
*
|
||||
* Whenever you test resources protected by a firewall, consider using the
|
||||
* technique explained in:
|
||||
* http://symfony.com/doc/current/cookbook/testing/http_authentication.html
|
||||
* https://symfony.com/doc/current/cookbook/testing/http_authentication.html
|
||||
*
|
||||
* Execute the application tests using this command (requires PHPUnit to be installed):
|
||||
*
|
||||
|
||||
@@ -19,7 +19,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
/**
|
||||
* Functional test for the controllers defined inside BlogController.
|
||||
*
|
||||
* See http://symfony.com/doc/current/book/testing.html#functional-tests
|
||||
* See https://symfony.com/doc/current/book/testing.html#functional-tests
|
||||
*
|
||||
* Execute the application tests using this command (requires PHPUnit to be installed):
|
||||
*
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
/**
|
||||
* Functional test that implements a "smoke test" of all the public and secure
|
||||
* URLs of the application.
|
||||
* See http://symfony.com/doc/current/best_practices/tests.html#functional-tests.
|
||||
* See https://symfony.com/doc/current/best_practices/tests.html#functional-tests.
|
||||
*
|
||||
* Execute the application tests using this command (requires PHPUnit to be installed):
|
||||
*
|
||||
@@ -30,7 +30,7 @@ class DefaultControllerTest extends WebTestCase
|
||||
/**
|
||||
* PHPUnit's data providers allow to execute the same tests repeated times
|
||||
* using a different set of data each time.
|
||||
* See http://symfony.com/doc/current/cookbook/form/unit_testing.html#testing-against-different-sets-of-data.
|
||||
* See https://symfony.com/doc/current/cookbook/form/unit_testing.html#testing-against-different-sets-of-data.
|
||||
*
|
||||
* @dataProvider getPublicUrls
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,7 @@ use Doctrine\ORM\EntityRepository;
|
||||
/**
|
||||
* Tests that tags are transformed correctly using the data transformer.
|
||||
*
|
||||
* See http://symfony.com/doc/current/testing/database.html
|
||||
* See https://symfony.com/doc/current/testing/database.html
|
||||
*/
|
||||
class TagArrayToStringTransformerTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ use AppBundle\Utils\Slugger;
|
||||
/**
|
||||
* Unit test for the application utils.
|
||||
*
|
||||
* See http://symfony.com/doc/current/book/testing.html#unit-tests
|
||||
* See https://symfony.com/doc/current/book/testing.html#unit-tests
|
||||
*
|
||||
* Execute the application tests using this command (requires PHPUnit to be installed):
|
||||
*
|
||||
|
||||
10
web/app.php
10
web/app.php
@@ -11,8 +11,8 @@
|
||||
|
||||
// This is the front controller used when executing the application in the
|
||||
// production environment ('prod'). See:
|
||||
// * http://symfony.com/doc/current/cookbook/configuration/front_controllers_and_kernel.html
|
||||
// * http://symfony.com/doc/current/cookbook/configuration/environments.html
|
||||
// * https://symfony.com/doc/current/cookbook/configuration/front_controllers_and_kernel.html
|
||||
// * https://symfony.com/doc/current/cookbook/configuration/environments.html
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
@@ -26,7 +26,7 @@ if (PHP_VERSION_ID < 70000) {
|
||||
|
||||
// If your web server provides APC support for PHP applications, uncomment these
|
||||
// lines to use APC for class autoloading. This can improve application performance
|
||||
// very significantly. See http://symfony.com/doc/current/components/class_loader/cache_class_loader.html#apcclassloader
|
||||
// very significantly. See https://symfony.com/doc/current/components/class_loader/cache_class_loader.html#apcclassloader
|
||||
|
||||
// NOTE: The first argument of ApcClassLoader() is the prefix used to prevent
|
||||
// cache key conflicts. In a real Symfony application, make sure to change
|
||||
@@ -44,12 +44,12 @@ if (PHP_VERSION_ID < 70000) {
|
||||
|
||||
// When using the HTTP Cache to improve application performance, the application
|
||||
// kernel is wrapped by the AppCache class to activate the built-in reverse proxy.
|
||||
// See http://symfony.com/doc/current/book/http_cache.html#symfony-reverse-proxy
|
||||
// See https://symfony.com/doc/current/book/http_cache.html#symfony-reverse-proxy
|
||||
$kernel = new AppCache($kernel);
|
||||
|
||||
// If you use HTTP Cache and your application relies on the _method request parameter
|
||||
// to get the intended HTTP method, uncomment this line.
|
||||
// See http://symfony.com/doc/current/reference/configuration/framework.html#http-method-override
|
||||
// See https://symfony.com/doc/current/reference/configuration/framework.html#http-method-override
|
||||
Request::enableHttpMethodParameterOverride();
|
||||
|
||||
$request = Request::createFromGlobals();
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
|
||||
// This is the front controller used when executing the application in the
|
||||
// development environment ('dev'). See:
|
||||
// * http://symfony.com/doc/current/cookbook/configuration/front_controllers_and_kernel.html
|
||||
// * http://symfony.com/doc/current/cookbook/configuration/environments.html
|
||||
// * https://symfony.com/doc/current/cookbook/configuration/front_controllers_and_kernel.html
|
||||
// * https://symfony.com/doc/current/cookbook/configuration/environments.html
|
||||
|
||||
use Symfony\Component\Debug\Debug;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
// If you don't want to setup permissions the proper way, just uncomment the
|
||||
// following PHP line. See:
|
||||
// http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
||||
// https://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
||||
//umask(0000);
|
||||
|
||||
// This check prevents access to debug front controllers that are deployed by
|
||||
|
||||
Reference in New Issue
Block a user