Skip to content
Open

4.0.0 #122

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# .gitignore for M2-Postcode.nl module by Flekto
.DS_Store
vendor
composer.lock
Expand Down
2 changes: 1 addition & 1 deletion Api/Data/Autocomplete.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api\Data;
namespace PostcodeEu\AddressValidation\Api\Data;

class Autocomplete implements AutocompleteInterface
{
Expand Down
2 changes: 1 addition & 1 deletion Api/Data/Autocomplete/AutocompleteMatch.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api\Data\Autocomplete;
namespace PostcodeEu\AddressValidation\Api\Data\Autocomplete;

class AutocompleteMatch implements MatchInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api\Data\Autocomplete\AutocompleteMatch;
namespace PostcodeEu\AddressValidation\Api\Data\Autocomplete\AutocompleteMatch;

interface HighlightInterface
{
Expand Down
4 changes: 2 additions & 2 deletions Api/Data/Autocomplete/MatchInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api\Data\Autocomplete;
namespace PostcodeEu\AddressValidation\Api\Data\Autocomplete;

interface MatchInterface
{
Expand Down Expand Up @@ -30,7 +30,7 @@ public function getPrecision(): string;
public function getContext(): string;

/**
* @return Flekto\Postcode\Api\Data\Autocomplete\AutocompleteMatch\HighlightInterface[]
* @return PostcodeEu\AddressValidation\Api\Data\Autocomplete\AutocompleteMatch\HighlightInterface[]
*/
public function getHighlights(): array;
}
6 changes: 3 additions & 3 deletions Api/Data/AutocompleteInterface.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Flekto\Postcode\Api\Data;
namespace PostcodeEu\AddressValidation\Api\Data;

interface AutocompleteInterface
{
/**
* @return Flekto\Postcode\Api\Data\Autocomplete\MatchInterface[]
* @return PostcodeEu\AddressValidation\Api\Data\Autocomplete\MatchInterface[]
*/
public function getMatches(): array;

Expand All @@ -25,7 +25,7 @@ public function getMessage(): ?string;
public function getException(): ?string;

/**
* @return Flekto\Postcode\Api\Data\MagentoDebugInfoInterface|null
* @return PostcodeEu\AddressValidation\Api\Data\MagentoDebugInfoInterface|null
*/
public function getMagentoDebugInfo(): ?MagentoDebugInfoInterface;
}
2 changes: 1 addition & 1 deletion Api/Data/MagentoDebugInfo.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api\Data;
namespace PostcodeEu\AddressValidation\Api\Data;

class MagentoDebugInfo implements MagentoDebugInfoInterface
{
Expand Down
2 changes: 1 addition & 1 deletion Api/Data/MagentoDebugInfo/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api\Data\MagentoDebugInfo;
namespace PostcodeEu\AddressValidation\Api\Data\MagentoDebugInfo;

class Configuration implements ConfigurationInterface
{
Expand Down
2 changes: 1 addition & 1 deletion Api/Data/MagentoDebugInfo/ConfigurationInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api\Data\MagentoDebugInfo;
namespace PostcodeEu\AddressValidation\Api\Data\MagentoDebugInfo;

interface ConfigurationInterface
{
Expand Down
2 changes: 1 addition & 1 deletion Api/Data/MagentoDebugInfo/MagentoModule.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api\Data\MagentoDebugInfo;
namespace PostcodeEu\AddressValidation\Api\Data\MagentoDebugInfo;

class MagentoModule implements MagentoModuleInterface
{
Expand Down
2 changes: 1 addition & 1 deletion Api/Data/MagentoDebugInfo/MagentoModuleInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api\Data\MagentoDebugInfo;
namespace PostcodeEu\AddressValidation\Api\Data\MagentoDebugInfo;

interface MagentoModuleInterface
{
Expand Down
6 changes: 3 additions & 3 deletions Api/Data/MagentoDebugInfoInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api\Data;
namespace PostcodeEu\AddressValidation\Api\Data;

interface MagentoDebugInfoInterface
{
Expand All @@ -25,12 +25,12 @@ public function getClient(): string;
public function getSession(): string;

/**
* @return Flekto\Postcode\Api\Data\MagentoDebugInfo\ConfigurationInterface
* @return PostcodeEu\AddressValidation\Api\Data\MagentoDebugInfo\ConfigurationInterface
*/
public function getConfiguration(): MagentoDebugInfo\ConfigurationInterface;

/**
* @return Flekto\Postcode\Api\Data\MagentoDebugInfo\MagentoModuleInterface[]
* @return PostcodeEu\AddressValidation\Api\Data\MagentoDebugInfo\MagentoModuleInterface[]
*/
public function getModules(): array;
}
2 changes: 1 addition & 1 deletion Api/Data/UpdateNotificationInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api\Data;
namespace PostcodeEu\AddressValidation\Api\Data;

/**
* @api
Expand Down
6 changes: 3 additions & 3 deletions Api/PostcodeModelInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Api;
namespace PostcodeEu\AddressValidation\Api;

interface PostcodeModelInterface
{
Expand All @@ -9,9 +9,9 @@ interface PostcodeModelInterface
* @access public
* @param string $context
* @param string $term
* @return \Flekto\Postcode\Api\Data\AutocompleteInterface
* @return \PostcodeEu\AddressValidation\Api\Data\AutocompleteInterface
*/
public function getAddressAutocomplete(string $context, string $term): \Flekto\Postcode\Api\Data\AutocompleteInterface;
public function getAddressAutocomplete(string $context, string $term): \PostcodeEu\AddressValidation\Api\Data\AutocompleteInterface;

/**
* @access public
Expand Down
4 changes: 2 additions & 2 deletions Api/UpdateNotificationRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Flekto\Postcode\Api;
namespace PostcodeEu\AddressValidation\Api;

use Flekto\Postcode\Api\Data\UpdateNotificationInterface;
use PostcodeEu\AddressValidation\Api\Data\UpdateNotificationInterface;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;

Expand Down
6 changes: 3 additions & 3 deletions Block/Checkout/AttributeMerger.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Block\Checkout;
namespace PostcodeEu\AddressValidation\Block\Checkout;

use Magento\Checkout\Block\Checkout\AttributeMerger as BaseAttributeMerger;

Expand All @@ -24,8 +24,8 @@ protected function getMultilineFieldConfig($attributeCode, array $attributeConfi

if ($attributeCode === 'street') {
// NB. collection component must end in '/group' or Magento's shipping rates validator will break.
$config['component'] = 'Flekto_Postcode/js/form/components/street/group';
$config['config']['template'] = 'Flekto_Postcode/group/street';
$config['component'] = 'PostcodeEu_AddressValidation/js/form/components/street/group';
$config['config']['template'] = 'PostcodeEu_AddressValidation/group/street';
}

return $config;
Expand Down
2 changes: 1 addition & 1 deletion Block/Customer/Address/Autofill.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Block\Customer\Address;
namespace PostcodeEu\AddressValidation\Block\Customer\Address;

class Autofill extends \Magento\Framework\View\Element\Template
{
Expand Down
4 changes: 2 additions & 2 deletions Block/Onepage/LayoutProcessor.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace Flekto\Postcode\Block\Onepage;
namespace PostcodeEu\AddressValidation\Block\Onepage;

use Magento\Framework\View\Element\AbstractBlock;
use Magento\Checkout\Block\Checkout\LayoutProcessorInterface;
use Magento\Framework\View\Element\Template\Context;
use Magento\Framework\Exception\LocalizedException;
use Flekto\Postcode\Helper\StoreConfigHelper;
use PostcodeEu\AddressValidation\Helper\StoreConfigHelper;

class LayoutProcessor extends AbstractBlock implements LayoutProcessorInterface
{
Expand Down
12 changes: 6 additions & 6 deletions Block/System/Config/Status.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Flekto\Postcode\Block\System\Config;
namespace PostcodeEu\AddressValidation\Block\System\Config;

use Flekto\Postcode\Helper\StoreConfigHelper;
use Flekto\Postcode\Helper\ApiClientHelper;
use Flekto\Postcode\Helper\Data as DataHelper;
use Flekto\Postcode\Model\UpdateNotification\UpdateNotifier;
use PostcodeEu\AddressValidation\Helper\StoreConfigHelper;
use PostcodeEu\AddressValidation\Helper\ApiClientHelper;
use PostcodeEu\AddressValidation\Helper\Data as DataHelper;
use PostcodeEu\AddressValidation\Model\UpdateNotification\UpdateNotifier;
use Magento\Backend\Block\Template;
use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Framework\Data\Form\Element\Renderer\RendererInterface;
Expand All @@ -19,7 +19,7 @@ class Status extends Template implements RendererInterface
public const CACHE_ID = 'postcode-eu-status';
public const CACHE_LIFETIME_SECONDS = 3600;

protected $_template = 'Flekto_Postcode::system/config/status.phtml';
protected $_template = 'PostcodeEu_AddressValidation::system/config/status.phtml';
protected $_scopeConfig;
protected $_storeConfigHelper;
protected $_apiClientHelper;
Expand Down
2 changes: 1 addition & 1 deletion Block/System/Config/Status/Exception.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Block\System\Config\Status;
namespace PostcodeEu\AddressValidation\Block\System\Config\Status;

class Exception extends \Magento\Framework\Exception\LocalizedException
{
Expand Down
8 changes: 4 additions & 4 deletions Cron/NotifyModuleUpdate.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Flekto\Postcode\Cron;
namespace PostcodeEu\AddressValidation\Cron;

use Psr\Log\LoggerInterface;
use Flekto\Postcode\Helper\Data as DataHelper;
use Flekto\Postcode\Model\UpdateNotification\UpdateNotifier;
use PostcodeEu\AddressValidation\Helper\Data as DataHelper;
use PostcodeEu\AddressValidation\Model\UpdateNotification\UpdateNotifier;

class NotifyModuleUpdate
{
Expand Down Expand Up @@ -43,7 +43,7 @@ public function execute(): void
if (($moduleInfo['has_update'] ?? false)
&& $this->_updateNotifier->notifyVersion($moduleInfo['latest_version'])
) {
$this->_logger->info(__('Added notification for Postcode.eu Address API %1 update.', $moduleInfo['latest_version']));
$this->_logger->info(__('Added notification for Postcode.eu Address Validation %1 update.', $moduleInfo['latest_version']));
}
}
}
6 changes: 3 additions & 3 deletions Cron/UpdateApiData.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Flekto\Postcode\Cron;
namespace PostcodeEu\AddressValidation\Cron;

use Flekto\Postcode\Helper\ApiClientHelper;
use Flekto\Postcode\Helper\StoreConfigHelper;
use PostcodeEu\AddressValidation\Helper\ApiClientHelper;
use PostcodeEu\AddressValidation\Helper\StoreConfigHelper;
use Magento\Framework\App\Config\Storage\WriterInterface;
use Psr\Log\LoggerInterface;

Expand Down
14 changes: 7 additions & 7 deletions Data/Form/Element/AddressAutofill.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\Data\Form\Element;
namespace PostcodeEu\AddressValidation\Data\Form\Element;

use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Framework\Data\Form\Element\CollectionFactory;
Expand Down Expand Up @@ -47,7 +47,7 @@ public function getElementHtml(): string
$this->getId(),
[
'data' => [
'template' => 'Flekto_Postcode::form/element/address-autofill.phtml',
'template' => 'PostcodeEu_AddressValidation::form/element/address-autofill.phtml',
'jsLayout' => $this->getJsLayout(),
],
],
Expand All @@ -66,7 +66,7 @@ public function getJsLayout(): array
return [
'components' => [
$this->getId() => [
'component' => 'Flekto_Postcode/js/view/address/autofill',
'component' => 'PostcodeEu_AddressValidation/js/view/address/autofill',
'config' => [
'settings' => $this->getData('settings'),
'htmlIdPrefix' => $this->getData('htmlIdPrefix'),
Expand All @@ -76,7 +76,7 @@ public function getJsLayout(): array
],
'children' => [
'address_autofill_nl' => [
'component' => 'Flekto_Postcode/js/view/form/sales/order_create/address-autofill-nl',
'component' => 'PostcodeEu_AddressValidation/js/view/form/sales/order_create/address-autofill-nl',
'config' => [
'componentDisabled' => $this->getData('isNlComponentDisabled'),
],
Expand All @@ -86,7 +86,7 @@ public function getJsLayout(): array
'label' => __('Zip/Postal Code'),
'config' => [
'template' => 'ui/form/field',
'elementTmpl' => 'Flekto_Postcode/form/element/address-autofill-field',
'elementTmpl' => 'PostcodeEu_AddressValidation/form/element/address-autofill-field',
'placeholder' => '1234 AB',
'imports' => [
'visible' => '${ $.parentName }:visible',
Expand All @@ -101,7 +101,7 @@ public function getJsLayout(): array
],
'config' => [
'template' => 'ui/form/field',
'elementTmpl' => 'Flekto_Postcode/form/element/address-autofill-field',
'elementTmpl' => 'PostcodeEu_AddressValidation/form/element/address-autofill-field',
'imports' => [
'visible' => '${ $.parentName }:visible',
],
Expand All @@ -119,7 +119,7 @@ public function getJsLayout(): array
],
],
'address_autofill_intl' => [
'component' => 'Flekto_Postcode/js/view/form/sales/order_create/address-autofill-intl',
'component' => 'PostcodeEu_AddressValidation/js/view/form/sales/order_create/address-autofill-intl',
'label' => __('Find an address'),
'placeholder' => __('City, street or postcode')
],
Expand Down
2 changes: 1 addition & 1 deletion GraphQl/Exception/GraphQlHeaderException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\GraphQl\Exception;
namespace PostcodeEu\AddressValidation\GraphQl\Exception;

use GraphQL\Error\ClientAware;
use Magento\Framework\Exception\LocalizedException;
Expand Down
2 changes: 1 addition & 1 deletion HTTP/Client/Curl.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Flekto\Postcode\HTTP\Client;
namespace PostcodeEu\AddressValidation\HTTP\Client;

/**
* Extend Curl class to isolate configured curl options from the rest of the application.
Expand Down
12 changes: 6 additions & 6 deletions Helper/ApiClientHelper.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Flekto\Postcode\Helper;
namespace PostcodeEu\AddressValidation\Helper;

use Exception;
use Flekto\Postcode\Helper\StoreConfigHelper;
use Flekto\Postcode\Service\Exception\NotFoundException;
use Flekto\Postcode\Service\PostcodeApiClient;
use PostcodeEu\AddressValidation\Helper\StoreConfigHelper;
use PostcodeEu\AddressValidation\Service\Exception\NotFoundException;
use PostcodeEu\AddressValidation\Service\PostcodeApiClient;
use Magento\Customer\Helper\Address as AddressHelper;
use Magento\Developer\Helper\Data;
use Magento\Directory\Model\RegionFactory;
Expand Down Expand Up @@ -353,7 +353,7 @@ public function getNlAddress(string $zipCode, string $houseNumber): array
*/
private function _handleClientException(\Exception $exception): array
{
if (!$exception instanceof \Flekto\Postcode\Service\Exception\NotFoundException) {
if (!$exception instanceof \PostcodeEu\AddressValidation\Service\Exception\NotFoundException) {
$this->_logger->error($exception->getMessage(), ['exception' => $exception]);
}

Expand Down Expand Up @@ -422,7 +422,7 @@ public function getSupportedCountries(): array
* Validate a full address, correcting and completing all parts of the address.
*
* @access public
* @see \Flekto\Postcode\Service\PostcodeApiClient::validateAddress()
* @see \PostcodeEu\AddressValidation\Service\PostcodeApiClient::validateAddress()
* @return array
*/
public function validateAddress(): array
Expand Down
Loading