PHPNews

Immutable Objects for PHP

The new immutablephp/immutable package provides truly immutable value objects and an immutable value bag, along with base Immutable and ValueObject classes for your own objects. It helps to prevent against the oversights described by my earlier article Avoiding Quasi-Immutable Objects in PHP . (Of course, it …

Continue reading »

Written by Paul M. Jones - - Aggregated on Monday February 4, 2019


Open Source and Squeegee Men

It is the Christmas season, and Christmas is a time for giving gifts: to family, to friends, and to colleagues. Some even give gifts to strangers they may never meet, as an expression of charity or of generosity, or in thankfulness for their own abundance. … When someone receives a gift, they do well to return …

Continue reading »

Written by Paul M. Jones - - Aggregated on Tuesday December 11, 2018


What to Do About The Linux COC

(An open letter to the Linux community.) You need to decide for yourself how dire your circumstances are now that the Contributor Covenant Code of Conduct (CCCOC) is in place. If you think the Social Justice capture of the Linux kernel is all-well-and-good, you need do nothing. Everything is running right on …

Continue reading »

Written by Paul M. Jones - - Aggregated on Wednesday September 26, 2018


Social Justice Attack Survival Guide

With the recent Social Justice capture of the Linux kernel, many in the open source world may find this guide from Vox Day to be useful. I present it here as a public service; you can find the original PDF here . If you are interested in how to resist the introduction of the Contributor Convenant and other Social …

Continue reading »

Written by Paul M. Jones - - Aggregated on Friday September 21, 2018


Atlas ORM Integration with Symfony

Are you using Symfony 4? Do you want to use Atlas with it? We now have a Symfony bundle and Flex recipe that makes installation and integration a breeze. Two commands and one .env file edit, and you’re ready to go: composer config extra.symfony.allow-contrib true composer require atlas/symfony ~1.0 Build …

Continue reading »

Written by Paul M. Jones - - Aggregated on Tuesday July 31, 2018


Atlas.Orm 3.0 (“Cassini”) Now Stable

I am delighted to announce the immediate availability of Atlas.Orm 3.0 (“Cassini”), the flagship package in the Atlas database framework. Installation is as easy as composer require atlas/orm ~3.0 . Atlas.Orm helps you build and work with a model of your persistence layer (i.e., tables and rows) while providing a …

Continue reading »

Written by Paul M. Jones - - Aggregated on Tuesday July 10, 2018


Atlas.Query: Simple. Sensible. SQL.

I am happy to announce that Atlas.Query is now stable and ready for production use! Installaton is as easy as composer require atlas/query ~1.0 . With Atlas.Query and any PDO instance, you can build and execute your queries in a single fluent series of method calls: use Atlas\Query\Select; $rows = …

Continue reading »

Written by Paul M. Jones - - Aggregated on Tuesday May 22, 2018


The Conquest Code of Conduct

If you’re tired of SJW COCs in open-source projects, try this one on for size : Conquest’s Second Law: “Any organization not explicitly right-wing sooner or later becomes left-wing.” tl;dr: No Socialism or Social Justice. All contributions and communication are welcome, so long as they do not (within this …

Continue reading »

Written by Paul M. Jones - - Aggregated on Monday April 9, 2018


Line Coverage in Unit Tests

The novice says, “I do not strive for 100% line coverage in tests; I only write tests for the code that is important.” The master says, “If the code is not important, why is it there at all? I will strive to test every line I write; if a line is not important, it should be removed.” (See also The Way of Testivus …

Continue reading »

Written by Paul M. Jones - - Aggregated on Tuesday February 13, 2018


Perfection

The novice says: “Nothing can ever be perfect; anything I choose will be imperfect. Therefore, all choices are equally bad, so I may choose whatever I feel like.” The master says: “Some things are less imperfect than others; I will make the least-imperfect choice that I can.”

Continue reading »

Written by Paul M. Jones - - Aggregated on Tuesday February 6, 2018


Best Practices

Best practices evolve. Even though they change, they tend to change in the direction of “better”, not “worse”. The novice thinks he is an individual. The novice says: “Best practices are always changing; why bother adhering to something that I know will change? I am free to do what I feel like without referring …

Continue reading »

Written by Paul M. Jones - - Aggregated on Wednesday January 31, 2018


Considering Typehints As Communication

Typehints help communicate across time and space, to people who may never meet you or who might not be able to interrogate you about your code, so those people can understand how you expect the code to work. Adding typehints is a succinct, more-complete form of communication than not-adding them. (It is rare, …

Continue reading »

Written by Paul M. Jones - - Aggregated on Tuesday January 2, 2018


Solving The “Widget Problem” In ADR

The “widget problem” is when you have several panels or content areas on an HTML page that have different data sources. You might have a main content area, then a calendar off to the side, with perhaps a list of recent news items or blog posts, a todo or reminder widget, and maybe other information panels. The …

Continue reading »

Written by Paul M. Jones - - Aggregated on Thursday December 28, 2017


Avoid Dependency Injection

At least, avoid it when building DDD Aggregates: Dependency injection of a Repository or a Domain Service into an Aggregate should generally be viewed as harmful. The motivation may be to look up a dependent object instance from inside the Aggregate. The dependent object could be another Aggregate, or a number of …

Continue reading »

Written by Paul M. Jones - - Aggregated on Tuesday December 5, 2017