Skip to content

Commit 1507f57

Browse files
committed
Update product attribute "is_new" based on "news_from_date" and "news_to_date" for all scopes
1 parent 4686611 commit 1507f57

19 files changed

+215
-459
lines changed

.codeclimate.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.gitattributes

Lines changed: 0 additions & 12 deletions
This file was deleted.

.scrutinizer.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 109 deletions
This file was deleted.

.travis/before_script.sh

Lines changed: 0 additions & 75 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33

44
[![Latest Version on Packagist][ico-version]][link-packagist]
55
[![Software License][ico-license]](LICENSE.md)
6-
[![Build Status][ico-travis]][link-travis]
76
![Supported Magento Versions][ico-compatibility]
8-
9-
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
10-
[![Quality Score][ico-code-quality]][link-code-quality]
11-
[![Maintainability][ico-maintainability]][link-maintainability]
127
</div>
138

149
---
@@ -39,26 +34,6 @@ Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed re
3934
4035
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
4136
42-
## Testing
43-
44-
### Unit Tests
45-
46-
```
47-
./vendor/bin/phpunit tests/unit
48-
```
49-
50-
### Magento Integration Tests
51-
52-
0. Configure test database in `dev/tests/integration/etc/install-config-mysql.php`. [Read more in the Magento docs.](https://devdocs.magento.com/guides/v2.4/test/integration/integration_test_execution.html)
53-
54-
1. Copy `tests/integration/phpunit.xml.dist` from the package to `dev/tests/integration/phpunit.xml` in your Magento installation.
55-
56-
2. In that directory, run
57-
``` bash
58-
../../../vendor/bin/phpunit
59-
```
60-
61-
6237
## Security
6338
6439
If you discover any security related issues, please email avs@integer-net.de instead of using the issue tracker.
@@ -74,16 +49,8 @@ The MIT License (MIT). Please see [License File](LICENSE) for more information.
7449
7550
[ico-version]: https://img.shields.io/packagist/v/integer-net/magento2-product-is-new-attribute.svg?style=flat-square
7651
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
77-
[ico-travis]: https://img.shields.io/travis/integer-net/magento2-product-is-new-attribute/master.svg?style=flat-square
78-
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/integer-net/magento2-product-is-new-attribute?style=flat-square
79-
[ico-code-quality]: https://img.shields.io/scrutinizer/g/integer-net/magento2-product-is-new-attribute.svg?style=flat-square
80-
[ico-maintainability]: https://img.shields.io/codeclimate/maintainability/integer-net/magento2-product-is-new-attribute?style=flat-square
81-
[ico-compatibility]: https://img.shields.io/badge/magento-2.2%20|%202.3%20|%202.4-brightgreen.svg?logo=magento&longCache=true&style=flat-square
52+
[ico-compatibility]: https://img.shields.io/badge/magento-2.3%20|%202.4-brightgreen.svg?logo=magento&longCache=true&style=flat-square
8253
8354
[link-packagist]: https://packagist.org/packages/integer-net/magento2-product-is-new-attribute
84-
[link-travis]: https://travis-ci.org/integer-net/magento2-product-is-new-attribute
85-
[link-scrutinizer]: https://scrutinizer-ci.com/g/integer-net/magento2-product-is-new-attribute/code-structure
86-
[link-code-quality]: https://scrutinizer-ci.com/g/integer-net/magento2-product-is-new-attribute
87-
[link-maintainability]: https://codeclimate.com/github/integer-net/magento2-product-is-new-attribute
8855
[link-author]: https://github.com/avstudnitz
8956
[link-contributors]: ../../contributors

auth.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

composer.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,15 @@
1818
"IntegerNet\\ProductIsNewAttribute\\": "src"
1919
}
2020
},
21-
"autoload-dev": {
22-
"psr-4": {
23-
"IntegerNet\\ProductIsNewAttribute\\": "tests/src"
24-
}
25-
},
2621
"repositories": [
2722
{
2823
"type": "composer",
2924
"url": "https://repo.magento.com/"
3025
}
3126
],
3227
"require": {
33-
"php": "~7.3||~7.4||~8.1",
34-
"magento/framework": "^102.0.0||^103.0.0"
28+
"php": "~7.4||~8.1",
29+
"magento/framework": "^103.0.0"
3530
},
3631
"require-dev": {
3732
"roave/security-advisories": "dev-master",

src/Cron/UpdateIsNew.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace IntegerNet\ProductIsNewAttribute\Cron;
5+
6+
use IntegerNet\ProductIsNewAttribute\Service\ProductsUpdateService;
7+
8+
class UpdateIsNew
9+
{
10+
private ProductsUpdateService $productUpdateService;
11+
12+
public function __construct(
13+
ProductsUpdateService $productUpdateService
14+
) {
15+
$this->productUpdateService = $productUpdateService;
16+
}
17+
18+
public function execute(): void
19+
{
20+
$this->productUpdateService->updateIsNewValues();
21+
}
22+
}

src/ExampleClass.php

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)