Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
updated Craft namespace, PHP version, craftcms version, phpcs.xml, re…
Browse files Browse the repository at this point in the history
…moved deprecated.php
  • Loading branch information
jeffreyschmitz87 committed Mar 18, 2024
1 parent 5789aec commit 44ae2c7
Show file tree
Hide file tree
Showing 10 changed files with 261 additions and 352 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# OYM - Geo Address Changelog

## 3.0.0 - 2024-03-18
### Updated
- Updated Craft namespace to \Craft
- Updated PHP version to 8.2 or higher
- Updated craftcms/cms version to 5.0.0-beta.1 or higher
- Updated phpcs.xml

### Removed
- Removed deprecated.php

## 2.1.0 - 2024-03-04
### Updated
- Updated TDE > OYM
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# OYM - Geo Address plugin for Craft CMS 4.x
# OYM - Geo Address plugin for Craft CMS 5.x

Geo Address field for Craft 4 Sections.
Geo Address field for Craft CMS.

## Requirements

This plugin requires Craft CMS 4.0.0 or later.
This plugin requires Craft CMS 5.0.0 or later.

## Installation

Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
}
],
"require": {
"php": "^8.0",
"craftcms/cms": "^4.0.0",
"ext-curl": "*"
"php": "^8.2",
"ext-curl": "*",
"craftcms/cms": "^5.0.0-beta.1"
},
"autoload": {
"psr-4": {
"oym\\craft\\geoaddress\\": "src/"
},
"files": ["src/deprecated.php"]
}
},
"extra": {
"name": "OYM - Geo Address Fields",
Expand Down
478 changes: 239 additions & 239 deletions geoaddress-sample.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
<file>src/</file>

<exclude-pattern type="relative-root">*.js</exclude-pattern>
<exclude-pattern type="relative-root">deprecated.php</exclude-pattern>
<exclude-pattern type="relative-root">migrations/</exclude-pattern>
</ruleset>
1 change: 0 additions & 1 deletion src/assetbundles/geoaddressfield/GeoAddressFieldAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace oym\craft\geoaddress\assetbundles\geoaddressfield;

use Craft;
use craft\web\AssetBundle;
use craft\web\assets\cp\CpAsset;

Expand Down
96 changes: 0 additions & 96 deletions src/deprecated.php

This file was deleted.

5 changes: 2 additions & 3 deletions src/fields/GeoAddressField.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace oym\craft\geoaddress\fields;

use Craft;
use craft\base\ElementInterface;
use craft\base\Field;
use craft\base\PreviewableFieldInterface;
Expand All @@ -30,9 +29,9 @@ public function getInputHtml($value, ElementInterface $element = null): string
}

$id = Html::id($this->handle);
$namespacedId = Craft::$app->getView()->namespaceInputId($id);
$namespacedId = \Craft::$app->getView()->namespaceInputId($id);

return Craft::$app->getView()->renderTemplate(
return \Craft::$app->getView()->renderTemplate(
'geoaddress/_components/fields/GeoAddressField_input',
[
'name' => $this->handle,
Expand Down
1 change: 0 additions & 1 deletion src/migrations/m220516_144416_update_field_handle.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace oym\craft\geoaddress\migrations;

use Craft;
use craft\db\Migration;
use craft\db\Table;
use oym\craft\geoaddress\fields\GeoAddressField;
Expand Down
5 changes: 2 additions & 3 deletions src/services/GeoAddressService.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace oym\craft\geoaddress\services;

use Craft;
use craft\base\Component;
use oym\craft\geoaddress\GeoAddress;
use oym\craft\geoaddress\models\GeoAddressModel;
Expand Down Expand Up @@ -41,8 +40,8 @@ public function getCoordsByAddress(string $addressQuery, string $country): array

// no results
if (!$result || $result['status'] !== 'OK' || empty($result['results'])) {
Craft::warning(
Craft::t(
\Craft::warning(
\Craft::t(
'geoaddress',
'GeoAddress coding failed: ' . $result['status']
),
Expand Down

0 comments on commit 44ae2c7

Please sign in to comment.