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

ThePHP.cc:
The Death Star Version Constraint
Feb 16, 2017 @ 15:58:30

In a new post to thePHP.cc blog Sebastian Bergmann talks about Death Star Version constraint and how it could cause issues in your application if your version definitions are too loose.

PHPUnit 6, a new major version of the de-facto standard for testing PHP-based software, was recently released. Soon after, the test suites of developers who did not yet want to upgrade to the new version stopped working. What had happened?

In a nutshell, these PHP developers were caught off guard by the consequences of using the "Death Star" version constraint in their composer.json file, the * operator.

He gives an example where a user may have specified "*" in their composer.json file, leaving it wide open to get whatever the latest version is. He then talks some about semantic versioning and how it should be used in Composer configurations to ensure you're always working with the versions you're expecting. Locking down versions is good, but he also makes a recommendation to "keep dependencies fresh", providing bug fixes, new features and functionality as well as security updates.

tagged: version constraint semantic deathstar fresh

Link: https://thephp.cc/news/2017/02/death-star-version-constraint

Laravel News:
Installing Bourbon and Neat with Laravel Elixir
Oct 06, 2016 @ 15:25:09

On the Laravel News site a tutorial has been published showing you how to install Bourbon and Neat with Laravel's "elixir" functionality (a wrapper around the popular Gulp installation tool for Javascript and CSS library handling.

Laravel Elixir is a wrapper that simplifies working with Gulp, it makes compiling, concating, minifying and versioning your JavaScript and CSS files very fluent and easy.

Because many projects using Bootstrap, when you start a new Laravel project, you will find that it is included by default as a basic starting point, but Laravel does not dictate which JavaScript or CSS frameworks you should use. One alternative is Bourbon and Neat created by thoughtbot.

Bourbon is a mixin library for Sass and Neat is a Bourbon addon for creating semantic grids. In this tutorial let’s take a look at how to setup these tools with Laravel Elixir.

They start with a brief overview of the Bourbon tool, showing how it helps to reduce the amount of duplicate code in your source files. There's also a bit about Neat, a responsive grid library that makes it easier to keep your layout "clean and semantic". With those defined they get into the installation of these two packages with two different approaches:

  • First installing Bourbon/Neat via npm then importing them in the SASS config
  • Or installing them via npm, edit the Gulp configuration then import them relatively

With either of these methods in place the Elixir tool can then run the compilation right alongside the other sources and push the resulting CSS out the other side including the Bourbon and Neat functionality.

tagged: laravel install configure elixir bourbon neat semantic clean tutorial

Link: https://laravel-news.com/2016/10/installing-bourbon-neat-laravel-elixir/

Mathias Noback:
Semantic versioning for bundles
Sep 30, 2014 @ 16:26:40

In a recent post to his site Mathias Noback looks at the use of semantic versioning, introducing some of its basic concepts and how it can relate to the work done in Symfony bundles.

Semantic versioning is an agreement between the user of a package and its maintainer. The maintainer should be able to fix bugs, add new features or completely change the API of the software they provide. At the same time, the user of the package should not be forced to make changes to their own project whenever a package maintainer decides to release a new version.

He breaks down what the version numbering represents (major, minor and patch versions) and how they work with Symfony's "semver" to handle issues that come with backwards compatibility concerns. He then looks at a few things to consider when versioning your bundles and how it relates to the underlying libraries it might use:

  • Bundles expose an API themselves
  • The API of a bundle leads a life on its own
  • A library may contain bugs that are totally unrelated to the bundle
  • A library may contain features that are not implemented by the bundle

Ultimately, he suggests that bundle versioning should have nothing to do with the underlying libraries/packages. It's his opinion that they should only be reversioned when there is a change in the actual bundle.

tagged: semantic versioning symfony bundle package library opinion

Link: http://php-and-symfony.matthiasnoback.nl/2014/09/semantic-versioning-for-bundles/

IBM developerWorks:
Building semantic Web CRUD operations using PHP
Nov 28, 2008 @ 14:50:06

IBM developerWorks has this new tutorial they recently posted looking at making a semantic CRUD (create, read, update, delete) application that uses MySQL and SPARQL.

Create, Read, Update, and Delete (CRUD) operations are the most basic database operations, but they are also the most crucial. CRUD operations are typically done using the Structured Query Language (SQL) on relational database systems. As the Web is becoming more and more data-oriented, there is a need to shift from SQL-based CRUD operations to semantic Web-based CRUD operations. Learn how to use PHP to perform CRUD operations over the semantic Web.

They include the SQL code for both sides (MySQL/SPARQL) on each of the CRUD steps. They take these and show how to plug them in to a PHP SQL call and briefly mention abstraction and a few reasons why you might want to move to SPARQL.

tagged: semantic application crud mysql sparql operation

Link:

SitePoint PHP Blog:
Rasmus Lerdorf - PHP frameworks? Think again.
Aug 29, 2008 @ 13:47:12

On the SitePoint PHP blog, David Peterson shares some of the comments and thoughts that Rasmus Lerdorf (creator of PHP) had recently on a good range of topics (including frameworks).

This is the fist time I have heard Rasmus Lerdorf speak and it was entertaining to say the least. Refreshing would another way to describe it, I enjoy hearing real opinions and not holding back - Rasmus doesn't hold back.

He talked about frameworks (and why they're not the best thing for the job), how you can make PHP fast (or can you?) and some mention of the semantic web and Drupal.

tagged: rasmuslerdorf framework drupal semantic optimize fast extension

Link:


Trending Topics: