-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from justbetter/feature/refactor
Refactor
- Loading branch information
Showing
104 changed files
with
1,969 additions
and
1,919 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,31 @@ | ||
# Upgrading from 1.x to 2.x | ||
# Upgrade Guide | ||
|
||
## Upgrading from 1.x to 2.x | ||
|
||
You do not need to modify code in your price/sku retriever. | ||
|
||
If you were using the Mageplaza Better Tier Price module you now have to implement your update class yourself or upgrade to the [JustBetter Magento 2 Customer Pricing](https://github.com/justbetter/magento2-customer-pricing) module. | ||
See the readme on how you can implement your own updater class, you can use the default class from version 1.x as a template. | ||
If you were using the Mageplaza Better Tier Price module you now have to implement your update class yourself or upgrade | ||
to the [JustBetter Magento 2 Customer Pricing](https://github.com/justbetter/magento2-customer-pricing) module. | ||
See the readme on how you can implement your own updater class, you can use the default class from version 1.x as a | ||
template. | ||
|
||
## Upgrading from 2.x to 3.x | ||
|
||
3.x introduces a complete refactor of the package structure. | ||
|
||
A few highlights: | ||
|
||
- Simplified implementation | ||
- Support updating via Magento 2 bulk async requests | ||
- Removed error logger, replaced with activity log | ||
- Dropped support for Laravel 10 | ||
|
||
### Update your project | ||
|
||
The price retriever and SKU retriever classes all have been merged into a single repository class. | ||
Refer to the readme on how to implement this. | ||
|
||
The configuration file has been stripped, most of the configuration is now done in the repository class. | ||
|
||
A lot of classes have been renamed, be sure to update your scheduler and check all classes that you use. | ||
The price model has been renamed from `MagentoCustomerPrice` to `CustomerPrice`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,61 @@ | ||
{ | ||
"name": "justbetter/laravel-magento-customer-prices", | ||
"description": "Package to push customer specific prices to Magento", | ||
"type": "package", | ||
"license": "MIT", | ||
"require": { | ||
"php": "^8.1", | ||
"brick/money": "^0.7|^0.8", | ||
"justbetter/laravel-magento-client": "^2.4", | ||
"justbetter/laravel-magento-products": "^1.4", | ||
"laravel/framework": "^10.0|^11.0", | ||
"spatie/laravel-activitylog": "^4.8" | ||
}, | ||
"require-dev": { | ||
"doctrine/dbal": "^3.4", | ||
"larastan/larastan": "^2.9", | ||
"laravel/pint": "^1.15", | ||
"orchestra/testbench": "^8.0|^9.0", | ||
"phpstan/phpstan-mockery": "^1.1", | ||
"phpunit/phpunit": "^10.0" | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Vincent Boon", | ||
"email": "[email protected]", | ||
"role": "Developer" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"JustBetter\\MagentoCustomerPrices\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"JustBetter\\MagentoCustomerPrices\\Tests\\": "tests" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "phpunit", | ||
"analyse": "phpstan", | ||
"style": "pint --test", | ||
"quality": [ | ||
"@test", | ||
"@analyse", | ||
"@style" | ||
"name": "justbetter/laravel-magento-customer-prices", | ||
"description": "Package to push customer specific prices to Magento", | ||
"type": "package", | ||
"license": "MIT", | ||
"require": { | ||
"php": "^8.2", | ||
"justbetter/laravel-magento-client": "^2.4", | ||
"justbetter/laravel-magento-async": "^1.0", | ||
"justbetter/laravel-magento-products": "^1.4", | ||
"laravel/framework": "^11.0", | ||
"spatie/laravel-activitylog": "^4.8" | ||
}, | ||
"require-dev": { | ||
"larastan/larastan": "^2.9", | ||
"laravel/pint": "^1.15", | ||
"orchestra/testbench": "^9.0", | ||
"phpstan/phpstan-mockery": "^1.1", | ||
"phpunit/phpunit": "^10.0" | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Vincent Boon", | ||
"email": "[email protected]", | ||
"role": "Developer" | ||
} | ||
], | ||
"fix-style": "pint" | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"JustBetter\\MagentoCustomerPrices\\ServiceProvider" | ||
] | ||
} | ||
}, | ||
"minimum-stability": "stable", | ||
"prefer-stable": true | ||
"autoload": { | ||
"psr-4": { | ||
"JustBetter\\MagentoCustomerPrices\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"JustBetter\\MagentoCustomerPrices\\Tests\\": "tests" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "phpunit", | ||
"analyse": "phpstan", | ||
"style": "pint --test", | ||
"quality": [ | ||
"@test", | ||
"@analyse", | ||
"@style" | ||
], | ||
"fix-style": "pint" | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"JustBetter\\MagentoCustomerPrices\\ServiceProvider" | ||
] | ||
} | ||
}, | ||
"minimum-stability": "stable", | ||
"prefer-stable": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
<?php | ||
|
||
use Brick\Math\RoundingMode; | ||
use JustBetter\MagentoCustomerPrices\Retriever\DummyCustomerPriceRetriever; | ||
|
||
return [ | ||
'retriever' => DummyCustomerPriceRetriever::class, | ||
'repository' => \JustBetter\MagentoCustomerPrices\Repository\Repository::class, | ||
|
||
/* Queue for the jobs to run on */ | ||
'queue' => 'default', | ||
|
||
'fail_count' => 5, | ||
|
||
'currency' => 'EUR', | ||
'precision' => 4, | ||
'rounding_mode' => RoundingMode::HALF_UP, | ||
/* Send updates using Magento 2's async bulk endpoints, a configured message queue in Magento is required for this */ | ||
'async' => false, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.