From 97169ab1cd622872f4a3e654257931de31c1a095 Mon Sep 17 00:00:00 2001 From: Volodymyr Mostepaniuk Date: Mon, 2 Aug 2021 17:20:50 +0300 Subject: [PATCH] Readme changes. --- README.md | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 11f3f29..a4f2c90 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Service Utils -[![Build Status](https://api.travis-ci.org/drunomics/service-utils.svg?branch=2.x)](https://travis-ci.org/drunomics/service-utils) -(c) 2017-2020 drunomics GmbH +[![Build Status](https://api.travis-ci.org/drunomics/service-utils.svg?branch=9.x)](https://travis-ci.org/drunomics/service-utils) +(c) 2017-2021 drunomics GmbH Provides setter injection traits in order to ease dependency injection of services. @@ -17,6 +17,17 @@ Major version numbers match Drupal 8 core compatibility, e.g. 7.x -> Drupal 8.7.x 8.x -> Drupal 8.8.x 9.x -> Drupal 8.9.x + 9.1.x -> Drupal 9.1.x + 9.2.x -> Drupal 9.2.x + +## Releases + +After changes in a branch we need to create a new appropriate release. + + 8.x -> 8.8.0, 8.8.1, ... + 9.x -> 8.9.0, 8.9.1, ... + 9.1.x -> 9.1.0, 9.1.1, ... + 9.2.x -> 9.2.0, 9.2.1, ... ## Scope @@ -26,9 +37,9 @@ This covers traits for services that are missing from core or contrib modules. - Install the package via `composer require drunomics/service-utils` - - Just "use" the trait for the service you want to use. The trait provides a + - Just "use" the trait for the service you want to use. The trait provides a suiting getter; e.g., `getEntityTypeManager()`. - + ## Adding a missing trait - Just add new trait and add it in the respective namespace. The namespace @@ -39,7 +50,7 @@ This covers traits for services that are missing from core or contrib modules. - Run tests to ensure everything works as needed and file a PR for your ! - If your trait covers a contrib module, make sure the contrib module is added as dev-dependency, so its classes are there for running tests. - + ## Running tests - Just clone the project and run the following commands from the project directory: @@ -52,9 +63,9 @@ This covers traits for services that are missing from core or contrib modules. ## Coding style To check the coding style for the project's custom code, run PHP code sniffer: - + composer cs - + To automatically fix the coding style errors (as far as possible), run the PHP code beautifier: @@ -64,7 +75,7 @@ code beautifier: - Why are the traits not added to the upstream source (core or contrib modules) instead? - + This would be the best option, but results in a worse developer experience (DX) while patches are not committed. The goal of this package is to make dependency injection almost as quick as calling out to \Drupal::container(), @@ -77,20 +88,8 @@ code beautifier: improve them and deprecate this package in the long term. Once those patches landed in new upstream releases, the service-utils usages could be replaced and the package can be safely dropped from a project. - - - Why are there no stable releases? - - Because every commit can be considered a new stable version. It's generally - fine to always get the latest version, as every trait works independent on - its own and won't be touched again once added. - Given this library contains only simple, tested traits it's simple to avoid - any backward incompatible changes. This is verified by the following: - - - The package version constraints make sure the version matching the right - core version is installed. - - We won't remove or change any existing traits once added. - Why is this no project on drupal.org? - + Because drupal.org has no project type for composer packages and using Github with Travis for tests is convenient.