paysera/skeleton-lib

Skeleton for new GitHub based libraries

1.0.0 2018-12-18 20:04 UTC

This package is auto-updated.

Last update: 2024-10-25 20:37:21 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

This is a skeleton for a new GitHub-based PHP library.

Following steps:

  • change composer.json file:
    • change name and description fields;
    • change namespaces;
    • change type from library to symfony-bundle if it's a Symfony bundle;
    • add keywords;
    • add any additional requirements;
  • change year (and/or author) in LICENCE if needed;
  • update this readme:
    • replace all :vendor/:package_name occurences with the vendor and name of your library;
    • read and replace TODOs in the readme;
  • change / add files in src directory, don't forget to modify namespace;
  • change / add test cases in tests directory, don't forget to modify namespace;
  • after pushing initial commit, add the library in Packagist, Travis and Scrutinizer.

With each relase:

  • you can fix code style with composer fix-cs;
  • you can run tests and code-style checks with composer test;
  • don't forget to update CHANGELOG.md.

To start a library using this skeleton:

composer create-project paysera/skeleton-lib directory-name

Following readme is just the structure for your new library and is not related to the skeleton itself.

🔴 TODO: Change this part and title with description about the library.

Why?

🔴 TODO: Explain when and why developers should use this library – it's main purpose and/or differences from other solutions.

You can also rename this to ## Features or other purpose-like header.

Remove this part if purpose is already clear from the main description.

Installation

composer require :vendor/:package_name

Configuration

🔴 TODO: explain bundle configuration or remove this part for non-bundle libraries.

paysera_something:
  field: value

Usage

🔴 TODO: Explain how to use this library. Use code samples for better understanding.

Semantic versioning

This library follows semantic versioning.

See Symfony BC rules for basic information about what can be changed and what not in the API.

🔴 TODO: Remove following part of this section or use instead of previous one. Remove irrelevant items, like twig functions, if they are not provided by your library.

This bundle follows semantic versioning.

Public API of this bundle (in other words, you should only use these features if you want to easily update to new versions):

  • only services that are not marked as public="false"
  • only classes, interfaces and class methods that are marked with @api
  • twig functions and tags
  • console commands
  • supported DIC tags

For example, if only class method is marked with @api, you should not extend that class, as constructor could change in any release.

See Symfony BC rules for basic information about what can be changed and what not in the API. Keep in mind, that in this bundle everything is @internal by default.

Running tests

composer update
composer test

Contributing

Feel free to create issues and give pull requests.

You can fix any code style issues using this command:

composer fix-cs