Skip to content

Commit

Permalink
Merge pull request #20 from networkteam/remove-reserved-keyword-in-na…
Browse files Browse the repository at this point in the history
…mespaces

Bugfix: Remove reserved keyword String in class namespaces
  • Loading branch information
ger4003 authored Nov 28, 2019
2 parents 057ada1 + fdd725a commit 3260524
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Classes/Fusion/ConvertEmailLinksImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
use Neos\Flow\Annotations as Flow;
use Neos\Fusion\FusionObjects\AbstractFusionObject;
use Networkteam\Neos\MailObfuscator\Exception;
use Networkteam\Neos\MailObfuscator\String\Converter\EmailLinkNameConverterInterface;
use Networkteam\Neos\MailObfuscator\String\Converter\MailtoLinkConverterInterface;
use Networkteam\Neos\MailObfuscator\Converter\EmailLinkNameConverterInterface;
use Networkteam\Neos\MailObfuscator\Converter\MailtoLinkConverterInterface;

class ConvertEmailLinksImplementation extends AbstractFusionObject
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Networkteam\Neos\MailObfuscator\String\Converter;
namespace Networkteam\Neos\MailObfuscator\Converter;

/*
* Copyright (C) 2014 networkteam GmbH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Networkteam\Neos\MailObfuscator\String\Converter;
namespace Networkteam\Neos\MailObfuscator\Converter;

/*
* Copyright (C) 2014 networkteam GmbH
Expand Down
2 changes: 1 addition & 1 deletion Classes/String/Converter/MailtoLinkConverterInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Networkteam\Neos\MailObfuscator\String\Converter;
namespace Networkteam\Neos\MailObfuscator\Converter;

/*
* Copyright (C) 2014 networkteam GmbH
Expand Down
2 changes: 1 addition & 1 deletion Classes/String/Converter/RewriteAtCharConverter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Networkteam\Neos\MailObfuscator\String\Converter;
namespace Networkteam\Neos\MailObfuscator\Converter;

use Neos\Flow\Annotations as Flow;

Expand Down
8 changes: 4 additions & 4 deletions Configuration/Objects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
# You should have received a copy of the GNU General Public License along with this program; if not, write to the
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

'Networkteam\Neos\MailObfuscator\String\Converter\EmailLinkNameConverterInterface':
className: 'Networkteam\Neos\MailObfuscator\String\Converter\RewriteAtCharConverter'
'Networkteam\Neos\MailObfuscator\Converter\EmailLinkNameConverterInterface':
className: 'Networkteam\Neos\MailObfuscator\Converter\RewriteAtCharConverter'

'Networkteam\Neos\MailObfuscator\String\Converter\MailtoLinkConverterInterface':
className: 'Networkteam\Neos\MailObfuscator\String\Converter\Mailto2HrefObfuscatingConverter'
'Networkteam\Neos\MailObfuscator\Converter\MailtoLinkConverterInterface':
className: 'Networkteam\Neos\MailObfuscator\Converter\Mailto2HrefObfuscatingConverter'
26 changes: 26 additions & 0 deletions Migrations/Code/Version20190919145400.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
namespace Neos\Flow\Core\Migrations;

/**
* Move class names in namespace String because string is a reserved keyword
*/
class Version20190919145400 extends \Neos\Flow\Core\Migrations\AbstractMigration
{
/**
* @return string
*/
public function getIdentifier()
{
return 'Networkteam.Neos.MailObfuscator-20190919145400';
}

public function up()
{
$this->searchAndReplace('Networkteam\Neos\MailObfuscator\String\Converter', 'Networkteam\Neos\MailObfuscator\Converter', ['yaml', 'php', 'fusion']);
}

public function down()
{
$this->searchAndReplace('Networkteam\Neos\MailObfuscator\Converter', 'Networkteam\Neos\MailObfuscator\String\Converter', ['yaml', 'php', 'fusion']);
}
}
4 changes: 2 additions & 2 deletions Tests/Unit/Fusion/ConvertEmailLinksImplementationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
use Neos\Flow\Tests\UnitTestCase;
use Neos\Fusion\Core\Runtime;
use Networkteam\Neos\MailObfuscator\Fusion\ConvertEmailLinksImplementation;
use Networkteam\Neos\MailObfuscator\String\Converter\Mailto2HrefObfuscatingConverter;
use Networkteam\Neos\MailObfuscator\String\Converter\RewriteAtCharConverter;
use Networkteam\Neos\MailObfuscator\Converter\Mailto2HrefObfuscatingConverter;
use Networkteam\Neos\MailObfuscator\Converter\RewriteAtCharConverter;

class ConvertEmailLinksImplementationTest extends UnitTestCase
{
Expand Down

0 comments on commit 3260524

Please sign in to comment.