A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://flow-php.com/documentation/contributing/guidelines below:

Documentation - Flow PHP - Data Processing Framework

#Project Documentation

The project includes several levels of documentation, including:

#Project structure

This project is developed as a monorepo, which means that it contains multiple packages in a single repository. The project is structured as follows:

├── bin
├── build
├── documentation
├── examples
├── phpdoc
├── src
│   ├── adapter
│   ├── bridge
│   ├── cli
│   ├── core
│   ├── functions.php
│   ├── lib
│   └── tools
├── tools
├── var
├── vendor
└── web
    └── landing
#Monorepo packages

Each package is structured in a very similar way, with the following structure:

src/core
└── etl
    ├── CONTRIBUTING.md
    ├── LICENSE
    ├── README.md
    ├── composer.json
    ├── src
    │   └── Flow
    └── tests
        └── Flow

Tests are usually divided into:

In some cases on that level, there might be some test helpers, like:

#Packages Dependencies

The rule is that we should keep as few dependencies as possible. But when we are adding dependency, it should be as wide as possible, so we don't block other projects by our constraints.

Packages from this monorepo can depend on each other, but ther are strict rules about that:

The above rules apply also on namespaces. So for example Adapter for CSV can't depend on Parquet adapter.

#PHP Versions

This project supports only the latest three PHP versions, for example: 8.2, 8.3, and 8.4. (assuming that 8.4 is the latest version). Development is done using the lowest supported version, which is currently PHP 8.2. The project is tested against all three versions, so you can use any of them for development.

#Tools

There are several tools used in this project to help with development, testing, and building the project. Most of them are available as Composer scripts, so you can run them using composer <script-name>.

#Coding Standards

The whole project is developed as an object oriented code, with a focus on clean code principles. The coding standards are defined and automatically enforced by the PHP CS Fixer and Rector.

Each package comes with a DSL (Domain Specific Language) that provides an easy, functional API. All functions defined in DSL (usually in functions.php files) are following the same codding standards as PHP code. snake_case is used for function names and arguments in DSL. The only other place where snake_case is used is in the tests, where it is used for test method names.

To make sure, that the whole project is aligned with the codding standards, run following commands:

composer cs:php:fix
composer static:analyze

Only when both commands pass, you should commit your changes.

#Testing

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4