Skip to content

Commit

Permalink
Merge with release branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrebenchuk committed Aug 29, 2013
2 parents a4978e5 + e2eddc6 commit 66e57da
Show file tree
Hide file tree
Showing 866 changed files with 50,732 additions and 11,001 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
CHANGELOG for 1.0.0-alpha5
===================
This changelog references the relevant changes (new features, changes and bugs) done in 1.0.0-alpha5 versions.

* 1.0.0-alpha5 (2013-08-29)
* Custom entity creation
* Cron Job
* Record ownership
* Grid Improvements
* Filter Improvements
* Email Template Improvements
* Implemented extractor for messages in PHP code
* Removed dependency on SonataAdminBundle
* Added possibility to unpin page using pin icon

CHANGELOG for 1.0.0-alpha4
===================
This changelog references the relevant changes (new features, changes and bugs) done in 1.0.0-alpha4 versions.
Expand Down
4 changes: 2 additions & 2 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
UPGRADE FROM 1.0.0-alpha2 to 1.0.0-alpha3
UPGRADE FROM 1.0.0-alpha versions
=======================

### General

* Upgrade to 1.0.0-alpha3 is not supported and full reinstall is required
* Upgrade to any 1.0.0-alpha is not supported and full reinstall is required

16 changes: 5 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"doctrine/doctrine-fixtures-bundle": "@dev",
"twig/extensions": "1.0.*@dev",
"symfony/assetic-bundle": "2.3.*@dev",
"symfony/swiftmailer-bundle": "2.3.2",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
Expand All @@ -36,23 +36,17 @@
"ddeboer/data-import": "dev-master",
"stof/doctrine-extensions-bundle": "dev-master",
"escapestudios/wsse-authentication-bundle": "2.1.x-dev",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"liip/imagine-bundle": "dev-master",
"leafo/lessphp": "dev-master",
"willdurand/expose-translation-bundle": "0.2.*@dev",
"apy/jsfv-bundle": "dev-master",
"genemu/form-bundle": "2.2.*",
"a2lix/translation-form-bundle" : "1.0@dev"
"a2lix/translation-form-bundle" : "1.*@dev"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/orocrm/SonataAdminBundle.git"
}
],
"autoload": {
"psr-0": { "Oro\\Bundle": "src/" }
"psr-0": {
"Oro\\Bundle": "src/"
}
},
"minimum-stability": "dev",
"extra": {
Expand Down
5 changes: 3 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
processIsolation = "false"
stopOnFailure = "false"
syntaxCheck = "false"
bootstrap = "tests/bootstrap.php">
bootstrap = "tests/bootstrap.php"
>
<testsuites>
<testsuite name="Project Unit Tests">
<directory suffix="Test.php">src/*/Bundle/*Bundle/Tests/Unit</directory>
<directory suffix="Test.php">src/Oro/Bundle/*Bundle/Tests/Unit</directory>
</testsuite>
</testsuites>

Expand Down
15 changes: 0 additions & 15 deletions src/Oro/Bundle/AddressBundle/AttributeType/AddressType.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

namespace Oro\Bundle\AddressBundle\Controller\Api\Rest;

use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\Response;

use FOS\RestBundle\Controller\Annotations\NamePrefix;
use FOS\RestBundle\Controller\Annotations\RouteResource;
use FOS\RestBundle\Controller\Annotations\QueryParam;
use FOS\RestBundle\Routing\ClassResourceInterface;

use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Oro\Bundle\UserBundle\Annotation\Acl;

use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\Response;
use FOS\RestBundle\Routing\ClassResourceInterface;
use Oro\Bundle\UserBundle\Annotation\Acl;
use Oro\Bundle\SoapBundle\Form\Handler\ApiFormHandler;
use Oro\Bundle\SoapBundle\Controller\Api\Rest\FlexibleRestController;
use Oro\Bundle\SoapBundle\Controller\Api\Rest\RestController;
use Oro\Bundle\AddressBundle\Entity\Manager\AddressManager;

/**
Expand All @@ -25,7 +27,7 @@
* parent="root"
* )
*/
class AddressController extends FlexibleRestController implements ClassResourceInterface
class AddressController extends RestController implements ClassResourceInterface
{
/**
* REST GET list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class AddressTypeController extends FOSRestController implements ClassResourceIn
*/
public function cgetAction()
{
/** @var $item AddressType */
$items = $this->getDoctrine()->getRepository('OroAddressBundle:AddressType')->findAll();

return $this->handleView(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
use Symfony\Component\Form\FormInterface;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;

use Oro\Bundle\SoapBundle\Controller\Api\Soap\FlexibleSoapController;
use Oro\Bundle\SoapBundle\Entity\Manager\ApiFlexibleEntityManager;
use Oro\Bundle\SoapBundle\Controller\Api\Soap\SoapController;
use Oro\Bundle\SoapBundle\Entity\Manager\ApiEntityManager;
use Oro\Bundle\SoapBundle\Form\Handler\ApiFormHandler;
use Oro\Bundle\UserBundle\Annotation\AclAncestor;

class AddressController extends FlexibleSoapController
class AddressController extends SoapController
{
/**
* @Soap\Method("getAddresses")
Expand All @@ -37,8 +37,8 @@ public function getAction($id)

/**
* @Soap\Method("createAddress")
* @Soap\Param("address", phpType = "Oro\Bundle\AddressBundle\Entity\AddressSoap")
* @Soap\Result(phpType = "boolean")
* @Soap\Param("address", phpType = "Oro\Bundle\AddressBundle\Entity\Address")
* @Soap\Result(phpType = "int")
* @AclAncestor("oro_address_create")
*/
public function createAction($address)
Expand All @@ -49,7 +49,7 @@ public function createAction($address)
/**
* @Soap\Method("updateAddress")
* @Soap\Param("id", phpType = "int")
* @Soap\Param("address", phpType = "Oro\Bundle\AddressBundle\Entity\AddressSoap")
* @Soap\Param("address", phpType = "Oro\Bundle\AddressBundle\Entity\Address")
* @Soap\Result(phpType = "boolean")
* @AclAncestor("oro_address_edit")
*/
Expand All @@ -70,7 +70,7 @@ public function deleteAction($id)
}

/**
* @return ApiFlexibleEntityManager
* @return ApiEntityManager
*/
public function getManager()
{
Expand Down
93 changes: 78 additions & 15 deletions src/Oro/Bundle/AddressBundle/Entity/AbstractAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
namespace Oro\Bundle\AddressBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation\Type;

use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;

use Oro\Bundle\FlexibleEntityBundle\Entity\Mapping\AbstractEntityFlexible;
use Oro\Bundle\FlexibleEntityBundle\Model\FlexibleValueInterface;
use Symfony\Component\Validator\ExecutionContext;

/**
* Address
*
* @ORM\MappedSuperclass
* @ORM\HasLifecycleCallbacks
*
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
*/
abstract class AbstractAddress extends AbstractEntityFlexible
abstract class AbstractAddress implements EmptyItem
{
/**
* @var integer
Expand Down Expand Up @@ -109,6 +110,20 @@ abstract class AbstractAddress extends AbstractEntityFlexible
*/
protected $lastName;

/**
* @var \DateTime $created
*
* @ORM\Column(type="datetime")
*/
protected $created;

/**
* @var \DateTime $updated
*
* @ORM\Column(type="datetime")
*/
protected $updated;

/**
* Get id
*
Expand All @@ -119,6 +134,16 @@ public function getId()
return $this->id;
}

/**
* Set id
*
* @param int $id
*/
public function setId($id)
{
$this->id = $id;
}

/**
* Set label
*
Expand All @@ -145,7 +170,7 @@ public function getLabel()
/**
* Set street
*
* @param string $street
* @param string $street
* @return AbstractAddress
*/
public function setStreet($street)
Expand All @@ -168,7 +193,7 @@ public function getStreet()
/**
* Set street2
*
* @param string $street2
* @param string $street2
* @return AbstractAddress
*/
public function setStreet2($street2)
Expand All @@ -191,7 +216,7 @@ public function getStreet2()
/**
* Set city
*
* @param string $city
* @param string $city
* @return AbstractAddress
*/
public function setCity($city)
Expand Down Expand Up @@ -274,7 +299,7 @@ public function getUniversalState()
/**
* Set postal_code
*
* @param string $postalCode
* @param string $postalCode
* @return AbstractAddress
*/
public function setPostalCode($postalCode)
Expand All @@ -297,7 +322,7 @@ public function getPostalCode()
/**
* Set country
*
* @param Country $country
* @param Country $country
* @return AbstractAddress
*/
public function setCountry($country)
Expand Down Expand Up @@ -374,6 +399,16 @@ public function getCreatedAt()
return $this->created;
}

/**
* Set address created date/time
*
* @param \DateTime $created
*/
public function setCreatedAt(\DateTime $created)
{
$this->created = $created;
}

/**
* Get address last update date/time
*
Expand All @@ -384,6 +419,16 @@ public function getUpdatedAt()
return $this->updated;
}

/**
* Set address updated date/time
*
* @param \DateTime $updated
*/
public function setUpdatedAt(\DateTime $updated)
{
$this->updated = $updated;
}

/**
* Pre persist event listener
*
Expand Down Expand Up @@ -440,7 +485,7 @@ public function __toString()
*/
public function isEmpty()
{
$isEmpty = empty($this->label)
return empty($this->label)
&& empty($this->firstName)
&& empty($this->lastName)
&& empty($this->street)
Expand All @@ -450,11 +495,29 @@ public function isEmpty()
&& empty($this->stateText)
&& empty($this->country)
&& empty($this->postalCode);
/** @var FlexibleValueInterface $value */
foreach ($this->values as $value) {
$flexibleValue = $value->getData();
$isEmpty = $isEmpty && empty($flexibleValue);
}

/**
* @param mixed $other
* @return bool
*/
public function isEqual($other)
{
$class = get_class($this);

if (!$other instanceof $class) {
return false;
}
return $isEmpty;

/** @var AbstractAddress $other */
if ($this->getId() && $other->getId()) {
return $this->getId() == $other->getId();
}

if ($this->getId() || $other->getId()) {
return false;
}

return $this === $other;
}
}
Loading

0 comments on commit 66e57da

Please sign in to comment.