Giter Site home page Giter Site logo

magento2-reachdigital_testframework's Issues

Dependabot can't resolve your PHP dependency files

Dependabot can't resolve your PHP dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - The requested package magento/framework could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No Slack web-hook defined.

A Slack Webhook must be created and set in the SLACK_WEBHOOK environment variable on your CI environment.

Please make sure to create a Slack Webhook and to set it in the SLACK_WEBHOOK environment variable on your CI environment. Alternatively, provide slackWebhook as a configuration option.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Dependabot can't resolve your PHP dependency files

Dependabot can't resolve your PHP dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Root composer.json requires magento/framework, it could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Just a question

Which font and theme are you using in your PHPStorm-Setup? Looks very productive :)

LocalizedException: The configuration file has changed when using TestCase\AbstractController

My test looks like this:

class ProductTest extends \Magento\TestFramework\TestCase\AbstractController
{
    
    public static function loadFixture()
    {
        include __DIR__ . '/../_files/categories.php';
    }

    /**
     * @magentoDbIsolation enabled
     * @magentoAppIsolation enabled
     * @magentoDataFixture loadFixture
     */
    public function testCategory()
    {
        $this->dispatch('catalog/category/view/id/3');
        $this->assertContains('Category 1', $this->getResponse()->getBody());
    }

}

Then when I run the integration test with the plugin, the call to $this->dispatch() leads to this error:

Magento\Framework\Exception\LocalizedException: The configuration file has changed. Run the "app:config:import" or the "setup:upgrade" command to synchronize the configuration.

magento/vendor/magento/module-deploy/Model/Plugin/ConfigChangeDetector.php:50
magento/vendor/magento/framework/Interception/Interceptor.php:121
magento/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:69
magento/vendor/magento/framework/Interception/Interceptor.php:135
magento/vendor/magento/framework/Interception/Interceptor.php:153
magento/generated/code/Magento/Framework/App/FrontController/Interceptor.php:26
magento/vendor/magento/framework/App/Http.php:137
magento/generated/code/Magento/Framework/App/Http/Interceptor.php:24
magento/dev/tests/integration/framework/Magento/TestFramework/Application.php:449
magento/dev/tests/integration/framework/Magento/TestFramework/Helper/Bootstrap.php:117
magento/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php:116
magento/app/code/XYX/Module/Test/Integration/Controller/ProductTest.php:58

Maybe this is related to using/extending AbstractController?

EDIT:
So when I run a test that uses extend \PHPUnit\Framework\TestCase it works.

Does anyone know what I can do to be able to use Controller Test cases?

gitignore phpunit.xml

phpunit.xml is usually environment-specific, so that I think it should be gitignored. Magento itself has it under gitignore as well. You currently have it in your .gitignore file, but since this file is not mapped at

"map": [
[
"etc",
"dev/tests/quick-integration/etc"
],
[
"framework",
"dev/tests/quick-integration/framework"
],
[
"phpunit.xml.dist",
"dev/tests/quick-integration/phpunit.xml.dist"
],
[
"README.md",
"dev/tests/quick-integration/README.md"
]
],
, the file will not be gitignored under dev/tests/quick-integration/. Is this on purpose or should we map the .gitignore file as well?

Thanks for your work on this!

Dependabot can't resolve your PHP dependency files

Dependabot can't resolve your PHP dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - The requested package magento/framework could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dependabot can't resolve your PHP dependency files

Dependabot can't resolve your PHP dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - The requested package magento/framework could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Run tests through phpunit directly?

I'm trying to run the tests through phpunit directly instead of having it called through bin/magento dev:tests:run integration.

Because when I run bin/magento dev:tests:run integration I see it still runs the normal integration tests;

$ php bin/magento dev:tests:run integration       

---- /data/client/magento2/dev/tests/integration> /usr/local/bin/php /data/client/magento2/./vendor/phpunit/phpunit/phpunit  

PHPUnit 6.2.4 by Sebastian Bergmann and contributors.

... etc

So I'm running cd dev/tests/quick-integration; php ../../../vendor/phpunit/phpunit/phpunit.

I then get PHP Fatal error: Uncaught Error: Class 'Magento\TestFramework\Bootstrap\Settings' not found in dev/tests/quick-integration/framework/bootstrap.php:28.

Is it even possible to run it from the quick-integration dir directly? And if so, it seems the autoloader doesn't work?

Elasticsearch errors when creating entities that trigger reindex.

Hi, I've been checking out this framework and the results so far are extremely impressive. It is so much faster than the default Magento.
I have hit an issue though.

When using fixtures to create products, either our own or TTDWizard Magento2-fixtures, we see Elasticsearch errors when the reindex is triggered, causing the tests to fail.

PHPUnit\Framework\Exception: User Deprecated: Specifying types in urls has been deprecated in /var/www/html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Bulk.php:44.

If I run the test from the default Magento integration dir then all tests pass (though with xdebug I can see that these errors are still thrown by ES).

Running Magento 2.4.5-p1, PHP 8.1.6, ElasticSearch 7.17 (Mark Shust Magento 2 Docker)

Is this a known issue? Do you have any suggestions as to why this may be happening?


~/html/dev/tests/integration$ php ../../../vendor/bin/phpunit 
    -c ../integration/phpunit.xml 
    ../../../magento2-plugin/module-registry/Test/Integration/Controller/ProductPageTest.php
PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

Warning:       Using a custom test suite loader is deprecated

...                                                                                                                                                                3 / 3 (100%)

Time: 00:08.880, Memory: 189.50 MB

OK (3 tests, 12 assertions)

=== Memory Usage System Stats ===
Memory usage (OS):	250.42M (135.00% of 185.50M reported by PHP)
Estimated memory leak:	64.92M (25.93% of used memory)

~/html/dev/tests/integration$ php ../../../vendor/bin/phpunit 
    -c ../quick-integration/phpunit.xml 
    ../../../magento2-plugin/module-registry/Test/Integration/Controller/ProductPageTest.php

PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

EEE                                                                 3 / 3 (100%)

Time: 00:11.302, Memory: 133.00 MB

There were 3 errors:

1) Vendor\Registry\Test\Integration\Controller\ProductPageTest::testRegistryValuesOnEnabledProduct
Magento\Framework\Exception\CouldNotSaveException: The stock item was unable to be saved. Please try again.

/var/www/html/vendor/magento/module-catalog-inventory/Model/Stock/StockItemRepository.php:196
/var/www/html/vendor/magento/module-catalog-inventory/Model/StockRegistry.php:181
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:58
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:138
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/CatalogInventory/Model/StockRegistry/Interceptor.php:59
/var/www/html/vendor/magento/module-catalog-inventory/Observer/SaveInventoryDataObserver.php:125
/var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php:88
/var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php:74
/var/www/html/vendor/magento/framework/Event/Manager.php:65
/var/www/html/generated/code/Magento/Framework/Event/Manager/Proxy.php:95
/var/www/html/vendor/magento/framework/Model/AbstractModel.php:832
/var/www/html/vendor/magento/module-catalog/Model/Product.php:985
/var/www/html/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php:34
/var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php:88
/var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php:74
/var/www/html/vendor/magento/framework/Event/Manager.php:65
/var/www/html/generated/code/Magento/Framework/Event/Manager/Proxy.php:95
/var/www/html/vendor/magento/framework/EntityManager/EventManager.php:50
/var/www/html/vendor/magento/framework/EntityManager/Operation/Create.php:123
/var/www/html/vendor/magento/framework/EntityManager/EntityManager.php:106
/var/www/html/vendor/magento/module-catalog/Model/ResourceModel/Product.php:777
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:58
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:138
/var/www/html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php:58
/var/www/html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php:28
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:135
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php:32
/var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:886
/var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:634
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:58
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:138
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/Catalog/Model/ProductRepository/Interceptor.php:32
/var/www/html/vendor/tddwizard/magento2-fixtures/src/Catalog/ProductBuilder.php:341
/var/www/html/vendor/tddwizard/magento2-fixtures/src/Catalog/ProductBuilder.php:303
/var/www/html/magento2-plugin/module-registry/Test/Integration/Controller/ProductPageTest.php:151
/var/www/html/magento2-plugin/module-registry/Test/Integration/Controller/ProductPageTest.php:38

Caused by
PHPUnit\Framework\Exception: User Deprecated: Specifying types in urls has been deprecated in /var/www/html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Bulk.php:44.

/var/www/html/dev/tests/quick-integration/framework/bootstrap.php:201
/var/www/html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Bulk.php:44
/var/www/html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php:1926
/var/www/html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php:347
/var/www/html/vendor/magento/module-elasticsearch-7/Model/Client/Elasticsearch.php:173
/var/www/html/vendor/magento/module-elasticsearch/Model/Adapter/Elasticsearch.php:291
/var/www/html/vendor/magento/module-elasticsearch/Model/Indexer/IndexerHandler.php:186
/var/www/html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext.php:220
/var/www/html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext.php:198
/var/www/html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext.php:152
/var/www/html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext.php:250
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:58
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:138
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Interceptor.php:32
/var/www/html/vendor/magento/module-indexer/Model/Indexer.php:533
/var/www/html/vendor/magento/module-indexer/Model/Indexer/DependencyDecorator.php:294
/var/www/html/vendor/magento/framework/Indexer/AbstractProcessor.php:69
/var/www/html/vendor/magento/module-inventory-catalog-search/Plugin/InventoryIndexer/Indexer/SourceItem/Strategy/Sync/FulltextIndexUpdater.php:77
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:135
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/InventoryIndexer/Indexer/SourceItem/Strategy/Sync/Interceptor.php:23
/var/www/html/vendor/magento/module-inventory-indexer/Indexer/SourceItem/SourceItemReindexStrategy.php:61
/var/www/html/vendor/magento/module-inventory-indexer/Indexer/SourceItem/SourceItemIndexer.php:65
/var/www/html/vendor/magento/module-inventory-indexer/Plugin/InventoryApi/ReindexAfterSourceItemsSavePlugin.php:54
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:146
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/Inventory/Model/SourceItem/Command/SourceItemsSaveWithoutLegacySynchronization/Interceptor.php:23
/var/www/html/vendor/magento/module-inventory-catalog/Model/UpdateSourceItemBasedOnLegacyStockItem.php:89
/var/www/html/vendor/magento/module-inventory-catalog/Plugin/CatalogInventory/UpdateSourceItemAtLegacyStockItemSavePlugin.php:152
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:135
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Item/Interceptor.php:23
/var/www/html/vendor/magento/module-catalog-inventory/Model/Stock/StockItemRepository.php:193
/var/www/html/vendor/magento/module-catalog-inventory/Model/StockRegistry.php:181
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:58
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:138
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/CatalogInventory/Model/StockRegistry/Interceptor.php:59
/var/www/html/vendor/magento/module-catalog-inventory/Observer/SaveInventoryDataObserver.php:125
/var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php:88
/var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php:74
/var/www/html/vendor/magento/framework/Event/Manager.php:65
/var/www/html/generated/code/Magento/Framework/Event/Manager/Proxy.php:95
/var/www/html/vendor/magento/framework/Model/AbstractModel.php:832
/var/www/html/vendor/magento/module-catalog/Model/Product.php:985
/var/www/html/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php:34
/var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php:88
/var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php:74
/var/www/html/vendor/magento/framework/Event/Manager.php:65
/var/www/html/generated/code/Magento/Framework/Event/Manager/Proxy.php:95
/var/www/html/vendor/magento/framework/EntityManager/EventManager.php:50
/var/www/html/vendor/magento/framework/EntityManager/Operation/Create.php:123
/var/www/html/vendor/magento/framework/EntityManager/EntityManager.php:106
/var/www/html/vendor/magento/module-catalog/Model/ResourceModel/Product.php:777
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:58
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:138
/var/www/html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php:58
/var/www/html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php:28
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:135
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php:32
/var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:886
/var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:634
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:58
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:138
/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/Catalog/Model/ProductRepository/Interceptor.php:32
/var/www/html/vendor/tddwizard/magento2-fixtures/src/Catalog/ProductBuilder.php:341
/var/www/html/vendor/tddwizard/magento2-fixtures/src/Catalog/ProductBuilder.php:303
/var/www/html/magento2-plugin/module-registry/Test/Integration/Controller/ProductPageTest.php:151
/var/www/html/magento2-plugin/module-registry/Test/Integration/Controller/ProductPageTest.php:38

...

PHP 7.3 compatiblity

The composer.json constraints it on 7.2. But M2.3.3 now supports 7.3 so I'd like to upgrade and use this module.

Allow use of `config-global.php`

I'm aware that not using this has a positive impact on performance, but it's making it impossible to read sensitive data that I need in my tests. Would it be possible to allow it by setting a config flag in phpunit.xml?

2.4.0 Compatibility

We use this in one of our projects and tried to upgrade to 2.4.0. However, I found that 103.0.0 is not in the list of available Magento modules.

Is there a timeline for making this update?

Fixes for running tests with Magento 2.4

When running the Quick Integration tests on Magento 2.4.1, I bumped into the following error: Uncaught RuntimeException: Override fixture resolver isn't initialized in .../dev/tests/integration/framework/Magento/TestFramework/Workaround/Override/Fixture/Resolver.php:69 Diving into this, I see that the bootstrap.php in Magento 2.4.X is quite different from the bootstrap.php of the Quick Integration framework. But we can fix that! By adding the following lines of code into the bootstrap.php file of the Quick Test framework, it works all nicely:

    $overrideConfig = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
        Magento\TestFramework\Workaround\Override\Config::class
    );
    $overrideConfig->init();
    Magento\TestFramework\Workaround\Override\Config::setInstance($overrideConfig);
    Magento\TestFramework\Workaround\Override\Fixture\Resolver::setInstance(
        new  \Magento\TestFramework\Workaround\Override\Fixture\Resolver($overrideConfig)
    );

I placed it somewhere after the Files::setInstance call.

To be on the safe-side, I've also added the newly created $overrideConfig variable to the unset line:

unset($testsBaseDir, $logWriter, $settings, $shell, $application, $bootstrap, $overrideConfig);

Additionally, the phpunit.xml.dist file needs to include the following line:

<phpunit>
    <php>
        <const name="USE_OVERRIDE_CONFIG" value="enabled"/>
    </php>
</phpunit>

Next, in the class TestFramework\Bootstrap\DocBlock a new class needs to be added to the return:

new \Magento\TestFramework\Workaround\Override\Fixture\Resolver\TestSetter(),

Now, the question is: Why not add this as a PR? Happy to do that! But because this specifically works for Magento 2.4, I wonder what the best procedure would be, because the PR would make things incompatible with Magento 2.3. Perhaps simply a new branch magento-2.4 and a new major release 2.0?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.