Skip to content

Commit

Permalink
Rename eZ Platform to Ibexa
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Feb 21, 2022
1 parent 2b5c248 commit f2d2c93
Show file tree
Hide file tree
Showing 21 changed files with 126 additions and 95 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/coding_standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Coding standards

on:
push:
branches:
- 'master'
- '[0-9].[0-9]+'
pull_request: ~

jobs:
php-cs-fixer:
name: PHP CS Fixer
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: OskarStark/php-cs-fixer-ga@master
with:
args: --diff --dry-run
52 changes: 52 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Tests

on:
push:
branches:
- 'master'
- '[0-9].[0-9]+'
pull_request: ~

jobs:
tests:
name: ${{ matrix.php }} / ${{ matrix.symfony }} / ${{ matrix.phpunit }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0', '8.1']
symfony: ['~5.4.0']
phpunit: ['phpunit.xml']
deps: ['normal']
include:
- php: '7.4'
symfony: '~5.4.0'
phpunit: 'phpunit.xml'
deps: 'low'

steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- run: composer --version
- run: composer validate --strict

# Install Flex as a global dependency to enable usage of extra.symfony.require
# while keeping Flex recipes from applying
- run: composer global require --no-scripts symfony/flex

- run: composer config extra.symfony.require ${{ matrix.symfony }}

-
run: composer update --prefer-dist
if: ${{ matrix.deps != 'low' }}

-
run: composer update --prefer-dist --prefer-lowest --prefer-stable
if: ${{ matrix.deps == 'low' }}

- run: vendor/bin/phpunit -c ${{ matrix.phpunit }} --colors=always
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ var/
composer.phar
composer.lock
phpunit.phar
.php_cs.cache
.php-cs-fixer.cache
.phpunit.result.cache
2 changes: 1 addition & 1 deletion .php_cs → .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PhpCsFixer' => true,
Expand Down
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Core/FieldType/ContentTypeList/FormMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList;

use EzSystems\EzPlatformContentForms\Data\Content\FieldData;
use EzSystems\EzPlatformContentForms\FieldType\FieldValueFormMapperInterface;
use Ibexa\Contracts\ContentForms\Data\Content\FieldData;
use Ibexa\Contracts\ContentForms\FieldType\FieldValueFormMapperInterface;
use Netgen\Bundle\ContentTypeListBundle\Form\Type\FieldType\ContentTypeListFieldType;
use Symfony\Component\Form\FormInterface;

Expand Down
20 changes: 10 additions & 10 deletions Core/FieldType/ContentTypeList/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList;

use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition;
use eZ\Publish\Core\Base\Exceptions\InvalidArgumentType;
use eZ\Publish\Core\FieldType\FieldType;
use eZ\Publish\Core\FieldType\Value as BaseValue;
use eZ\Publish\SPI\FieldType\Value as SPIValue;
use Ibexa\Contracts\Core\FieldType\Value as SPIValue;
use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition;
use Ibexa\Core\Base\Exceptions\InvalidArgumentType;
use Ibexa\Core\FieldType\FieldType;
use Ibexa\Core\FieldType\Value as BaseValue;
use function is_array;
use function is_string;

Expand All @@ -25,7 +25,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin
}

/**
* @return \eZ\Publish\SPI\FieldType\Value|\Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value
* @return \Ibexa\Contracts\Core\FieldType\Value|\Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value
*/
public function getEmptyValue(): SPIValue
{
Expand All @@ -35,7 +35,7 @@ public function getEmptyValue(): SPIValue
/**
* @param mixed $hash
*
* @return \eZ\Publish\SPI\FieldType\Value|\Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value
* @return \Ibexa\Contracts\Core\FieldType\Value|\Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value
*/
public function fromHash($hash): SPIValue
{
Expand All @@ -56,7 +56,7 @@ public function fromHash($hash): SPIValue
}

/**
* @param \eZ\Publish\SPI\FieldType\Value|\Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value $value
* @param \Ibexa\Contracts\Core\FieldType\Value|\Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value $value
*
* @return mixed
*/
Expand All @@ -66,7 +66,7 @@ public function toHash(SPIValue $value)
}

/**
* @param \eZ\Publish\SPI\FieldType\Value|\Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value $value
* @param \Ibexa\Contracts\Core\FieldType\Value|\Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value $value
*/
public function isEmptyValue(SPIValue $value): bool
{
Expand All @@ -89,7 +89,7 @@ protected function createValueFromInput($inputValue)
}

/**
* @param \eZ\Publish\Core\FieldType\Value|\Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value $value
* @param \Ibexa\Core\FieldType\Value|\Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value $value
*/
protected function checkValueStructure(BaseValue $value): void
{
Expand Down
2 changes: 1 addition & 1 deletion Core/FieldType/ContentTypeList/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList;

use eZ\Publish\Core\FieldType\Value as BaseValue;
use Ibexa\Core\FieldType\Value as BaseValue;
use function implode;

final class Value extends BaseValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Netgen\Bundle\ContentTypeListBundle\Core\Persistence\Legacy\Content\FieldValue\Converter;

use eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter;
use eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition;
use eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue;
use eZ\Publish\SPI\Persistence\Content\FieldValue;
use eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition;
use Ibexa\Contracts\Core\Persistence\Content\FieldValue;
use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition;
use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter;
use Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition;
use Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue;
use function explode;
use function implode;
use function trim;
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/NetgenContentTypeListExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public function load(array $configs, ContainerBuilder $container): void

public function prepend(ContainerBuilder $container): void
{
$configFile = __DIR__ . '/../Resources/config/ezplatform.yaml';
$configFile = __DIR__ . '/../Resources/config/ibexa.yaml';
$config = Yaml::parse(file_get_contents($configFile));
$container->prependExtensionConfig('ezpublish', $config);
$container->prependExtensionConfig('ibexa', $config);
$container->addResource(new FileResource($configFile));
}
}
12 changes: 6 additions & 6 deletions Form/Type/FieldType/ContentTypeListFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Netgen\Bundle\ContentTypeListBundle\Form\Type\FieldType;

use eZ\Publish\API\Repository\ContentTypeService;
use eZ\Publish\API\Repository\FieldTypeService;
use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition;
use Ibexa\Contracts\Core\Repository\ContentTypeService;
use Ibexa\Contracts\Core\Repository\FieldTypeService;
use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
Expand All @@ -16,12 +16,12 @@
final class ContentTypeListFieldType extends AbstractType
{
/**
* @var \eZ\Publish\API\Repository\ContentTypeService
* @var \Ibexa\Contracts\Core\Repository\ContentTypeService
*/
private $contentTypeService;

/**
* @var \eZ\Publish\API\Repository\FieldTypeService
* @var \Ibexa\Contracts\Core\Repository\FieldTypeService
*/
private $fieldTypeService;

Expand Down Expand Up @@ -62,7 +62,7 @@ public function getParent(): string
}

/**
* Returns all content types from eZ Platform.
* Returns all content types from Ibexa Platform.
*
* @return array<string, string[]>
*/
Expand Down
6 changes: 3 additions & 3 deletions Form/Type/FieldType/FieldValueTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

namespace Netgen\Bundle\ContentTypeListBundle\Form\Type\FieldType;

use eZ\Publish\API\Repository\FieldType;
use eZ\Publish\SPI\FieldType\Value;
use Ibexa\Contracts\Core\FieldType\Value;
use Ibexa\Contracts\Core\Repository\FieldType;
use Symfony\Component\Form\DataTransformerInterface;

final class FieldValueTransformer implements DataTransformerInterface
{
/**
* @var \eZ\Publish\API\Repository\FieldType
* @var \Ibexa\Contracts\Core\Repository\FieldType
*/
private $fieldType;

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
Netgen ContentType List Bundle
==============================

[![Build Status](https://img.shields.io/travis/netgen/NetgenContentTypeListBundle.svg?style=flat-square)](https://travis-ci.com/netgen/NetgenContentTypeListBundle)
[![Code Coverage](https://img.shields.io/codecov/c/github/netgen/NetgenContentTypeListBundle.svg?style=flat-square)](https://codecov.io/gh/netgen/NetgenContentTypeListBundle)
[![Downloads](https://img.shields.io/packagist/dt/netgen/content-type-list-bundle.svg?style=flat-square)](https://packagist.org/packages/netgen/content-type-list-bundle)
[![Latest stable](https://img.shields.io/packagist/v/netgen/content-type-list-bundle.svg?style=flat-square)](https://packagist.org/packages/netgen/content-type-list-bundle)
[![License](https://img.shields.io/github/license/netgen/NetgenContentTypeListBundle.svg?style=flat-square)](LICENSE)

Netgen ContentType List Bundle is an eZ Platform bundle that provides a field type to select and store a list of content type identifiers.
Netgen ContentType List Bundle is an Ibexa Platform bundle that provides a field type to select and store a list of content type identifiers.

License and installation instructions
-------------------------------------
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions Resources/config/services.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
services:
netgen_class_list.field_type:
class: Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Type
parent: ezpublish.fieldType
parent: Ibexa\Core\FieldType\FieldType
tags:
- { name: ezplatform.field_type, alias: ngclasslist }
- { name: ibexa.field_type, alias: ngclasslist }

netgen_class_list.field_type.indexable:
class: eZ\Publish\Core\FieldType\Unindexed
class: Ibexa\Core\FieldType\Unindexed
tags:
- { name: ezplatform.field_type.indexable, alias: ngclasslist }
- { name: ibexa.field_type.indexable, alias: ngclasslist }

netgen_class_list.field_type.legacy.converter:
class: Netgen\Bundle\ContentTypeListBundle\Core\Persistence\Legacy\Content\FieldValue\Converter\ContentTypeListConverter
tags:
- { name: ezplatform.field_type.legacy_storage.converter, alias: ngclasslist }
- { name: ibexa.field_type.storage.legacy.converter, alias: ngclasslist }

netgen_class_list.field_type.form_mapper:
class: Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\FormMapper
tags:
- { name: ezplatform.field_type.form_mapper.value, fieldType: ngclasslist }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ngclasslist }

netgen_class_list.field_type.form:
class: Netgen\Bundle\ContentTypeListBundle\Form\Type\FieldType\ContentTypeListFieldType
arguments:
- "@ezpublish.api.service.content_type"
- "@ezpublish.api.service.field_type"
- "@ibexa.api.service.content_type"
- "@ibexa.api.service.field_type"
tags:
- { name: form.type }
4 changes: 2 additions & 2 deletions Resources/doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Netgen Content Type List Bundle installation instructions
Requirements
------------

* eZ Platform 3+
* Ibexa Platform 4+

Installation steps
------------------
Expand Down Expand Up @@ -35,7 +35,7 @@ return [

### Clear the caches

Clear eZ Platform caches.
Clear Ibexa Platform caches.

```bash
php bin/console cache:clear
Expand Down
6 changes: 3 additions & 3 deletions Tests/Core/FieldType/ContentTypeList/TypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Netgen\Bundle\ContentTypeListBundle\Tests\Core\FieldType\ContentTypeList;

use eZ\Publish\Core\Base\Exceptions\InvalidArgumentType;
use eZ\Publish\Core\FieldType\FieldType;
use eZ\Publish\Core\Repository\Values\ContentType\FieldDefinition;
use Ibexa\Core\Base\Exceptions\InvalidArgumentType;
use Ibexa\Core\FieldType\FieldType;
use Ibexa\Core\Repository\Values\ContentType\FieldDefinition;
use Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Type;
use Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion Tests/Core/FieldType/ContentTypeList/ValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Netgen\Bundle\ContentTypeListBundle\Tests\Core\FieldType\ContentTypeList;

use eZ\Publish\Core\FieldType\Value as BaseValue;
use Ibexa\Core\FieldType\Value as BaseValue;
use Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value;
use PHPUnit\Framework\TestCase;

Expand Down
Loading

0 comments on commit f2d2c93

Please sign in to comment.