Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Prepare repository migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Korbeil committed Sep 9, 2023
1 parent 6284c96 commit a1f1d81
Show file tree
Hide file tree
Showing 45 changed files with 311 additions and 283 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI
on: [push, pull_request]
jobs:
cs-check:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
- name: setup
uses: shivammathur/[email protected]
with:
php-version: 8.2
coverage: none
- name: install PHP CS Fixer
uses: ramsey/composer-install@v2
with:
composer-options: '--working-dir=tools/php-cs-fixer'
- name: 'php-cs-fixer check'
run: 'tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff'
tests:
runs-on: ubuntu-latest
name: tests
steps:
- name: checkout
uses: actions/checkout@master
- name: cache-composer
uses: actions/cache@v2
with:
path: ~/.composer/cache/
key: composer-${{ github.sha }}
- name: setup
uses: shivammathur/[email protected]
with:
php-version: 8.2
coverage: none
extensions: mbstring, fileinfo, json, intl, dom
- name: composer install
run: composer update --prefer-stable
- name: tests
run: vendor/bin/phpunit
14 changes: 0 additions & 14 deletions .github/workflows/read-only.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
Tests/Resources/app/cache
Tests/Resources/var
tests/Resources/app/cache
tests/Resources/var
composer.lock
vendor
.php-cs-fixer.cache
.phpunit.result.cache
28 changes: 28 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

$finder = (new PhpCsFixer\Finder())
->exclude('tests/Resources')
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
;

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'yoda_style' => false,
'native_constant_invocation' => false,
'no_superfluous_phpdoc_tags' => [
'remove_inheritdoc' => false,
],
'nullable_type_declaration_for_default_null_value' => false,

// Can be removed once PHP requirement is upgraded
'get_class_to_class_keyword' => false,
'modernize_strpos' => false,
])
->setFinder($finder)
;
28 changes: 0 additions & 28 deletions DependencyInjection/Compiler/ApiPlatformPass.php

This file was deleted.

22 changes: 0 additions & 22 deletions JaneAutoMapperBundle.php

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ To use it, you just have to add the main bundle class to your `config/bundles.ph
```
return [
// ...
Jane\Bundle\AutoMapper\JaneAutoMapperBundle::class => ['all' => true],
AutoMapper\Bundle\AutoMapperBundle::class => ['all' => true],
];
```

Then configure the bundle to your needs, for example:
```
jane_auto_mapper:
automapper:
autoregister: true
mappings:
- source: Jane\Bundle\AutoMapper\Tests\Fixtures\User
target: Jane\Bundle\AutoMapper\Tests\Fixtures\UserDTO
- source: AutoMapper\Bundle\Tests\Fixtures\User
target: AutoMapper\Bundle\Tests\Fixtures\UserDTO
pass: DummyApp\UserConfigurationPass
```

Possible properties:
- `normalizer` (default: `false`): A boolean which indicate if we inject the AutoMapperNormalizer;
- `cache_dir` (default: `%kernel.cache_dir%/automapper`): This settings allows you to customize the output directory for generated mappers;
- `mappings`: This option allows you to customize Mapper metadata, you have to specify `source` & `target` data types and related configuration using `pass` field.
This configuration should implements `Jane\Bundle\AutoMapper\Configuration\ConfigurationPassInterface`.
This configuration should implements `AutoMapper\Bundle\Configuration\ConfigurationPassInterface`.
- `allow_readonly_target_to_populate` (default: `false`): Will throw an exception if you use a readonly class as target to populate if set to `false`.

## Normalizer Bridge
Expand Down
128 changes: 0 additions & 128 deletions Resources/config/services.xml

This file was deleted.

7 changes: 0 additions & 7 deletions Tests/Fixtures/Cat.php

This file was deleted.

7 changes: 0 additions & 7 deletions Tests/Fixtures/Dog.php

This file was deleted.

28 changes: 12 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "jane-php/automapper-bundle",
"name": "jolicode/automapper-bundle",
"type": "library",
"description": "Jane AutoMapper Symfony Bundle",
"description": "JoliCode AutoMapper Symfony Bundle",
"keywords": ["bundle", "symfony"],
"homepage": "https://github.com/janephp/janephp",
"homepage": "https://github.com/jolicode/automapper-bundle",
"license": "MIT",
"authors": [
{
Expand All @@ -16,32 +16,28 @@
}
],
"require": {
"php": "^7.3 || ^8.0",
"php": "^8.2",
"jane-php/automapper": "^7.0"
},
"require-dev": {
"moneyphp/money": "^4.2",
"phpunit/phpunit": "^8.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0"
"symfony/framework-bundle": "^6.0"
},
"conflict": {
"symfony/framework-bundle": "5.1.0"
},
"extra": {
"branch-alias": {
"dev-next": "7-dev"
}
},
"autoload": {
"psr-4": {
"Jane\\Bundle\\AutoMapperBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
"AutoMapper\\Bundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"AutoMapper\\Bundle\\Tests\\": "src/"
},
"classmap": [
"Tests/Resources/app/AppKernel.php"
"tests/Resources/app/AppKernel.php"
]
},
"config": {
Expand Down
6 changes: 3 additions & 3 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@


<testsuites>
<testsuite name="Jane AutoMapper Bundle Test Suite">
<directory>./Tests</directory>
<testsuite name="AutoMapper Bundle Test Suite">
<directory>./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>./Tests</directory>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
Expand Down
Loading

0 comments on commit a1f1d81

Please sign in to comment.