Skip to content

Commit

Permalink
Merge pull request #4027 from akeneo/tag-1.5.0-beta1
Browse files Browse the repository at this point in the history
Preparing 1.5.0-BETA1
  • Loading branch information
pierallard committed Feb 23, 2016
2 parents 1614271 + dd730f1 commit 4072c10
Show file tree
Hide file tree
Showing 51 changed files with 200 additions and 1,217 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG-1.5.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# 1.5.x
# 1.5.0-BETA1 (2016-02-22)

## Bug fixes

- PIM-5508: Variant group edition fix

## BC breaks

- Change constructor of `Pim\Bundle\CommentBundle\Normalizer\Structured\CommentNormalizer` to add `Pim\Component\Localization\Presenter\PresenterInterface` and `Pim\Component\Localization\LocaleResolver`
- Change constructor of `Pim\Bundle\EnrichBundle\Normalizer\VersionNormalizer` to add `Pim\Component\Localization\Presenter\PresenterInterface`
- Change constructor of `Pim\Bundle\DashboardBundle\Widget\LastOperationsWidget` to add `Pim\Component\Localization\Presenter\PresenterInterface` and `Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface`
- Removed `Pim\Bundle\EnrichBundle\AbstractController\AbstractDoctrineController` and `Pim\Bundle\EnrichBundle\AbstractController\AbstractController`.
- Change constructor of `Pim\Bundle\EnrichBundle\Filter\ProductEditDataFilter` to add `Pim\Bundle\CatalogBundle\Filter\CollectionFilterInterface` and to remove `Oro\Bundle\SecurityBundle\SecurityFacade`, `Pim\Bundle\CatalogBundle\Filter\ObjectFilterInterface`, `Pim\Component\Catalog\Repository\AttributeRepositoryInterface`, `Pim\Component\Catalog\Repository\LocaleRepositoryInterface` and `Pim\Component\Catalog\Repository\ChannelRepositoryInterface`
- Change constructor of `Pim\Bundle\EnrichBundle\MassEditAction\Operation\EditCommonAttributes` to add `Pim\Bundle\CatalogBundle\Filter\CollectionFilterInterface`
- Change constructor of `Pim\Bundle\EnrichBundle\Controller\AttributeController` to add `Pim\Bundle\CatalogBundle\Factory\AttributeFactory`
- Change constructor of `Pim\Bundle\EnrichBundle\Controller\AttributeOptionController` to add `Pim\Bundle\CatalogBundle\Repository\AttributeRepositoryInterface`
- Change constructor of `Pim\Bundle\TransformBundle\Transformer\AttributeTransformer` to remove `Pim\Bundle\CatalogBundle\Manager\AttributeManager` and add `Pim\Bundle\CatalogBundle\Factory\AttributeFactory`

# 1.5.0-ALPHA1 (2016-01-26)

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,36 @@ Practically, it means the Akeneo PIM bundles are present in the src/ directory.
If you want to contribute to the Akeneo PIM (and we will be pleased if you do!), you can fork
this repository and submit a pull request.

| [Master][Master] | [1.4][1.4] | [1.3][1.3] | [1.2][1.2] |
| [Master][Master] | [1.5][1.5] | [1.4][1.4] | [1.3][1.3] |
|:----------------:|:----------:|:----------:|:----------:|
| [![Build status][Master image]][Master] | [![Build status][1.4 image]][1.4] | [![Build status][1.3 image]][1.3] | [![Build status][1.2 image]][1.2] |
| [![Build status][Master image]][Master] | [![Build status][1.5 image]][1.5] | [![Build status][1.4 image]][1.4] | [![Build status][1.3 image]][1.3] |

[Master image]: https://travis-ci.org/akeneo/pim-community-dev.svg
[Master]: https://travis-ci.org/akeneo/pim-community-dev/tree/master
[1.5 image]: https://travis-ci.org/akeneo/pim-community-dev.svg?branch=1.5
[1.5]: https://github.com/akeneo/pim-community-dev/tree/1.5
[1.4 image]: https://travis-ci.org/akeneo/pim-community-dev.svg?branch=1.4
[1.4]: https://github.com/akeneo/pim-community-dev/tree/1.4
[1.3 image]: https://travis-ci.org/akeneo/pim-community-dev.svg?branch=1.3
[1.3]: https://github.com/akeneo/pim-community-dev/tree/1.3
[1.2 image]: https://travis-ci.org/akeneo/pim-community-dev.svg?branch=1.2
[1.2]: https://github.com/akeneo/pim-community-dev/tree/1.2

[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/akeneo/pim-community-dev/badges/quality-score.png?s=05ef3d5d2bbfae2f9a659060b21711d275f0c1ff)](https://scrutinizer-ci.com/g/akeneo/pim-community-dev/)

Application Technical Information
---------------------------------

The following documentation is designed for both clients and partners and provides all technical information required to define required server(s) to run Akeneo PIM application and check that end users workstation is compatible with Akeneo PIM application:
http://docs.akeneo.com/1.4/reference/technical_information/index.html
http://docs.akeneo.com/1.5/reference/technical_information/index.html

Installation instructions
-------------------------

To install Akeneo PIM for a PIM project or for evaluation, please follow:
http://docs.akeneo.com/1.4/developer_guide/installation/installation_workstation.html
http://docs.akeneo.com/1.5/developer_guide/installation/installation_workstation.html

Upgrade instructions
--------------------

To upgrade Akeneo PIM to a newer version, please follow:
http://docs.akeneo.com/1.4/developer_guide/migration/index.html
http://docs.akeneo.com/1.5/developer_guide/migration/index.html

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@
}
},
"branch-alias": {
"dev-master": "1.5.x-dev",
"dev-master": "1.6.x-dev",
"dev-1.5": "1.5.x-dev",
"dev-1.4": "1.4.x-dev",
"dev-1.3": "1.3.x-dev",
"dev-1.2": "1.2.x-dev",
Expand Down
14 changes: 9 additions & 5 deletions features/Context/FixturesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use League\Flysystem\MountManager;
use Oro\Bundle\UserBundle\Entity\Role;
use Pim\Behat\Context\FixturesContext as BaseFixturesContext;
use Pim\Bundle\CatalogBundle\AttributeType\AttributeTypes;
use Pim\Bundle\CatalogBundle\Doctrine\Common\Saver\ProductSaver;
use Pim\Bundle\CatalogBundle\Entity\AssociationType;
use Pim\Bundle\CatalogBundle\Entity\AttributeOption;
Expand Down Expand Up @@ -1265,12 +1266,15 @@ public function iSetProductFamilyTo($identifier, $family)
public function iDeleteProductMediaFromFilesystem($productName)
{
$product = $this->getProduct($productName);
$allMedia = $product->getMedia();
$mountManager = $this->getMountManager();
foreach ($allMedia as $media) {
if (null !== $media) {
$fs = $mountManager->getFilesystem($media->getStorage());
$fs->delete($media->getKey());

foreach ($product->getValues() as $value) {
if (in_array($value->getAttribute()->getAttributeType(), [AttributeTypes::IMAGE, AttributeTypes::FILE])) {
$media = $value->getData();
if (null !== $media) {
$fs = $mountManager->getFilesystem($media->getStorage());
$fs->delete($media->getKey());
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pim-community-dev",
"version": "1.4.0",
"version": "1.5.0",
"description": "Akeneo PIM Application",
"homepage": "http://www.akeneo.com",
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
use Akeneo\Component\Batch\Model\StepExecution;
use Akeneo\Component\FileStorage\Model\FileInfoInterface;
use PhpSpec\ObjectBehavior;
use Pim\Bundle\CatalogBundle\AttributeType\AttributeTypes;
use Pim\Bundle\CatalogBundle\Manager\ChannelManager;
use Pim\Component\Catalog\Model\AttributeInterface;
use Pim\Component\Catalog\Model\ChannelInterface;
use Pim\Component\Catalog\Model\ProductInterface;
use Pim\Component\Catalog\Model\ProductValueInterface;
use Pim\Component\Catalog\Repository\LocaleRepositoryInterface;
use Prophecy\Argument;
use Symfony\Component\Serializer\SerializerInterface;
Expand Down Expand Up @@ -104,8 +107,8 @@ function it_increments_summary_info_including_header(
) {
$products = [$product1, $product2];

$product1->getMedia()->willReturn([]);
$product2->getMedia()->willReturn([]);
$product1->getValues()->willReturn([]);
$product2->getValues()->willReturn([]);

$stepExecution->addSummaryInfo('write', 1)->shouldBeCalled();

Expand All @@ -129,8 +132,8 @@ function it_increments_summary_info_excluding_header(
) {
$products = [$product1, $product2];

$product1->getMedia()->willReturn([]);
$product2->getMedia()->willReturn([]);
$product1->getValues()->willReturn([]);
$product2->getValues()->willReturn([]);

$stepExecution->addSummaryInfo('write', 2)->shouldBeCalled();

Expand All @@ -151,12 +154,29 @@ function it_processes_items_with_media(
ProductInterface $product2,
FileInfoInterface $media1,
FileInfoInterface $media2,
ChannelInterface $channel
ChannelInterface $channel,
ProductValueInterface $value1,
ProductValueInterface $value2,
ProductValueInterface $value3,
AttributeInterface $attribute1,
AttributeInterface $attribute2,
AttributeInterface $attribute3
) {
$products = [$product1, $product2];

$product1->getMedia()->willReturn([$media1]);
$product2->getMedia()->willReturn([$media2]);
$product1->getValues()->willReturn([$value1]);
$product2->getValues()->willReturn([$value2, $value3]);

$value1->getAttribute()->willReturn($attribute1);
$value2->getAttribute()->willReturn($attribute2);
$value3->getAttribute()->willReturn($attribute3);

$attribute1->getAttributeType()->willReturn(AttributeTypes::IMAGE);
$attribute2->getAttributeType()->willReturn(AttributeTypes::FILE);
$attribute3->getAttributeType()->willReturn(AttributeTypes::TEXT);

$value1->getData()->willReturn($media1);
$value2->getData()->willReturn($media2);

$channelManager->getChannelByCode('mobile')->willReturn($channel);
$channel->getLocaleCodes()->willReturn('en-US');
Expand All @@ -179,8 +199,8 @@ function it_processes_items_without_media(
) {
$products = [$product1, $product2];

$product1->getMedia()->willReturn([]);
$product2->getMedia()->willReturn([]);
$product1->getValues()->willReturn([]);
$product2->getValues()->willReturn([]);

$channelManager->getChannelByCode('mobile')->willReturn($channel);
$channel->getLocaleCodes()->willReturn('en-US');
Expand All @@ -200,7 +220,7 @@ function it_processes_items_even_if_it_is_not_an_array(
ProductInterface $product,
ChannelInterface $channel
) {
$product->getMedia()->willReturn([]);
$product->getValues()->willReturn([]);

$channelManager->getChannelByCode('mobile')->willReturn($channel);
$channel->getLocaleCodes()->willReturn('en-US');
Expand Down
11 changes: 0 additions & 11 deletions spec/Pim/Bundle/CatalogBundle/Manager/AttributeManagerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ function let(
);
}

function it_instantiates_an_attribute($factory, AttributeInterface $attribute)
{
$factory->createAttribute(null)->willReturn($attribute);
$this->createAttribute()->shouldReturn($attribute);
}

function it_provides_the_attribute_class_used()
{
$this->getAttributeClass()->shouldReturn(self::ATTRIBUTE_CLASS);
}

function it_provides_the_list_of_attribute_types($registry)
{
$registry->getAliases()->willReturn(['foo', 'bar']);
Expand Down
34 changes: 0 additions & 34 deletions spec/Pim/Bundle/CatalogBundle/Manager/CategoryManagerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,43 +25,9 @@ function let(
$objectManager->getRepository(self::CATEGORY_CLASS)->willReturn($categoryRepository);
}

function it_provides_object_manager($objectManager)
{
$this->getObjectManager()->shouldReturn($objectManager);
}

function it_instantiates_a_category()
{
$this->getCategoryInstance()->shouldReturnAnInstanceOf(self::CATEGORY_CLASS);
}

function it_instantiates_a_tree(CategoryInterface $tree)
{
$this->getCategoryInstance()->shouldReturnAnInstanceOf(self::CATEGORY_CLASS);
}

function it_provides_the_category_class_name()
{
$this->getCategoryClass()->shouldReturn(self::CATEGORY_CLASS);
}

function it_provides_the_category_repository($objectManager, $categoryRepository)
{
$objectManager->getRepository(self::CATEGORY_CLASS)->willReturn($categoryRepository);
$this->getEntityRepository()->shouldReturn($categoryRepository);
}

function it_provides_a_category_from_his_code($categoryRepository, CategoryInterface $category)
{
$categoryRepository->findOneBy(['code' => 'bar'])->willReturn($category);

$this->getCategoryByCode('bar');
}

function it_provides_a_tree_from_his_code($categoryRepository, CategoryInterface $tree)
{
$categoryRepository->findOneBy(['code' => 'foo', 'parent' => null])->willReturn($tree);

$this->getTreeByCode('foo')->shouldReturn($tree);
}
}

This file was deleted.

Loading

0 comments on commit 4072c10

Please sign in to comment.