Skip to content

Commit

Permalink
Merge pull request #19 from IQ2i/symfony-6
Browse files Browse the repository at this point in the history
Add Symfony 6 compatibility
  • Loading branch information
loicsapone committed Oct 13, 2021
2 parents c854ebc + e5921a8 commit 6686d71
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ phpunit.xml
# ======================================================================
# PHP CS Fixer
# ======================================================================
.php_cs.cache
.php-cs-fixer.cache
7 changes: 3 additions & 4 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

$finder = PhpCsFixer\Finder::create()
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
;

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules(
[
'@PSR1' => true,
Expand All @@ -28,5 +28,4 @@
'phpdoc_types_order' => true,
]
)
->setFinder($finder)
;
->setFinder($finder);
10 changes: 5 additions & 5 deletions Reader/CsvReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

class CsvReader implements ReaderInterface
{
const CONTEXT_DELIMITER = 'csv_delimiter';
const CONTEXT_ENCLOSURE = 'csv_enclosure';
const CONTEXT_ESCAPE_CHAR = 'csv_escape_char';
const CONTEXT_HEADERS = 'csv_headers';
const CONTEXT_NO_HEADERS = 'no_headers';
public const CONTEXT_DELIMITER = 'csv_delimiter';
public const CONTEXT_ENCLOSURE = 'csv_enclosure';
public const CONTEXT_ESCAPE_CHAR = 'csv_escape_char';
public const CONTEXT_HEADERS = 'csv_headers';
public const CONTEXT_NO_HEADERS = 'no_headers';

private $dto;
private $file;
Expand Down
2 changes: 1 addition & 1 deletion Reader/XmlReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class XmlReader implements ReaderInterface
{
const CONTEXT_XPATH = 'xml_xpath';
public const CONTEXT_XPATH = 'xml_xpath';

/**
* @var null|string
Expand Down
2 changes: 1 addition & 1 deletion Tests/Processor/TestBatchProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class TestBatchProcessor implements BatchProcessorInterface
{
const BATCH_SIZE = 2;
public const BATCH_SIZE = 2;

/**
* {@inheritdoc}
Expand Down
12 changes: 7 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
}
],
"require": {
"php": "^7.2.5|^8.0",
"symfony/filesystem": "^4.0|^5.0",
"symfony/property-access": "^4.0|^5.0",
"symfony/serializer": "^4.0|^5.0"
"php": "^7.2.5 || ^8.0",
"symfony/filesystem": "^4.0 || ^5.0 || ^6.0",
"symfony/property-access": "^4.0 || ^5.0 || ^6.0",
"symfony/serializer": "^4.0 || ^5.0 || ^6.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.2",
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^8|^9"
"phpstan/phpstan": "^0.12.99",
"phpunit/phpunit": "^8 || ^9"
},
"autoload": {
"psr-4": { "IQ2i\\DataImporter\\": "" }
Expand Down

0 comments on commit 6686d71

Please sign in to comment.