farmpublic / daplos-parser-bundle
A Symfony bundle to parse Daplos flat files.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- symfony/config: ^7.1
- symfony/dependency-injection: ^7.1
- symfony/http-kernel: ^7.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- phpstan/phpstan: ^1.12
- phpstan/phpstan-beberlei-assert: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.2
- phpstan/phpstan-phpunit: ^1.4
- phpstan/phpstan-strict-rules: ^1.6
- phpunit/phpunit: ^11.3
- symfony/phpunit-bridge: ^7.1
README
A Symfony bundle to parse Daplos flat files.
Requirements
- PHP 8.3+
- Symfony 7.1+
- Composer
Installation
composer require farmpublic/daplos-parser-bundle
Usage
To use our bundle, you need to import FarmPublic\DaplosParserBundle\DaplosParserInterface
in your controller/service/etc.
- In a controller:
use FarmPublic\DaplosParserBundle\DaplosParserInterface; class MyController { public function myAction(DaplosParserInterface $daplosParser) { $daplosParser->parse('/path/to/file.dap'); } }
- In a service:
use FarmPublic\DaplosParserBundle\DaplosParserInterface; class MyService { public function __construct( private DaplosParserInterface $daplosParser ) { } public function myAction() { $daplosParser->parse('/path/to/file.dap'); } }
- In a command:
use FarmPublic\DaplosParserBundle\DaplosParserInterface; class MyCommand extends Command { public function __construct( private DaplosParserInterface $daplosParser ) { } protected function execute(InputInterface $input, OutputInterface $output): int { $daplosParser->parse('/path/to/file.dap'); } }
Testing
To run the phpunit, phpstan and php-cs-fixer tests, run:
composer test:all
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Yoan Bernabeu - Initial work - GitHub
See also the list of contributors who participated in this project.