Compare commits

..

No commits in common. "main" and "1.0.3" have entirely different histories.
main ... 1.0.3

2 changed files with 1 additions and 36 deletions

View File

@ -43,16 +43,6 @@ $result = $importService->import(
$logger $logger
); );
``` ```
---
## 🧑‍💻 Exemple d'Importation dans le Contrôleur
Dans votre contrôleur ou service, n'oubliez pas d'importer les classes nécessaires pour utiliser le service d'importation :
```php
use Sudalys\ImportService\CsvImportService;
use Sudalys\ImportService\ExcelFileTransformer;
```
--- ---
@ -80,21 +70,6 @@ Géré via `ExcelFileTransformer` :
--- ---
## ⚙️ Configuration du Service dans `services.yaml`
Pour que le service fonctionne correctement dans Symfony, ajoutez la configuration suivante dans votre fichier `services.yaml` :
```yaml
services:
Sudalys\ImportService\:
resource: '../vendor/sudalys/import-service/src/Service/Import/'
autowire: true
autoconfigure: true
public: false
```
---
## 🎓 Exigences ## 🎓 Exigences
- PHP >= 8.1 - PHP >= 8.1
@ -107,9 +82,3 @@ services:
MIT MIT

View File

@ -15,11 +15,7 @@ class RegexColumnSpecification implements ColumnSpecificationInterface
public function isSatisfiedBy(string $value): bool public function isSatisfiedBy(string $value): bool
{ {
if(!empty($value) || !trim($value) === '') { return preg_match($this->pattern, $value) === 1;
return preg_match($this->pattern, $value) === 1;
}else{
return true;
}
} }
public function getErrorMessage(): string public function getErrorMessage(): string