News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Benjamin Eberlei:
Integrate Symfony and Webpack
February 26, 2015 @ 10:21:40

In his latest entry Benjamin Eberlei shows how he integrated Symfony and Webpack, a tool that makes it simpler to package up multiple assets (like Javascript or CSS files) and reduce them down to combined files, reducing the overhead on page loads.

Asset Management in Symfony2 is handled with the PHP based library Assetic by default, however I have never really connected to this library and at least for me it usually wastes more time than it saves. [...] While researching about React.JS I came across a tool called Webpack which you could compare to Symfony's Assetic. It is primarily focussing on bundling Javascript modules, but you can also ship CSS assets with it.

He talks about some of the main benefits to using the Webpack tool including a built-in web server to serve up the assets and a "hot reload" plugin that refreshes when assets change. He then gets into a more practical example, showing how the tool works with a typical asset structure in a Symfony application. He shows how it uses the internal server to prevent the need for a complete rebuild each time. He also shows how to install and configure it through Symfony and loading the Javascript file in your Twig template. Finally he shows how to run a build, the resulting output and the integration he mentioned with React.js.

0 comments voice your opinion now!
symfony asset webpack tool tutorial introduction configuration install

Link: http://www.whitewashing.de/2015/02/26/integrate_symfony_and_webpack.html

SitePoint PHP Blog:
Introduction to Silex - A Symfony Micro-framework
February 20, 2015 @ 12:31:40

The SitePoint PHP blog has a tutorial posted today introducing you to one of the more popular PHP microframeworks out there, Silex. This new article jumps right in and shows you how to use it.

Silex is a PHP micro-framework based on Symfony components and inspired by the Sinatra Ruby framework. In this article, we are going to get started with the framework and see the how it fits our needs.

He walks you through the installation of Silex (and Twig) through Composer and the creation of the basic folder structure to build the first app. He then gets into talking about how routes are handled, parameters and linking controllers to routes. He also introduces the use of providers and shows how to implement the one for Twig to use in templating the output of the application.

0 comments voice your opinion now!
silex microframework introduction tutorial symfony twig

Link: http://www.sitepoint.com/introduction-silex-symfony-micro-framework/

Symfony Blog:
New in Symfony 2.7 Twig as a First-Class Citizen
January 15, 2015 @ 13:16:18

The Symfony blog has a new post about a change coming in the next version of the popular PHP framework - treating Twig as a first-class citizen. This update removes the abstraction layer that was introduced for it to be used in templating.

When I started to work on Symfony2, Twig didn't exist. Anyway, to ease using PHP as a templating engine, I created the Symfony Templating Component. Later on, not very satisfied with using PHP as a templating language, I decided to create a new templating language, Twig, based on the Python Jinja2 language. And Symfony2 became the first popular framework to adopt a non-PHP templating engine in core. [...] But what would Twig as a First-Class Citizen mean in Symfony2 then? To be able to support PHP and Twig in Symfony, we added an abstraction layer. [...] For Symfony 3.0, I'd like to extract the Templating Component into an independent library (for the few people using PHP with Symfony) but I'd also like for Twig to be front and center in the framework. The good news is that most of the work has already been done in Symfony 2.7.

He compares the two methods for using Twig, one in 2.6 and the other in 2.7, showing both the reduction in code needed and the overall speed improvement gained by removing the excess layer. He includes a link to the Blackfire.io reports showing the difference in the metrics with a total of 48 classes less to load just by removing this layer.

0 comments voice your opinion now!
symfony twig firstclass citizen templating abstraction performance

Link: http://symfony.com/blog/new-in-symfony-2-7-twig-as-a-first-class-citizen

Symfony Blog:
Symfony 2014 Year in Review London Symfony Meetups
January 06, 2015 @ 13:19:01

The Symfony blog has another in their "2014 Year in Review" series posted, this time with a focus on the London Symfony meetups and the presentations that were made.

2014 was a really successful year for the Symfony Meetup Group in London. I've been involved helping to organize these meetups for a few years now, but it was never a regular thing until this year. With a huge help of my SensioLabs UK colleagues we managed to bring the group to the next level. Each meetup we're getting around 60-90 attendees, which is a big improvement compared to the previous years. We also started recording the talks. Since the Symfony community in London is much bigger, I believe we can do even better in 2015!

Talks presented this year included:

  • Optimizing Your Front End Workflow
  • Applying Domain Driven Design with Symfony2 projects
  • Silex saved me from my legacy code
  • Scaling Symfony2 apps with RabbitMQ
  • Speed up your Symfony2 application and build awesome features with Redis

Each topic has a summary, a link to the slides and a video of the presentation (if available).

0 comments voice your opinion now!
symfony meetup london topics 2014 yearinreview

Link: http://symfony.com/blog/symfony-2014-year-in-review-london-symfony-meetups

Joshua Thijssen:
Debugging Symfony components
January 02, 2015 @ 09:44:53

Joshua Thijssen has a quick new post today talking about debugging Symfony components, sharing a simple but useful hint.

Don't you hate it when you are stepping through your debugger during a Symfony application debug session, and all of a sudden it cannot find files anymore as Symfony uses code located in the bootstrap.php.cache instead of the actual Symfony component. Symfony creates these cache-classes in order to speed up execution, but it makes that xdebug cannot find the correct code to step through anymore.

He found a solution in a few changes to his "app_dev.php" bootstrap file to alter the location of the autoloader and disable cache loading. This prevents issues with Symfony trying to access cached versions and use the actual files and locations, making debuggers much more happy.

0 comments voice your opinion now!
debug symfony component tip cache disable dev

Link: https://www.adayinthelifeof.nl/2014/12/31/debugging-symfony-components/

Symfony Blog:
Symfony 2014 Year in Review Symfony Documentation
December 31, 2014 @ 10:37:11

The Symfony blog has posted an update from the perspective of the documentation for the framework. Their "year in review" includes details for each section and the updates made.

2014 has been the busiest year in the entire history of the Symfony Documentation thanks to the amazing work of our documentation managers (Ryan Weaver, Christian Flothmann and Wouter De Jong) and the hundreds of documentation contributors.

They also talk about the best practices book, the new quick tour and Fabien Potencier's own How to Create Your Own Framework series. Among the list of their top ten most popular pages are the docs for:

Check out the full post for the rest of the list and what changes were made in each section.

0 comments voice your opinion now!
symfony framework documentation update yearinreview 2014

Link: http://symfony.com/blog/symfony-2014-year-in-review-symfony-documentation

Symfony Blog:
Symfony 2014 Year in Review symfony.com website
December 29, 2014 @ 10:55:47

The Symfony framework blog has posted their end of year review for 2014 with happenings in both the Symfony framework and community.

2014 has been the busiest year in the entire history of the Symfony project website. First, we redesigned our website to bring in a more modern look and feel. Then, we added two new sections: Symfony Marketplace, which is the place where you can find all the products and services built around Symfony ecosystem and Symfony Jobs, which is the official job board to look for and post Symfony related job offers.

In addition, we boosted the official Symfony Blog with lots of new articles and a faster post publishing pace to provide you more contents.

They list out their "top ten" of most popular posts on the site including articles about performance, the v 3.0 roadmap and developer experience. They end the post with a reminder about another new part of the site coming soon - the Symfony Showcase showing off sites built with the framework.

0 comments voice your opinion now!
symfony website community top10 symfonyjobs symfonymarketplace

Link: http://symfony.com/blog/symfony-2014-year-in-review-symfony-com-website

Symfony Blog:
Testing minimal versions of Symfony requirements
December 17, 2014 @ 12:02:47

On the Symfony blog today there's a quick tip from Nicolas Grekas about using Composer to install a Symfony2 project and the definition of minimum version requirements.

Setting up Composer package versions for complex projects is not an easy task. For starters, there are a lot of different ways to define package versions. Then, you must check that declared package versions really work when installing or updating the project, specially for the minimal versions configured. In order to improve testing the minimal versions of Symfony Components requirements, Composer now includes two new options: prefer-lowest and prefer-stable. [...] Thanks to these two new options, it's really easy to check whether your project really works for the minimal package versions declared by it.

He includes definitions of what impact each of the options has on the packages Composer installs and the work that's been done recently to define the correct package versions for the 2.3, 2.5 and 2.6 branches of Symfony. He also offers some steps to follow in your own projects to ensure that the "prefer-lowest" packages installed work correctly.

0 comments voice your opinion now!
symfony framework package version preferlowest preferstable

Link: http://symfony.com/blog/testing-minimal-versions-of-symfony-requirements

Symfony Blog:
The Symfony 500 + 100 Challenge
December 12, 2014 @ 12:48:08

The Symfony blog pas posted something they're calling the Symfony 500 + 100 Challenge, an effort to kickstart some backlog cleanup of the number of issues currently in the project's backlog.

The end of the year is approaching, and we think that this is the best time to do some backlog cleaning before fresh starting the new year. Right now there are 728 pending issues in symfony/symfony repository and 177 issues in symfony/symfony-docs.

Some of those issues were reported a long time ago and they probably refer to Symfony versions that are no longer maintained. Others would have been fixed but not closed and there could also be some duplicates. That's why we ask your help to review all the pending issues in order to close irrelevant issues and achieve much more manageable levels: 500 issues or less for symfony/symfony and 100 issues or less for symfony/symfony-docs.

If you're interested in helping out, they've included a few steps to get you started locating and claiming an issue for you to work on. They also make suggestions on how to report back issues found on bugs, feature requests and general discussion items.

0 comments voice your opinion now!
symfony challenge 500+100 issues bugfix featurerequest discussion

Link: http://symfony.com/blog/the-symfony-500-100-challenge

Bernhard Schussek:
Puli Powerful Resource Management for PHP
December 04, 2014 @ 11:53:22

Bernhard Schussek has announced a tool for handling resources in a more Composer-inspired way: Puli. Puli is described as a tool that "manages files, directories and other resources in a filesystem-like repository".

Unfortunately, sharing your work gets a lot harder when you leave PHP code and enter the land of configuration files, images, CSS files, translation catalogs - in short, any file that is not PHP. For brevity, I'll call these files resources here. Using resources located in Composer packages is quite tedious: You need to know exactly where the package is installed and where the resource is located in the package. That's a lot of juggling with absolute and relative file system paths and prone to error.

[...] One and a half years ago I talked about this problem with PHP-FIG. I wrote a blog post about The Power of Uniform Resource Location in PHP. Many people joined the discussion. The understanding of the problem and its solution got riper as we spoke. Today, I am glad to present to you the first (and probably last) alpha version of Puli, a framework-agnostic resource manager for PHP.

He walks through the basics of the tool - how it manages the various resources, what the configuration looks like and how it can directly be integrated with Composer. He also points to a Twig extension that allows for Puli integration via paths in your templates. There's also a Symfony bridge that lets you use it in your YAML configuration files.

0 comments voice your opinion now!
resource management puli tool composer twig symfony integration

Link: http://webmozarts.com/2014/12/03/puli-powerful-resource-management-for-php/


Community Events

Don't see your event here?
Let us know!


unittest extension laravel framework opinion psr7 laravel5 development api conference community wordpress podcast release interview introduction series library language voicesoftheelephpant

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework