Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the use of deprecated dispatcher factory #67

Merged
merged 3 commits into from May 14, 2018

Conversation

davidyell
Copy link
Collaborator

@davidyell davidyell commented Apr 26, 2018

References #51

The aim of this pull request is to remove the usage of the deprecated Dispatcher Factory called in the Test bootstrap.

I have removed the lines and the test suite still passes. I believe this is because the plugin tests instantiate the classes directly, and so do not rely on the locator class. The BootstrapTest class does load the plugin, using it's own bootstrap file. So the class isn't required in the test suites bootstrap.

Removed the calls to the deprecated dispatcher factory
@codecov
Copy link

codecov bot commented Apr 26, 2018

Codecov Report

Merging #67 into dev will increase coverage by 0.51%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev      #67      +/-   ##
============================================
+ Coverage     81.23%   81.74%   +0.51%     
- Complexity      402      423      +21     
============================================
  Files            13       14       +1     
  Lines          1007     1063      +56     
============================================
+ Hits            818      869      +51     
- Misses          189      194       +5
Impacted Files Coverage Δ Complexity Δ
src/Schema.php 84.81% <100%> (ø) 35 <0> (ø) ⬇️
src/Model/EndpointRegistry.php 94.44% <0%> (ø) 13% <0%> (ø) ⬇️
src/Model/EndpointLocator.php 91.07% <0%> (ø) 21% <0%> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 82c0bf7...591c815. Read the comment docs.

@davidyell davidyell mentioned this pull request Apr 26, 2018
23 tasks
@@ -14,8 +14,8 @@
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Datasource\ConnectionManager;
use Cake\Datasource\FactoryLocator;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this class used in the file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't think so. I'll need to check properly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why was the "use" statement added? 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good question 🤔

@@ -115,7 +115,4 @@

Plugin::load('DebugKit', ['path' => ROOT, 'bootstrap' => true]);

DispatcherFactory::add('Routing');
DispatcherFactory::add('ControllerFactory');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have the replacement middlewares ready for these? If so we should add the new Plugin class introduced in 3.6 and add them to the middleware queue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've no idea if there are replacement middlewares. Do we really need middleware setup for unit tests? That sounds more like an integration test thing, as the test suite doesn't use any routing or controllers.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right nvm, both are core filters so we don't need to bother.

@ADmad
Copy link
Member

ADmad commented May 3, 2018

Tests failing.

@davidyell
Copy link
Collaborator Author

davidyell commented May 4, 2018

Is the TypeMap deprecation new in 3.6.2 ? That does seem a little outside of scope for the topic of the pull request.

Seems to be, 3.6.1 <- 3.6.2

Please let me know if you'd like to include commits to fix the TypeMap deprecation in this pull request, and I can add that.

@ADmad
Copy link
Member

ADmad commented May 4, 2018

Yes please.

@davidyell
Copy link
Collaborator Author

Hey @ADmad can this be merged now? Are there any other changes you would like?

@ADmad ADmad merged commit 5ddab56 into UseMuffin:dev May 14, 2018
@davidyell
Copy link
Collaborator Author

Thanks!

@davidyell davidyell deleted the remove-test-bootstrap-deprecations branch May 14, 2018 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants