Quantcast
Channel: Symfony Blog
Viewing all 3105 articles
Browse latest View live

The new Symfony 3.3 Service Configuration Changes Explained

$
0
0

tl;dr Symfony 3.3 comes with some big new service configuration features. We've explained them here:The Symfony 3.3 DI Container Changes Explained

In less than 2 weeks, Symfony 3.3 will be released. It comes with a lot of new stuff, but there is one feature that stands out: the new service configuration. I am very excited about these changes: they're designed to accelerate development, make Symfony easier to learn and encourage best-practices (e.g. injecting specific dependencies instead of using $container->get())... without sacrificing predictability and stability.

If you haven't seen it yet, the services.yml file for a new Symfony 3.3 project will look like this:

services:# default configuration for services in *this* file_defaults:# automatically injects dependencies in your servicesautowire:true# automatically registers your services as commands, event subscribers, etc.autoconfigure:true# this means you cannot fetch services directly from the container via $container->get()# if you need to do this, you can override this setting on individual servicespublic:false# makes classes in src/AppBundle available to be used as services# this creates a service per class whose id is the fully-qualified class nameAppBundle\:resource:'../../src/AppBundle/*'# you can exclude directories or files# but if a service is unused, it's removed anywayexclude:'../../src/AppBundle/{Entity,Repository}'# controllers are imported separately to make sure they're public# and have a tag that allows actions to type-hint servicesAppBundle\Controller\:resource:'../../src/AppBundle/Controller'public:truetags:['controller.service_arguments']

There's a lot going on, including service auto-registration, autowiring and auto-tagging (autoconfigure).

Of course, these features are (and will always be) optional: you can upgrade your project to Symfony 3.3 without making any changes. But, I hope you'll give these new features a chance: I've already upgraded a large project and love them.

We've written an in-depth article explaining all of this further on the documentation:The Symfony 3.3 DI Container Changes Explained.

Try it, and let us know what you think!


Be trained by Symfony experts - 2017-05-29 Paris - 2017-05-29 Paris - 2017-05-31 Paris

Fixing the trusted_proxies configuration for Symfony 3.3

$
0
0

The problem

If you upgrade an existing Symfony application to the new 3.3.0 version, you may see this error (depending on your application configuration):

The "framework.trusted_proxies" configuration key has been removed in Symfony 3.3.

The solution

Remove the framework.trusted_proxies option from your config file and call the Request::setTrustedProxies() method in your front controller.

For example, if your original config was the following:

# app/config/config.ymlframework:# ...trusted_proxies:[192.0.0.1,10.0.0.0/8]

Remove the trusted_proxies option entirely and add the following in theapp.php file:

# web/app.php// BEFORE// ...$kernel=newAppKernel('prod',false);Request::setTrustedHeaderName(Request::HEADER_FORWARDED,null);$request=Request::createFromGlobals();// ...// AFTER// ...$kernel=newAppKernel('prod',false);Request::setTrustedProxies(['192.0.0.1','10.0.0.0/8'],Request::HEADER_X_FORWARDED_ALL);$request=Request::createFromGlobals();// ...

You can do this change right now because it also works in Symfony versions prior to 3.3. That way you'll be ready to upgrade your application and you won't see the error mentioned above when upgrading.

The explanation

Symfony project follows a backward compatibility policy that lets you upgrade across minor versions (e.g. from 2.7 to 2.8 or from 3.2 to 3.3) without breaking your applications.

The only exception to this policy is when breaking backward compatibility is the only way to fix a security issue. That's what happened in this case. A member of the Heroku team reported this problem to us and the only choice we had was to introduce this BC break.

Luckily the break is easy to fix and you can do it right now to make your applications forward compatible with Symfony 3.3.


Be trained by Symfony experts - 2017-05-29 Paris - 2017-05-29 Paris - 2017-05-31 Paris

A week of symfony #543 (22-28 May 2017)

$
0
0

This week, Symfony 3.3 continued merging bug fixes and minor tweaks in preparation for its final release next week. Meanwhile, the upcoming Symfony 4 version continued dropping deprecated features and code no longer needed in PHP 7.1. Lastly, Twig announced the introduction of PHP namespaces for their next versions without breaking the existing applications (PSR-0 class names will still be valid).

Symfony development highlights

2.7 changelog:

  • 657f7ec: [Form] removed DateTimeToStringTransformer $parseUsingPipe option
  • 966f387: [DependencyInjection] fixed missing abstract key in XmlDumper
  • 1d1d997: [Console] fixed different behaviour of key and value user inputs in multiple choice question

3.2 changelog:

  • 69583b2: [DependencyInjection] check for private services before shared services
  • c134304: [DependencyInjection] avoid private call to Container::has()
  • ec46891: [Yaml] fixed colon without space deprecation

3.3 changelog:

  • 40b1733: [DependencyInjection] removed dead service_container checks
  • 82ec56b: [Process] fixed escaping arguments on Windows when inheritEnvironmentVariables is set to false
  • 222325f: use getProjectDir() when possible
  • bca7b41: [SecurityBundle] prevent auto-registration of UserPasswordEncoderCommand
  • 2f4dea5: [DependencyInjection] fixed autowire error for inlined services
  • 4a76669: [FrameworkBundle, Validator] deprecated passing validator instances/aliases over using the service locator
  • 047a06e: [Yaml] fixed multiline block handling
  • 879c912: [DependencyInjection] added missing deprecation on Extension::getClassesToCompile
  • 4e95aac: [HttpKernel] don't call getTrustedHeaderName() if possible
  • 1eac150: [Yaml] parse PHP constants in mapping keys
  • fa93ff1: [HttpFoundation] added Request::HEADER_X_FORWARDED_AWS_ELB constant
  • 26afd2c: [HttpKernel] fixed kernel.project_dir extensibility
  • cf60f6d: [FrameworkBundle, Validator] moved the PSR-11 factory to the component
  • c69c539: [FrameworkBundle] only override getProjectDir if it exists in the kernel

Master changelog:

  • c09e897: removed PHP < 7.1.3 code
  • 898516a: [PropertyInfo] removed dead code with PHP 7+
  • 3892a95: [DependencyInjection] removed deprecated dumping an uncompiled container
  • 5370a02: [DependencyInjection] removed deprecated generating a dumped container without populating the method map
  • 88cddb8: [DependencyInjection] removed deprecated autowiring_types feature
  • 5f29144: [DependencyInjection] deprecate Container::initialized() for private services
  • a307880: [Lock] re-added the Lock component
  • 3ae491a: [FrameworkBundle] removed deprecated code
  • 044c00e: [ProxyManagerBridge] removed deprecated features
  • c7edc87: [Yaml] removed deprecated features
  • 314fd0b: [PropertyAccess] made internal constants private
  • 8e0d41a: removed PHP<7 leftovers
  • 43d4e5b: removed some more PHP < 7.1.3 code
  • 683b236: allowed using 4.* deps
  • ad2c9f0: [Routing] removed deprecated features
  • d741908: [Translation] removed deprecated features
  • 7263d77: [Console] removed remaining deprecated features
  • 7a279c6: [Serializer] removed remaining deprecated features

Newest issues and pull requests

Twig development highlights

Master changelog:

They talked about us


Be trained by Symfony experts - 2017-05-29 Paris - 2017-05-29 Paris - 2017-05-31 Paris

Symfony 2.7.28 released

$
0
0

Symfony 2.7.28 has just been released. Here is a list of the most important changes:

  • bug #22847 [Console] ChoiceQuestion must have choices (@ro0NL)
  • bug #22900 [FrameworkBundle][Console] Fix the override of a command registered by the kernel (@aaa2000)
  • bug #22910 [Filesystem] improve error handling in lock() (@xabbuh)
  • bug #22718 [Console] Fixed different behaviour of key and value user inputs in multiple choice question (@borNfreee)
  • bug #22901 Fix missing abstract key in XmlDumper (@weaverryan)
  • bug #22817 [PhpUnitBridge] optional error handler arguments (@xabbuh)
  • bug #22647 [VarDumper] Fix dumping of non-nested stubs (@nicolas-grekas)
  • bug #22584 [Security] Avoid unnecessary route lookup for empty logout path (@ro0NL)
  • bug #22690 [Console] Fix errors not rethrown even if not handled by console.error listeners (@chalasr)
  • bug #22669 [FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice (@ogizanagi)
  • bug #22676 [FrameworkBundle] Adding the extension XML (@flug)

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy.Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2017-05-29 Paris - 2017-05-29 Paris - 2017-05-31 Paris

Symfony 2.8.21 released

$
0
0

Symfony 2.8.21 has just been released. Here is a list of the most important changes:

  • bug #22847 [Console] ChoiceQuestion must have choices (@ro0NL)
  • bug #22900 [FrameworkBundle][Console] Fix the override of a command registered by the kernel (@aaa2000)
  • bug #22910 [Filesystem] improve error handling in lock() (@xabbuh)
  • bug #22718 [Console] Fixed different behaviour of key and value user inputs in multiple choice question (@borNfreee)
  • bug #22901 Fix missing abstract key in XmlDumper (@weaverryan)
  • bug #22817 [PhpUnitBridge] optional error handler arguments (@xabbuh)
  • bug #22752 Improved how profiler errors are displayed on small screens (@javiereguiluz)
  • bug #22647 [VarDumper] Fix dumping of non-nested stubs (@nicolas-grekas)
  • bug #22584 [Security] Avoid unnecessary route lookup for empty logout path (@ro0NL)
  • bug #22690 [Console] Fix errors not rethrown even if not handled by console.error listeners (@chalasr)
  • bug #22669 [FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice (@ogizanagi)
  • bug #22676 [FrameworkBundle] Adding the extension XML (@flug)

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy.Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2017-05-29 Paris - 2017-05-29 Paris - 2017-05-31 Paris

Symfony 3.2.9 released

$
0
0

Symfony 3.2.9 has just been released. Here is a list of the most important changes:

  • bug #22847 [Console] ChoiceQuestion must have choices (@ro0NL)
  • bug #22900 [FrameworkBundle][Console] Fix the override of a command registered by the kernel (@aaa2000)
  • bug #22910 [Filesystem] improve error handling in lock() (@xabbuh)
  • bug #22924 [Cache] Dont use pipelining with RedisCluster (@nicolas-grekas)
  • bug #22718 [Console] Fixed different behaviour of key and value user inputs in multiple choice question (@borNfreee)
  • bug #22829 [Yaml] fix colon without space deprecation (@xabbuh)
  • bug #22901 Fix missing abstract key in XmlDumper (@weaverryan)
  • bug #22912 [DI] Avoid private call to Container::has() (@ro0NL)
  • bug #22866 [DI] Check for privates before shared services (@ro0NL)
  • bug #22874 [WebProfilerBundle] Fix sub-requests display in time profiler panel (@nicolas-grekas)
  • bug #22817 [PhpUnitBridge] optional error handler arguments (@xabbuh)
  • bug #22752 Improved how profiler errors are displayed on small screens (@javiereguiluz)
  • bug #22715 [FrameworkBundle] remove Security deps from the require section (@xabbuh)
  • bug #22647 [VarDumper] Fix dumping of non-nested stubs (@nicolas-grekas)
  • bug #22409 [Yaml] respect inline level when dumping objects as maps (@goetas, @xabbuh)
  • bug #22584 [Security] Avoid unnecessary route lookup for empty logout path (@ro0NL)
  • bug #22690 [Console] Fix errors not rethrown even if not handled by console.error listeners (@chalasr)
  • bug #22669 [FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice (@ogizanagi)
  • bug #22676 [FrameworkBundle] Adding the extension XML (@flug)
  • bug #22652 [Workflow] Move twig extension registration to twig bundle (@ogizanagi)

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy.Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2017-05-29 Paris - 2017-05-29 Paris - 2017-05-31 Paris

Symfony 3.3.0 curated new features

$
0
0

Symfony 3.3.0 has just been released. As for any other Symfony minor release, our backward compatibility promise applies and this means that you should be able to upgrade easily without changing anything in your code.

We've already blogged about some great new 3.3 features, but here is a curated list of the most relevant changes (we have 200+ new small and big features in this releases in total):

New Components

  • Link (dunglas) (22273)
  • Dotenv (fabpot) (21234)
  • WebServerBundle (fabpot) (21039)
  • deprecated the ClassLoader component (nicolas-grekas) (21353)

HttpFoundation

  • Request::setTrustedProxies() takes a new required $trustedHeaderSet argument (nicolas-grekas) (22238)
  • added Request::HEADER_X_FORWARDED_AWS_ELB constant (nicolas-grekas) (22904)
  • compute cookie max-age attribute (ro0NL) (20644)

DependencyInjection

  • implemented PSR-11 (greg0ire) (21265)
  • introduced autoconfigure: automatic _instanceof configuration (weaverryan) (22234)
  • added support for named arguments (dunglas, nicolas-grekas) (21383)
  • added support for anonymous services in YAML (GuilhemN) (21970)
  • always autowire "by id" instead of using reflection against all existing services (nicolas-grekas) (22295)
  • added "by-id" autowiring: a side-effect free variant of it based on the class<>id convention (nicolas-grekas) (22060)
  • added debug:container --types (classes/interfaces) (22624) (weaverryan)
  • added private aliases in debug:container (chalasr) (22385)
  • added a --show-arguments flag to the debug:container command (Cydonia7) (20861)
  • added missing "exclude" functionality from PSR4 loader (weaverryan) (22680)
  • added ServiceLocatorTagPass::register() to share service locators (nicolas-grekas) (22175)
  • added and wired ServiceSubscriberInterface - aka explicit service locators (nicolas-grekas) (21708)
  • deprecated Container::isFrozen and introduce isCompiled (ro0NL) (19673)
  • introduced "container.service_locator" tag (nicolas-grekas) (22024)
  • allowed extensions to create ServiceLocator as services (nicolas-grekas) (21770)
  • replaced wildcard-based methods autowiring by @required annotation (nicolas-grekas) (21763)
  • deprecated underscore-services in YamlFileLoader (nicolas-grekas) (21484)
  • added prototype services for PSR4-based discovery and registration (nicolas-grekas) (21289)
  • generalized constructor autowiring to partial method calls (nicolas-grekas) (21404)
  • deprecated case insentivity of service identifiers (nicolas-grekas) (21223)
  • added "inherit-tags" with configurable defaults + same for "public", "tags" & "autowire" (nicolas-grekas, ogizanagi) (21071)
  • deprecated dumping an uncompiled container (ro0NL) (20634)

WebProfiler

  • added cache data collector and profiler page (Nyholm) (21065)
  • persist app bootstrapping logs for logger data-collector (ScullWM, nicolas-grekas) (21502)
  • improved AJAX toolbar panel (ro0NL) (21007)
  • made the IP address in the profiler header clickable (jameshalsall) (19815)
  • improved cookie traffic (ro0NL) (20567)
  • updated the "Symfony Config" panel in the profiler (javiereguiluz) (20722)

Debug

  • made the simple exception pages match the new style (javiereguiluz) (22838)
  • trigger deprecation on @final annotation in DebugClassLoader - prepare making some classes final (GuilhemN) (20493)
  • support @final on methods (GuilhemN) (21465)

Workflow

  • added a workflow_marked_places Twig function (lyrixx) (22180)
  • added a new workflow_has_place Twig function (Padam87, lyrixx) (21253)
  • added an entered event (Padam87) (20787)
  • introduced the concept of SupportStrategyInterface (andesk, lyrixx) (21334)
  • added a way to enable the AuditTrail Logger (lyrixx) (21933)
  • deprecated the default type of a workflow (lyrixx) (22416)
  • added fluent interface to the DefinitionBuilder (lyrixx) (21950)
  • added the workflow name to all events dispatched (lyrixx) (21925)
  • moved ValidateWorkflowsPass to the Workflow component (chalasr) (22313)

YAML

  • report deprecations when linting YAML files (xabbuh) (22274)
  • added tags support (GuilhemN) (21194)
  • deprecated "? " starting unquoted strings (xabbuh) (22059)
  • deprecated implicit string casting of mapping keys (xabbuh) (21774)
  • parse omitted inlined mapping values as null (xabbuh) (21118)
  • allowed dumping empty array as YAML sequence (c960657) (21471)
  • deprecated parsing mappings without keys (xabbuh) (21643)
  • removed internal arguments from the api (GuilhemN) (21350)
  • parse multi-line strings (xabbuh) (21114)

Console

  • added console.ERROR event and deprecated console.EXCEPTION (wouterj) (18140)
  • log console exceptions (jameshalsall, chalasr) (21003)
  • allowed to catch CommandNotFoundException (chalasr) (22181)
  • excluded empty namespaces in text descriptor (ro0NL) (19954)
  • moved AddConsoleCommandPass from FrameworkBundle to Console. (bcremer) (19443)
  • eased writing to stderr using SymfonyStyle (chalasr) (20586)

Serializer

  • allowed to pass CSV encoder options in context (ogizanagi) (22537)
  • added option to register a circular_reference_handler (lyrixx) (22011)
  • moved SerializerPass to the Serializer (chalasr) (21293)
  • gave access to the context to support* methods (dunglas) (19371)
  • added the possibility to filter attributes (dunglas) (18834)
  • allowed removing empty tags in generated XML (amoiraud) (20524)
  • allowed to specify a single value in @Groups (dunglas) (20509)

Security

  • deprecated the RoleInterface (xabbuh) (20801)
  • added a JSON authentication listener (dunglas) (18952)
  • don't normalize username of in-memory users (chalasr) (21718)
  • UserPasswordEncoderCommand: ask user class choice question (ogizanagi) (20677)
  • lazy load guard authenticators and authentication providers (chalasr) (21450)
  • lazy load request matchers in FirewallMap (chalasr) (21451)
  • made LdapBindAuthenticationProvider capable of searching for the DN (lsmith77, nietonfir) (21402)

HttpKernel

  • added Kernel::getProjectDir() (fabpot) (22315)
  • deprecated the special SYMFONY__ environment variables (javiereguiluz) (21889)
  • allowed signing URIs with a custom query string parameter (thewilkybarkid) (21842)
  • deprecated X-Status-Code for better alternative (jameshalsall) (19822)
  • added the SessionValueResolver (iltar) (21164)

Twig

  • redesigned the exception pages (javiereguiluz) (20951)
  • added a simpler way to retrieve flash messages (javiereguiluz) (21819)

VarDumper

  • added search keyboard shortcuts (ogizanagi) (21238)
  • added a search feature to the HtmlDumper (ogizanagi) (21109)

Asset

  • added a new version strategy that reads from a manifest JSON file (weaverryan) (22046)
  • added support for preloading with links and HTTP/2 push (dunglas) (21478)

Cache

  • implemented PSR-16 SimpleCache (nicolas-grekas) (20694)
  • added TraceableAdapter (Nyholm) (21082)
  • added Memcached adapter (robfrawley) (20858)

FrameworkBundle

  • deprecated cache:clear with warmup (fabpot) (21038)
  • introduced AbstractController, replacing ControllerTrait (nicolas-grekas) (22157)
  • KernelTestCase: allow to provide the kernel class with a var (ogizanagi) (22668)
  • added new "controller.service_arguments" tag to inject services into actions (nicolas-grekas) (21771)
  • allowed to configure Serializer mapping paths (chalasr) (21924)
  • added about command (ro0NL) (19278)
  • add project directory default for installing assets (Noah Heck) (20642)
  • added a new way to follow logs (lyrixx) (21080)
  • Make use of stderr for non reliable output (chalasr, ogizanagi) (20632)
  • Move FormPass to the Form component (chalasr) (21283)
  • Add missing autowiring aliases for common interfaces (chalasr) (21517)
  • Lazy load argument value resolvers (chalasr) (21516)
  • add "mapping" configuration key at validation secti… (davewwww) (19086)
  • added a way to register a guard expression in the configuration (lyrixx) (21935)
  • allowed to reference files directly from kernel.root_dir (fabpot) (21231)
  • allowed to dump extension config reference sub-path (ogizanagi) (20689)
  • allowed symlinks when searching for translation, searialization and validation files (tifabien) (20547)
  • don't load translator services if not required (xabbuh) (20928)
  • allowed clearing private cache pools in cache:pool:clear (chalasr) (20810)
  • moved Validator passes to the component (chalasr) (22081)
  • moved ControllerArgumentValueResolverPass to the HttpKernel component (chalasr) (21815)
  • moved PropertyInfoPass to the PropertyInfo component (chalasr) (21806)
  • moved RoutingResolverPass to the Routing component (chalasr) (21835)
  • moved ConfigCachePass from FrameworkBundle to Config (Deamon) (21375)

Form

  • deprecated usage of "choices" option in sub types (HeahDude) (21919)
  • added helper method to register form extensions during unit testing (pierredup) (21780)
  • allowed form types + form type extensions + form type guessers to be private services (hhamon) (21690)
  • DateIntervalType: Allow to configure labels & enhance form theme (ogizanagi) (20887)

Miscellaneous

  • [Finder] added glob wildcard while using double-star without ending slash (sroze) (22239)
  • [Finder] added double-star matching to Glob::toRegex() (nicolas-grekas) (21572)
  • [Routing] followed symlinks and skip dots in the annotation directory loader (jakzal) (21854)
  • [Routing] added full route definition for invokable controller/class (yceruto) (21723)
  • [Process] accept command line arrays and per-run env vars, fixing signaling and escaping (nicolas-grekas) (21474)
  • [Process] deprecated not inheriting env vars + compat related settings (nicolas-grekas) (21470)
  • [Ldap] added Ldap entry rename for ExtLdap adapter (fruitwasp) (20390)
  • [Ldap] allowed search scoping (xunto) (20310)
  • [DomCrawler] added support for formaction and formmethod attributes (stof) (20467)
  • [ExpressionLanguage] create an ExpressionFunction from a PHP function name (maidmaid) (21122)
  • [Translation] Added a lint:xliff command for XLIFF files (javiereguiluz) (21578)
  • added support for glob loaders in Config (fabpot) (21635)
  • [Validator] support DateTimeInterface instances for times (xabbuh) (21106)

You can read more about this new version by reading theLiving on the Edge articles on this blog. Also read the UPGRADE guide for Symfony 3.3.

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy.Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2017-05-29 Paris - 2017-05-29 Paris - 2017-05-31 Paris

Symfony 3.3.0 released

$
0
0

Symfony 3.3.0 has just been released. Here is a list of the most important changes:

  • bug #22940 [Config] Fallback to regular import when glob fails (@nicolas-grekas)
  • bug #22847 [Console] ChoiceQuestion must have choices (@ro0NL)
  • bug #22900 [FrameworkBundle][Console] Fix the override of a command registered by the kernel (@aaa2000)
  • bug #22930 Revert "bug #22925 [PhpUnitBridge] Adjust PHPUnit class_alias check (@nicolas-grekas)
  • bug #22910 [Filesystem] improve error handling in lock() (@xabbuh)
  • bug #22924 [Cache] Dont use pipelining with RedisCluster (@nicolas-grekas)
  • bug #22928 [WebProfilerBundle] Fixed options stub values display in form profiler (@HeahDude)
  • feature #22838 Make the simple exception pages match the new style (@javiereguiluz)
  • bug #22925 [PhpUnitBridge] Adjust PHPUnit class_alias check to also check for namespaced class (@GawainLynch)
  • bug #22718 [Console] Fixed different behaviour of key and value user inputs in multiple choice question (@borNfreee)
  • bug #22921 [FrameworkBundle] Only override getProjectDir if it exists in the kernel (@aschempp)
  • feature #22905 [FrameworkBundle][Validator] Move the PSR-11 factory to the component (@ogizanagi)
  • bug #22728 [HttpKernel] Fix kernel.project_dir extensibility (@chalasr)
  • bug #22829 [Yaml] fix colon without space deprecation (@xabbuh)
  • bug #22901 Fix missing abstract key in XmlDumper (@weaverryan)
  • bug #22912 [DI] Avoid private call to Container::has() (@ro0NL)
  • feature #22904 [HttpFoundation] Add Request::HEADER_X_FORWARDED_AWS_ELB const (@nicolas-grekas)
  • bug #22878 [Yaml] parse PHP constants in mapping keys (@xabbuh)
  • bug #22873 [HttpKernel] don't call getTrustedHeaderName() if possible (@xabbuh)
  • feature #22892 [ProxyManager] Add FC layer (@nicolas-grekas)
  • bug #22866 [DI] Check for privates before shared services (@ro0NL)
  • feature #22884 [DI] Add missing deprecation on Extension::getClassesToCompile (@nicolas-grekas)
  • bug #22874 [WebProfilerBundle] Fix sub-requests display in time profiler panel (@nicolas-grekas)
  • bug #22853 [Yaml] fix multiline block handling (@xabbuh)
  • bug #22872 [FrameworkBundle] Handle project dir in cache:clear command (@nicolas-grekas)
  • feature #22808 [FrameworkBundle][Validator] Deprecate passing validator instances/aliases over using the service locator (@ogizanagi)
  • bug #22857 [DI] Fix autowire error for inlined services (@weaverryan)
  • bug #22858 [SecurityBundle] Prevent auto-registration of UserPasswordEncoderCommand (@chalasr)
  • bug #22859 [Profiler][VarDumper] Fix searchbar css when in toolbar (@ogizanagi)
  • bug #22614 [Process] Fixed escaping arguments on Windows when inheritEnvironmentVariables is set to false (@maryo)
  • bug #22817 [PhpUnitBridge] optional error handler arguments (@xabbuh)
  • bug #22781 [DI][Serializer] Fix missing de(normalizer|coder) autoconfig (@ogizanagi)
  • bug #22790 [DependencyInjection] Fix dumping of RewindableGenerator with empty IteratorArgument (@meyerbaptiste)
  • bug #22787 [MonologBridge] Fix the Monlog ServerLogHandler from Hanging on Windows (@ChadSikorra)
  • bug #22768 Use 0.0.0.0 as the server log command host default. (@ChadSikorra)
  • bug #22752 Improved how profiler errors are displayed on small screens (@javiereguiluz)

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy.Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2017-05-29 Paris - 2017-05-29 Paris - 2017-05-31 Paris

A week of symfony #544 (29 May - 4 June 2017)

$
0
0

This week, Symfony 3.3.0 was released, including hundreds of changes and some notable new features. In addition, the 2.7.28, 2.8.21 and 3.2.9 maintenance versions were released. Lastly, the SymfonyLive London 2017 conference announced that it will take place on September 22.

Symfony development highlights

2.7 changelog:

  • e33cdc2: [Twig Bridge] harden the debugging of Twig filters and functions
  • 36bd06a: [Form] fixed \IntlDateFormatter timezone parameter usage to bypass a PHP bug
  • 78c4a5f: using FQ name for PHP_VERSION_ID constant to optimize OPcache
  • 32f6534: [EventDispatcher] fixed ContainerAwareEventDispatcher::hasListeners(null)
  • 36f0050: use namespaced Twig versions
  • 621b769: [Form] mixed attr option between guessed options and user options

2.8 changelog:

  • 7a57644: fixed optional cache warmers are always instantiated whereas they should be lazy-loaded
  • 7632bed: [PropertyInfo, DoctrineBridge] the bigint Doctrine's type must be converted to string

3.2 changelog:

  • 3e92637: [Form, FrameworkBundle] removed non-existing arg for data_collector.form
  • 7078cdf: [Cache] fixed Redis scheme detection
  • 12f5636: [DependencyInjection] use more clear message when unused environment variables detected

3.3 changelog:

  • f7b09e9: [Config] fallback to regular import when glob fails
  • 7587213: [Cache] fixed decoration of TagAware adapters in dev
  • 5473373: [Cache] removed extra arg in call to TraceableAdapter::start()
  • 9724e8b: [WebProfilerBundle] fixed text selection & click on file links on exception pages
  • 44f3482: [DependencyInjection] don't throw Autowire exception for removed service with private __construct
  • e879945: [HttpKernel] support unknown format in LoggerDataCollector
  • b136719: [Config] allow using empty globs
  • 5e40e19: [DependencyInjection] improved the type deprecation exception message
  • 9cd68ee: [DependencyInjection] autowiring exception thrown when inlined service is removed
  • 744a4eb: [DependencyInjection] deal with inlined non-shared services
  • f32ec45: [Routing] allow GET requests to be redirected
  • 156a50d: [FrameworkBundle] fixed CacheCollectorPass priority
  • 3fc1189: [EventDispatcher] handle laziness internally instead of relying on ClosureProxyArgument
  • 018b1a3: [DependencyInjection] removed closure-proxy arguments
  • 7a57644: [FrameworkBundle] fixed optional cache warmers are always instantiated whereas they should be lazy-loaded
  • c21e825: [Config] always protected ClassExistenceResource against bad parents
  • f051948: [FrameworkBundle] parse the _controller format in sub-requests
  • 7183be3: [FrameworkBundle] mitigate BC break with empty trusted_proxies
  • 6b9ff81: [WebProfilerBundle] fixed code excerpt wrapping
  • 5859703: [WebProfilerBundle] fixed Form collector triggering deprecations

Master changelog:

  • bf99da5: [Serializer] removed support for deprecated signatures
  • e8a4771: [Lock] removed useless dependency to symfony/polyfill-php70
  • 2b257d7: removed HHVM support
  • 19c4bb7: [Form] missing deprecated paths removal
  • ddfd861: [WebProfilerBundle] removed WebProfilerExtension::dumpValue()

Newest issues and pull requests

Twig development highlights

Master changelog:

  • aad17a1: allowed using namespaced aliases as extension names

They talked about us


Be trained by Symfony experts - 2017-06-19 Berlin - 2017-06-19 Berlin - 2017-06-21 Berlin

Symfony 3.3.1 released

$
0
0

Symfony 3.3.1 has just been released. Here is a list of the most important changes:

  • bug #23067 [HttpFoundation][FrameworkBundle] Revert "trusted proxies" BC break (@nicolas-grekas)
  • bug #23065 [Cache] Fallback to positional when keyed results are broken (@nicolas-grekas)
  • bug #22981 [DependencyInjection] Fix named args support in ChildDefinition (@dunglas)
  • bug #23050 [Form][Profiler] Fixes form collector triggering deprecations (@ogizanagi)
  • bug #22971 [Profiler] Fix code excerpt wrapping (@ogizanagi)
  • bug #23049 [FrameworkBundle] mitigate BC break with empty trusted_proxies (@xabbuh)
  • bug #23045 [Cache] fix Redis scheme detection (@xabbuh)
  • bug #23013 Parse the _controller format in sub-requests (@weaverryan)
  • bug #23015 [PhpUnitBridge] Fix detection of PHPUnit 5 (@enumag)
  • bug #23041 [Config] Always protected ClassExistenceResource against bad parents (@nicolas-grekas)
  • bug #22988 [PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string (@dunglas)
  • bug #23014 Fix optional cache warmers are always instantiated whereas they should be lazy-loaded (@romainneutron)
  • feature #23022 [Di] Remove closure-proxy arguments (@nicolas-grekas)
  • bug #23024 [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null) (@nicolas-grekas)
  • bug #23008 [EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument (@nicolas-grekas)
  • bug #23018 [FrameworkBundle] Fix CacheCollectorPass priority (@chalasr)
  • bug #23009 [Routing] Allow GET requests to be redirected. Fixes #23004 (@frankdejonge)
  • bug #22996 [Form] Fix IntlDateFormatter timezone parameter usage to bypass PHP bug #66323 (@romainneutron)
  • bug #22965 [Cache] Ignore missing annotations.php (@ro0NL)
  • bug #22993 [DI] Autowiring exception thrown when inlined service is removed (@weaverryan)
  • bug #22999 Better DI type deprecation message (@weaverryan)
  • bug #22985 [Config] Allow empty globs (@nicolas-grekas)
  • bug #22961 [HttpKernel] Support unknown format in LoggerDataCollector (@iltar)
  • bug #22991 [DI] Don't throw Autowire exception for removed service with private construct (@weaverryan)
  • bug #22968 [Profiler] Fix text selection & click on file links on exception pages (@ogizanagi)
  • bug #22994 Harden the debugging of Twig filters and functions (@stof)
  • bug #22960 [Cache] Fix decoration of TagAware adapters in dev (@chalasr)

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy.Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2017-06-19 Berlin - 2017-06-19 Berlin - 2017-06-21 Berlin

Symfony 3.3.2 released

$
0
0

Symfony 3.3.2 has just been released. Here is a list of the most important changes:

  • bug #23073 [TwigBridge] Fix namespaced classes (@ogizanagi)
  • bug #23063 [Cache] Fix extensibility of TagAwareAdapter::TAGS_PREFIX (@wucdbm)
  • bug #22936 [Form] Mix attr option between guessed options and user options (@yceruto)
  • bug #22976 [DependencyInjection] Use more clear message when unused environment variables detected (@voronkovich)

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy.Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2017-06-19 Berlin - 2017-06-19 Berlin - 2017-06-21 Berlin

Symfony 2.7.29 released

$
0
0

Symfony 2.7.29 has just been released. Here is a list of the most important changes:

  • bug #23069 [SecurityBundle] Show unique Inherited roles in profile panel (@yceruto)
  • bug #23073 [TwigBridge] Fix namespaced classes (@ogizanagi)
  • bug #22936 [Form] Mix attr option between guessed options and user options (@yceruto)
  • bug #23024 [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null) (@nicolas-grekas)
  • bug #22996 [Form] Fix IntlDateFormatter timezone parameter usage to bypass PHP bug #66323 (@romainneutron)
  • bug #22994 Harden the debugging of Twig filters and functions (@stof)

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy.Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2017-06-19 Berlin - 2017-06-19 Berlin - 2017-06-21 Berlin

Symfony 2.8.22 released

$
0
0

Symfony 2.8.22 has just been released. Here is a list of the most important changes:

  • bug #23073 [TwigBridge] Fix namespaced classes (@ogizanagi)
  • bug #22936 [Form] Mix attr option between guessed options and user options (@yceruto)
  • bug #22988 [PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string (@dunglas)
  • bug #23014 Fix optional cache warmers are always instantiated whereas they should be lazy-loaded (@romainneutron)
  • bug #23024 [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null) (@nicolas-grekas)
  • bug #22996 [Form] Fix IntlDateFormatter timezone parameter usage to bypass PHP bug #66323 (@romainneutron)
  • bug #22994 Harden the debugging of Twig filters and functions (@stof)

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy.Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2017-06-19 Berlin - 2017-06-19 Berlin - 2017-06-21 Berlin

A week of symfony #545 (5-11 June 2017)

$
0
0

This week, Symfony 3.3.2 was released to fix the minor issues found since the final 3.3.0 release last week. Meanwhile, the upcoming Symfony 3.4 version added support to automatically enable the routing annotation loader and improved the VarDump search feature. Lastly, the next Symfony conferences opened their Call for Papers period: SymfonyLive London 2017, SymfonyLive San Francisco 2017, and SymfonyCon 2017 in Cluj (Romania).

Symfony development highlights

2.7 changelog:

  • 658236b: [TwigBridge] fixed namespaced classes
  • 62cbfdd: [SecurityBundle] show unique Inherited roles in profile panel
  • 589f2b1: [HttpFoundation] cache ipCheck results
  • 0c17767: [FrameworkBundle] fixed perf issue in CacheClearCommand::warmup()

2.8 changelog:

  • 621b769: [Form] mixed attr option between guessed options and user options

3.2 changelog:

  • 81a5057: [Cache] fixed extensibility of TagAwareAdapter::TAGS_PREFIX
  • 40beab4: [Cache] ApcuAdapter::isSupported() should return true when apc.enable_cli=Off

3.3 changelog:

  • 1272d2a: [DependencyInjection] fixed named args support in ChildDefinition
  • 58f03a7: [Cache] fallback to positional when keyed results are broken
  • 085d8fe: [HttpFoundation, FrameworkBundle] reverted "trusted proxies" BC break
  • 1006959: [HttpKernel, Debug] fixed missing trace on deprecations collected during bootstrapping & silenced errors
  • 99573dc: [MonologBridge] do not silence errors in ServerLogHandler::formatRecord
  • bd0603d: [Yaml] removed line number in deprecation notices

3.4 changelog:

  • 384b34b: [PropertyInfo] made ReflectionExtractor's prefix lists instance variables
  • bdd888f: [FrameworkBundle] automatically enable the routing annotation loader
  • ea3ed4c: [VarDumper] cycle prev/next searching in HTML dumps
  • e4e1b81: [FrameworkBundle] deprecate not using KERNEL_CLASS in KernelTestCase
  • 1195c7d: [Process] deprecated ProcessBuilder
  • 63ecc9c: [SecurityBundle] lazy load security listeners

Master changelog:

  • 384b34b: [PropertyInfo] made ReflectionExtractor's prefix lists instance variables

Newest issues and pull requests

Twig development highlights

Master changelog:

  • 23e64af: use class_exists instead of require to play nice with inlining
  • 8463178: use class_exists instead of require
  • a9fe0a9: moved class_exists() at the bottom of files

They talked about us


Be trained by Symfony experts - 2017-06-19 Berlin - 2017-06-19 Berlin - 2017-06-21 Berlin

Refactoring symfony.com front-end

$
0
0

The current symfony.com web site was created before the release of Symfony 2.0 back in July 2011. Although the code is continuously updated to the most recent stable version (Symfony 3.3 at the time of writing this blog post), the application is showing its age in some parts. That's why we decided to revamp its front-end simplifying the templates and managing the web assets differently.

Our front-end needs are simple, so we use a pretty traditional setup based on Bootstrap 3 and a bunch of SCSS and JavaScript files. This worked well for us at the beginning, but it was becoming harder and harder to maintain lately.

The refactoring process took us almost two weeks and involved 50 commits changing 219 files (mostly .html.twig and .scss). We added or changed 6,209 lines of code and removed 10,291 lines. In this article, we explain some of the most relevant changes made during the refactorization.

New asset organization

Previously, we had tens of small SCSS files divided by their purpose:code.scss, typography.scss, forms.scss, etc. Besides making it hard to reuse styles, this approach complicates maintenance because it's hard to find all the styles involved in the design of a given page element.

This is a typical developer error: splitting something into lots of smaller pieces believing that this "modular" design is better, but ending up with a hard to maintain mess.

Now we define all the common styles in a big app.scss file and we have dedicated files for pages with special needs: home.scss, download.scss, etc. This makes the design massively simpler to maintain and helps us creating a more consistent design, because it's easier to reuse the same styles for different elements.

New design philosophy

The previous design was "Desktop first" and the new one is "Mobile first", which is something that we wanted to change since a long time ago. Any feature is now designed for and tested on smartphones first, and then we adjust things for larger devices if needed.

The result is that symfony.com contents now adapt nicely to any device. For example, the Symfony Roadmap page, where you can find information about the current and upcoming Symfony versions, now shows a vertical roadmap on smartphones and a horizontal roadmap on larger devices. See the before/after comparison of this page:

In order to avoid complicating the design too much, we decided to define just two responsive breakpoints: 768px for tablets and small desktops and992px for the rest of devices.

New CSS styles

Previously, we didn't use any specific CSS methodology and most of our selectors relied on nested HTML id attributes (e.g. #p-7-2.post #comments #add-comment). The new design uses HTML class attributes exclusively and it's based on theBEM methodology. We don't apply BEM strictly because it can rapidly become too verbose, but BEM has helped us creating a more modular and easier to maintain design.

Another nice improvement was including third-party dependencies in a more granular fashion. Instead of including the entire Bootstrap 3 framework, we now pick the exact Bootstrap files that we need:

// app.scss
@import"~bootstrap-sass/assets/stylesheets/bootstrap/variables";
@import"~bootstrap-sass/assets/stylesheets/bootstrap/mixins";
@import"~bootstrap-sass/assets/stylesheets/bootstrap/normalize";
@import"~bootstrap-sass/assets/stylesheets/bootstrap/grid";// ...

The last change that allowed us to simplify styles a lot are the utility CSS classes that set the margin properties (e.g. .m-t-0 means margin-top: 0,.m-b-15 means margin-bottom: 15px, etc.)

Although they are a bit controversial and some people think that they can bloat your CSS, in our case we covered all our needs with just 10 utility classes, which in turn saved us lots of useless custom CSS classes that only set margins or paddings. These utility classes are coming to Bootstrap 4 too.

New workflow

At the beginning, we used Assetic to manage symfony.com assets. However, a few months ago, we removed it and started the transition to JavaScript-based asset management. As most non-JavaScript developers, we were confused by the amount of tools available, but at the end we settled on using Webpack.

Webpack is a nice tool to bundle your styles, scripts and images, process them and generate the final CSS and JavaScript files. However, at first Webpack is tough to grasp. Luckily, we had an ally: Ryan Weaver. During the past months, Ryan has been secretly working on a new JavaScript tool to manage web assets.

This new tool, called Webpack Encore, is a simpler way to integrate Webpack into your application. Itwraps Webpack, giving you a clean & powerful API for bundling JavaScript modules, pre-processing CSS & JS and compiling and minifying assets.

We've been using this tool in production on symfony.com for the past couple of months and I must say that it's a delight to use. Moreover, this new tool will become the officially recommended way to manage assets on Symfony applications. Do you want to use it in your own projects? You won't have to wait much longer because it will be published this week.

New Twig templates

The previous Twig templates were pretty good, but we made some changes to them to simplify things using modern Twig features. These are some of the tricks we used and which you can use in your own projects too:

Null coalesce operator: introduced in Twig 1.28, it provides the same ?? operator as defined by PHP 7. It's a nice and concise replacement of thedefault filter:

{% set version =version_label ?? version_number ?? 'current' %}

{# equivalent to: #}
{% set version =version_label|default(version_number)|default('current') %}
{# also equivalent to: #}
{% set version =version_labelisdefined ? version_label:... %}

Don't split templates into lots of fragments: splitting templates into tiny fragments and using include() to include them in the template can hurt performance. It also complicates maintenance, because it's harder to find where the contents are defined.

Create fragments only when some part of a template is truly reused in several templates. When including fragments, prefer the include() function to theinclude tag and always use the Twig namespace syntax, which is faster than the traditional bundle syntax:

{# the recommended way to include template fragments #}
{{ include('@App/blog/_list_comments.html.twig') }}

{# this bundle notation makes the application slower #}
{{ include('AppBundle:blog:_list_comments.html.twig') }}

Check for block existence: another feature added in Twig 1.28 is the support of is defined operator for blocks, which is useful to check for their existence in highly dynamic templates:

{%if block('intro') is defined %}<section>
        {{ block('intro') }}</section>
{% endblock %}

Define custom Twig namespaces: during the redesign, we replaced a custom icon font with proper SVG files for each icon. Referring to those files in templates is boring (e.g. images/icons/arrow.svg, bundles/blog/images/icons/arrow.svg) so we used custom Twig namespaces to store all icons under the icon namespace and embed them using the source() Twig function:

{# Twig namespaces create concise and beautiful templates #}<i class="icon">{{ source('@icons/arrow.svg') }}</i>

Don't care about white spaces in HTML code: our work as developers is to create maintainable Twig templates, not to generate perfect looking HTML code. HTML is consumed by browsers not users, and it's mangled, minified and compressed before delivering it to the browser, so never mind about it:

{# this is beautiful and easy to maintain #}<li class="{{ current == item.slug ? 'selected' }}"...>

{# this is a mess and complicates everything for no good reason #}<li{% ifcurrent==item.slug %} class="selected"{% endif %} ...>

The result

Combining all the changes and techniques explained above, the result of the refactorization was amazing. The symfony.com web site looks and feels the same, but all the design issues are gone, the site is fully responsive and "mobile first", and the performance has improved dramatically: before, every symfony.com page downloaded a 194KB app.css file (before gzipping it); now, the common app.css file weights just 59KB, a whopping 70% decrease!

Although the purpose of the refactoring wasn't to change the visual design of the site, we took this opportunity to make some minor changes, especially on the documentation section. For example, notes, tips and warnings now are easier to recognize:


Be trained by Symfony experts - 2017-06-19 Berlin - 2017-06-19 Berlin - 2017-06-21 Berlin

Introducing Webpack Encore for Asset Management

$
0
0

If you write front end code, this might sound familiar:

Ryan is excited to write a killer front end (maybe with React or Vue.js!). But first, he needs to install Webpack... and configure loaders. And Ryan definitely wants to use SASS, so he should configure sass-loader and setup ExtractTextWebpackPlugin to output CSS files. Oh, and don't forget to output source maps! And is everything being minified in production? Wow, that's a lot of setup!

For everyone that has hit this barrier, I'm very excited to show you something we've been working on for the last few months: Webpack Encore.

Encore gives you powerful CSS and JavaScript processing, combination, minification and a lot more, wrapped up in a simple API that's built on an industry-standard tool (Webpack). Write some expressive JavaScript, then let Webpack do the rest:

// webpack.config.jsvar Encore = require('@symfony/webpack-encore');

Encore
    .setOutputPath('web/build/')
    .setPublicPath('/build')// read main.js     -> output as web/build/app.js
    .addEntry('app', './assets/js/main.js')// read global.scss -> output as web/build/global.css
    .addStyleEntry('global', './assets/css/global.scss')// enable features!
    .enableSassLoader()
    .autoProvidejQuery()
    .enableReactPreset()
    .enableSourceMaps(!Encore.isProduction())
    .enableVersioning() // hashed filenames (e.g. main.abc123.js)
;

module.exports = Encore.getWebpackConfig();

Encore is inspired by Webpacker and Mix, but stays in the spirit of Webpack: using its features, concepts and naming conventions for a familiar feel. It aims to solve the most common Webpack use cases. It works great with Symfony, but can be used in any app, in any language.

You can already use Encore today: Webpack Encore Docs! It does not (yet) have a stable 1.0 release, but the CHANGELOG will be updated for each new version. See a feature that's missing or find a bug? Help move this community project forward on GitHubsymfony/webpack-encore.

Why Webpack Encore?

When you use Symfony, we want to make it simple to leverage the best tools from beginning to end. That's why, for assets, Symfony 2.0 came with Assetic: a pure PHP library. In 2011, this made sense. In 2017, life is much different.

Now, the best-practice tools for processing assets are written in Node.js. AndWebpack is a clear leader. Since we want to recommend the highest quality tools, we recommend Webpack.

There's just one problem: configuring Webpack is not simple. So, Encore was born: as a thin tool that help make the best library (Webpack) accessible to everyone. Encore generates the standard webpack.config.js file, uses native Webpack features and stays consistent with its language and concepts. Instead of creating "yet another library", we embrace Webpack.

Try it out and help us make front-end setup powerful, but accessible to everyone.

Thanks to community members stof, javiereguiluz, tucksaun, lyrixx and others who helped review and bootstrap the original version of Encore.

Encore inside Symfony

While Encore will work great in any project, it works especially well in Symfony, thanks to the JSON manifest strategy that's new in Symfony 3.3. By addingone new line to config.yml, you can add versioning and configure a CDN in Encorewithout changing anything else in your app.


Be trained by Symfony experts - 2017-06-19 Berlin - 2017-06-19 Berlin - 2017-06-21 Berlin

Save the dates for the SymfonyTour 2017 and participate in our CFP!

$
0
0

The SymfonyTour 2017 is on its way! All SymfonyLive and SymfonyCon conferences have been announced. Take part in one of these great Symfony conferences of the 2nd part of the year. Save the dates for all the upcoming conferences:

Attending a Symfony conference is an amazing occasion to meet the Symfony community, learn from experts, enhance your experience… But you can do more! Why not becoming a speaker at one of our conferences? Good news, the current Call for Papers are open for all conferences:

Become a speaker at a Symfony conference, take your chance, submit a talk proposal today! We encourage you to submit several talk proposals to increase your chance of selection. Don’t be shy, you can become one of the next SymfonyLive or SymfonyCon speaker of 2017!

More information about the conferences to come soon, stay posted!


Be trained by Symfony experts - 2017-06-19 Berlin - 2017-06-19 Berlin - 2017-06-21 Berlin

A week of symfony #546 (12-18 June 2017)

$
0
0

This week, Symfony introduced Webpack Encore, the new official tool to manage web assets in Symfony applications. Meanwhile, we continued removing somedependencies from the upcoming Symfony 3.4 version, such as Doctrine Cache and the Stopwatch component. Lastly, we announced the dates and Call for Papers deadlines of the next Symfony conferences in London, San Francisco, Berlin and Cluj (Romania).

Symfony development highlights

2.7 changelog:

  • 4cff052: [HttpFoundation] added support for new 7.1 session options
  • d44f143: [Filesystem] added workaround in Filesystem::rename for PHP bug
  • baf988d: [Translation, FrameworkBundle] fixed resource loading order inconsistency
  • f392282: [Routing] expose request in route conditions if possible
  • 551e5ba: [HttpKernel] fixed two edge cases in ResponseCacheStrategy
  • 3c2b1ff: [HttpKernel] keep s-maxage when expiry and validation are used in combination
  • c8884e7: [TwigBundle] added Content-Type header for exception response
  • 436d5e4: [FrameworkBundle] clean assets of the bundules that no longer exist

3.2 changelog:

  • aa94dd6: [PropertyAccess] fixed usage with anonymous classes
  • dce2671: [PropertyAccess] do not silence TypeErrors from client code
  • dddc5bd: [SecurityBundle] move cache of the firewall context into the request parameters

3.3 changelog:

  • 6852b10: [PhpUnit Bridge] fixed the conditional definition of the SymfonyTestsListener
  • 7fc2552: [DependencyInjection] fixed keys resolution in ResolveParameterPlaceHoldersPass
  • 748a999: [Yaml] fixed linting yaml with constants as keys
  • 3278915: [Config] fixed ** GlobResource on Windows
  • 57bed81: [HttpFoundation] added back support for legacy constant values
  • 4667262: [FrameworkBundle] don't set pre-defined esi/ssi services
  • 60e3a99: [WebServerBundle] fixed router script option BC
  • 772ab3d: [Config] fixed Composer resources between web/cli

3.4 changelog:

  • 18ecbd7, a75a32d: [FrameworkBundle] removed dependency on Doctrine cache
  • cc2363f, 17d23a7: [FrameworkBundle] drop hard dependency on the Stopwatch component
  • 0300412: [SecurityBundle] give info about called security listeners in profile
  • 936c1a5: [FrameworkBundle] deprecate useless --no-prefix option
  • 2fe6e69: [WebProfilerBundle] sticky ajax window
  • a03e194: [DependencyInjection] reference instead of inline for array-params
  • 1ed41b5: [Serializer] allow to provide timezone in DateTimeNormalizer
  • bf094ef: [Security] consistent error handling in remember me services
  • e992eae: [Yaml] deprecate using the non-specific tag
  • bc4dd8f: [Security] trigger a deprecation when a voter is missing the VoterInterface
  • 1f6330a: [Validator] added support to check specific DNS record type for URL
  • 6727a26: [FrameworkBundle] allow .yaml file extension everywhere
  • 1cdbb7d: [Serializer] Xml encoder optional type cast
  • 0478ecd: [HttpFoundation] shift responsibility for keeping Date header to ResponseHeaderBag

Master changelog:

  • 3bbb657: [HttpFoundation] removed obsolete ini settings for sessions

Newest issues and pull requests

Twig development highlights

Master changelog:

  • 53cfcea: fixed deprecation when using Twig_Profiler_Dumper_Html

Silex development highlights

Master changelog:

  • 268e3d3: fixed RedirectableUrlMatcher needs to return a proper array with the _route parameter
  • 9cbf194: added JSON manifest version strategy support
  • 6260671: fixed error using EsiFragment with provider and Twig functions

They talked about us


Be trained by Symfony experts - 2017-06-19 Berlin - 2017-06-19 Berlin - 2017-06-21 Berlin

A week of symfony #547 (19-25 June 2017)

$
0
0

This week, Symfony focused on fixing minor issues across all the supported branches. Meanwhile, the upcoming 3.4 version added a new validator panel in the profiler and the upcoming 4.0 version added support for the immutable directive in the cache-control header.

Symfony development highlights

2.7 changelog:

  • 6e75cee: [Security] fixed switch user _exit without having current token
  • 9a0d342: [Translation] return fallback locales whenever possible
  • 7cc97b6: [Form, TwigBridge] render hidden _method field in form_rest()
  • a66b967: [FrameworkBundle] allowed SSI fragments configuration in XML files
  • f7de083: [WebProfilerBundle] display a better error message when the toolbar cannot be displayed

2.8 changelog:

  • b0bc9fe: [Console] fixed catching exception type in QuestionHelper

3.3 changelog:

  • 9a276aa: [TwigBundle] improved the exception page when there is no message
  • 035d526: [DependencyInjection] dedup tags when using instanceof/autoconfigure
  • 383c6ac: [Dotenv] test load() with multiple paths
  • 7bb72b0: [Cache] fixed Predis client cluster with pipeline
  • 87601ba: [SecurityBundle] respect the API in FirewallContext map

3.4 changelog:

  • 30e817a: [WebProfilerBundle, Validator] added a validator panel in profiler
  • 2c438c5: [SecurityBundle] added user impersonation info and exit action to the profiler

Master changelog:

  • 16fbe3a: [HttpFoundation] added support for the immutable directive in the cache-control header
  • 407631c: [Serializer] implement missing context aware interfaces
  • 587b2f7: [Yaml] removed deprecated unspecific tag behavior

Newest issues and pull requests

They talked about us


Be trained by Symfony experts - 2017-06-26 Paris - 2017-06-26 Paris - 2017-06-28 Paris

A week of symfony #548 (26 June - 2 July 2017)

$
0
0

Symfony development highlights

3.2 changelog:

  • 25ab339: [Workflow] added more events to the announce function

3.3 changelog:

  • 8b6cb57: [FrameworkBundle] display a proper warning on cache:clear without the --no-warmup option

3.4 changelog:

  • 1baac5a, 7787343: [Yaml] added line numbers to JSON output in YAML linter

Master changelog:

  • 8483564: [Process] remove deprecated features
  • 1c106da: [Security] removed support for defining voters that don't implement VoterInterface

Newest issues and pull requests

They talked about us


Be trained by Symfony experts - 2017-07-03 Paris - 2017-07-10 Paris - 2017-07-10 Paris
Viewing all 3105 articles
Browse latest View live