laminas / laminas-developer-tools Goto Github PK
View Code? Open in Web Editor NEWModule for developer and debug tools for use with laminas-mvc applications.
License: BSD 3-Clause "New" or "Revised" License
Module for developer and debug tools for use with laminas-mvc applications.
License: BSD 3-Clause "New" or "Revised" License
Hi!
When I use window.location.assign with a download link, the toolbar does not work properly and I get this javascript error on my console: Uncaught TypeError: Cannot read property 'offsetWidth' of null
Code to simulate:
<script type="text/javascript">
window.location.assign("https://github.com/zendframework/ZendDeveloperTools/archive/master.zip");
</script>
Thank you!
Originally posted by @quintanilhar at zendframework/zend-developer-tools#194
Provide a narrative description of what you are trying to accomplish.
In HTML5, the <head> element can be omitted. The following code will validate as HTML5:
<!DOCTYPE html>
<html>
<title>Title of the document</title>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
However, ZendDeveloperTools\Listener->injectToolbar() requires it to work
$injected = preg_replace('/<\/head>/i', $style . "\n</head>", $injected, 1);
Styles should be displayed in the html document even if there is no <head> html element when the document is html 5 document.
html document does not include zend-developer-tools required css, if <head> element is missing from the layout.
Originally posted by @VilleTikkanen at zendframework/zend-developer-tools#255
The project page (url below) starts with the line "Module for developer and debug tools for working with the ZF2 MVC layer". (url: https://github.com/zendframework/ZendDeveloperTools )
The line makes you wonder if the module is compatible (or applicable for) with in ZF3 MVC projects.
I feel this should be changed to show that this module will work in ZF2 and ZF3, perhaps like this:
"Module for developer and debug tools for working with the ZF2 MVC layer, works with ZF3"
Originally posted by @rbroen at zendframework/zend-developer-tools#226
A particular interesting feature of ZFDebug is being able to view what queries ZF generated and see the individual timings. This is helpful to troubleshoot issues with wrong or slow queries.
Originally posted by @syphernl at zendframework/zend-developer-tools#48
Hi, I am developing a AngularJs application and was wondering how can i get the toolbars data in each ajax request ?
All my requests return json, either a html output to replace the current toolbar or just a json object of the reports would be nice.
I looked throw the code but could not figure out where all the reports come together and injected in the view so i can hijack it and do something with it.
I've also asked it here with no response http://stackoverflow.com/questions/34183177/zf2-developer-tools-with-angularjs
Originally posted by @Exlord at zendframework/zend-developer-tools#203
in the application config ,i have a route its type is 'Zend\Mvc\Router\Http\Chain', this type need a parameter 'route_plugins', so i new it in the application config.
but in the \Zend\Mvc\Router\RoutePluginManager, the initializer propery store some closures. so when the application config is serialized, the error happend.
i think we need a method named makeObjectProperySerializable in the class Collector\ConfigCollector
Originally posted by @h3110w0r1d at zendframework/zend-developer-tools#153
The toolbar bleeds 8 new lines into each response, which can cause issues (if, for example, you try and build a zip file then those 8 new lines will be included in that zip file causing it to be invalid).
Could this be fixed?
Originally posted by @PatrickRose at zendframework/zend-developer-tools#162
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These problems occurred while renovating this repository. View logs.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
composer.json
php ~8.1.0 || ~8.2.0 || ~8.3.0
laminas/laminas-eventmanager ^3.4
laminas/laminas-http ^2.15
laminas/laminas-modulemanager ^2.10
laminas/laminas-mvc ^3.1
laminas/laminas-servicemanager ^3.3
laminas/laminas-stdlib ^3.6
laminas/laminas-view ^2.13.1
symfony/var-dumper ^6.0 || ^7.0
laminas/laminas-coding-standard ~2.5.0
phpunit/phpunit ^9.5.26
psalm/plugin-phpunit ^0.19.0
vimeo/psalm ^5.19
.github/workflows/continuous-integration.yml
.github/workflows/release-on-milestone-closed.yml
Q | A |
---|---|
Version(s) | 2.4.0 |
Firefox warns about the laminas-hidden
cookie. In specific, it references the following documentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite#samesitenone_requires_secure
The problem is that the cookie will be rejected by future browser versions.
laminas-hidden
cookie is set with SameSite=None
and without secure
.
I believe the code responsible for this behaviour is located here: https://github.com/laminas/laminas-developer-tools/blob/2.4.x/view/laminas-developer-tools/toolbar/toolbar.js
Enable the laminas-developer-tools toolbar. Visit your website. Observe the console output of your browser.
No warnings should be thrown.
Since not all websites under development are served over a secure connection, I propose setting SameSite=Lax
.
When we look at the compatitors like symfony or laravel with customized phpdebugbar the zend's has lacks in design and so on. For example: The configuration array etc are just var dumps and it appears like a mess in this bottom tooltip box.
http://symfony.com/blog/new-in-symfony-2-8-redesigned-web-debug-toolbar
Nice debugbars can improve the the experience for developers.
Originally posted by @sebfek at zendframework/zend-developer-tools#205
I was using named Adapter in my database configuration as shown in https://docs.laminas.dev/tutorials/db-adapter/#configuring-named-adapters:
'db' => [
'adapters' => [
'Application\Db\ApplicationAdapter' => [
'driver' => 'Pdo',
'dsn' => 'mysql:dbname=database;host=localhost;charset=utf8',
'username' => 'username',
'password' => 'password',
],
],
],
But the Laminas\DeveloperTools module send a Fatal error that tells no 'driver' key present
`Fatal error: Uncaught Laminas\Db\Adapter\Exception\InvalidArgumentException: createDriver expects a "driver" key to be present inside the parameters in /domain/domain.name/vendor/laminas/laminas-db/src/Adapter/Adapter.php:276
Stack trace:
#0 /domain/domain.name/vendor/laminas/laminas-db/src/Adapter/Adapter.php(73): Laminas\Db\Adapter\Adapter->createDriver(Array)
#1 /domain/domain.name/vendor/laminas/laminas-db/src/Adapter/AdapterServiceFactory.php(21): Laminas\Db\Adapter\Adapter->__construct(Array)
#2 /domain/domain.name/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(645): Laminas\Db\Adapter\AdapterServiceFactory->__invoke(Object(Laminas\ServiceManager\ServiceManager), 'Laminas\\Db\\Adap...', NULL)
#3 /domain/domain.name/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(218): Laminas\ServiceManager\ServiceManager->doCreate('Laminas\\Db\\Adap...')
#4 /domain/domain.name/vendor/laminas/laminas-developer-tools/src/Module.php(221): Laminas\ServiceManager\ServiceManager->get('Laminas\\Db\\Adap...')
#5 /domain/domain.name/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(645): Laminas\DeveloperTools\Module->Laminas\DeveloperTools\{closure}(Object(Laminas\ServiceManager\ServiceManager), 'Laminas\\Develop...', NULL)
#6 /domain/domain.name/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(218): Laminas\ServiceManager\ServiceManager->doCreate('Laminas\\Develop...')
#7 /domain/domain.name/vendor/laminas/laminas-developer-tools/src/Listener/ProfilerListener.php(75): Laminas\ServiceManager\ServiceManager->get('Laminas\\Develop...')
#8 /domain/domain.name/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\DeveloperTools\Listener\ProfilerListener->onFinish(Object(Laminas\Mvc\MvcEvent))
#9 /domain/domain.name/vendor/laminas/laminas-eventmanager/src/EventManager.php(171): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent))
#10 /domain/domain.name/vendor/laminas/laminas-mvc/src/Application.php(364): Laminas\EventManager\EventManager->triggerEvent(Object(Laminas\Mvc\MvcEvent))
#11 /domain/domain.name/vendor/laminas/laminas-mvc/src/Application.php(341): Laminas\Mvc\Application->completeRequest(Object(Laminas\Mvc\MvcEvent))
#12 /domain/domain.name/public/index.php(61): Laminas\Mvc\Application->run()
#13 {main}
Next Laminas\ServiceManager\Exception\ServiceNotCreatedException: Service with name "Laminas\Db\Adapter\AdapterInterface" could not be created. Reason: createDriver expects a "driver" key to be present inside the parameters in /domain/domain.name/vendor/laminas/laminas-servicemanager/src/ServiceManager.php:652
Stack trace:
#0 /domain/domain.name/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(218): Laminas\ServiceManager\ServiceManager->doCreate('Laminas\\Db\\Adap...')
#1/domain/domain.name/vendor/laminas/laminas-developer-tools/src/Module.php(221): Laminas\ServiceManager\ServiceManager->get('Laminas\\Db\\Adap...')
#2 /domain/domain.name/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(645): Laminas\DeveloperTools\Module->Laminas\DeveloperTools\{closure}(Object(Laminas\ServiceManager\ServiceManager), 'Laminas\\Develop...', NULL)
#3 /domain/domain.name/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(218): Laminas\ServiceManager\ServiceManager->doCreate('Laminas\\Develop...')
#4 /domain/domain.name/vendor/laminas/laminas-developer-tools/src/Listener/ProfilerListener.php(75): Laminas\ServiceManager\ServiceManager->get('Laminas\\Develop...')
#5 /domain/domain.name/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\DeveloperTools\Listener\ProfilerListener->onFinish(Object(Laminas\Mvc\MvcEvent))
#6 /domain/domain.name/vendor/laminas/laminas-eventmanager/src/EventManager.php(171): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent))
#7 /domain/domain.name/vendor/laminas/laminas-mvc/src/Application.php(364): Laminas\EventManager\EventManager->triggerEvent(Object(Laminas\Mvc\MvcEvent))
#8 /domain/domain.name/vendor/laminas/laminas-mvc/src/Application.php(341): Laminas\Mvc\Application->completeRequest(Object(Laminas\Mvc\MvcEvent))
#9/domain/domain.name/public/index.php(61): Laminas\Mvc\Application->run()
#10 {main} thrown in/domain/domain.name/vendor/laminas/laminas-servicemanager/src/ServiceManager.php on line 652`
Says "Session Validation Failed" on SessionManager->start() (used in FlashMessenger...)
Originally posted by @bioub at zendframework/zend-developer-tools#197
Hello
I enabled cache config in application.config.php:
...
'config_cache_enabled' => true,
'config_cache_key' => 1,
'cache_dir' => __DIR__ . '/../data/cache',
...
And I have some errors then :
( ! ) Fatal error: Uncaught exception 'Zend\View\Exception\RuntimeException' with message 'Zend\View\Renderer\PhpRenderer::render: Unable to render template "zend-developer-tools/toolbar/zendframework"; resolver could not resolve to a file' in .../vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php on line 493
( ! ) Zend\View\Exception\RuntimeException: Zend\View\Renderer\PhpRenderer::render: Unable to render template "zend-developer-tools/toolbar/zendframework"; resolver could not resolve to a file in .../vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php on line 493
Originally posted by @Nirzol at zendframework/zend-developer-tools#188
When the Content-Lenght is set by some module for an text/html asset (think asset manager for static html files in a data directory served via standard resolver :-) ) the Content-Lenght header will be incorrect after the Toolbar is injected. This results pages in half loaded.
adding the following at https://github.com/zendframework/ZendDeveloperTools/blob/master/src/ZendDeveloperTools/Listener/ToolbarListener.php#L163 will solve this
if (function_exists('mb_strlen')) {
$contentLength = mb_strlen($injected, '8bit');
} else {
$contentLength = strlen($injected);
}
$response->getHeaders()
->addHeaderLine('Content-Transfer-Encoding', 'binary')
->addHeaderLine('Content-Length', $contentLength);
I don't actually need the toolbar on static pages, and i realize this only affects development environments, still I though "lets create a record of this...".
I also wonder why the Response object does not do this automatically...
Originally posted by @basz at zendframework/zend-developer-tools#119
There's no rollover event on touch pad devices & mobile phones.
Originally posted by @joshribakoff at zendframework/zend-developer-tools#111
Q | A |
---|---|
New Feature | yes |
RFC | yes/no |
BC Break | yes/no |
Make this module compatible with new php 8.3 release.
I know, that this is not an error at all, but:
If I use bootstratp CSS, for example - there present this style definition:
/* bootstrap.css #259 */
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
So with this borders I've got some irritating behavior when mouseover on some ZendTools button and popup content showed over button and I'm trying move my mouse to this content - it disappears!
Because of borders adds some extra space and mouseover event brokes.
Works if I move mouse over green arrow :)
I know, that this is behavior of bootstrap.css, but if u will add this:
#zend-developer-toolbar {
...
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
...
}
then problem will be fixed on all possible CSS frameworks, I think.
Sorry for my english.
Thx
Originally posted by @man4red at zendframework/zend-developer-tools#145
Hi.
I just dud fresh installation and when I hover mouse over the execution time it doesn't show any popup with info which modules consumed what time.
Can you help me to turn this feature on?
Thanks.
Originally posted by @ikovalyov at zendframework/zend-developer-tools#208
See zendframework/zendframework#6166
Resolution is to wait for the next release (2.2.8 and 2.3.2) and then remove the patched code at https://github.com/zendframework/ZendDeveloperTools/blob/9f93faecc1c9c31b8af67491f0e706e75b1f85bf/src/ZendDeveloperTools/Listener/EventLoggingListenerAggregate.php#L120
Originally posted by @Ocramius at zendframework/zend-developer-tools#148
Using composer to install zf2 skeleton along with developer tools. After enabling it I am getting server errors, like:
PHP Fatal error: Uncaught exception 'Zend\\View\\Exception\\RuntimeException' with message 'Zend\\View\\Renderer\\PhpRenderer::render: Unable to render template "zend-developer-tools/toolbar/zendframework"; resolver could not resolve to a file' in C:\\Users\\Milan\\workspace\\HopkaupZEND\\vendor\\zendframework\\zendframework\\library\\Zend\\View\\Renderer\\PhpRenderer.php:499
Stack trace:
#0 C:\\Users\\Milan\\workspace\\HopkaupZEND\\vendor\\zendframework\\zend-developer-tools\\src\\ZendDeveloperTools\\Listener\\ToolbarListener.php(203): Zend\\View\\Renderer\\PhpRenderer->render(Object(Zend\\View\\Model\\ViewModel))
#1 C:\\Users\\Milan\\workspace\\HopkaupZEND\\vendor\\zendframework\\zend-developer-tools\\src\\ZendDeveloperTools\\Listener\\ToolbarListener.php(148): ZendDeveloperTools\\Listener\\ToolbarListener->renderEntries(Object(ZendDeveloperTools\\ProfilerEvent))
#2 C:\\Users\\Milan\\workspace\\HopkaupZEND\\vendor\\zendframework\\zend-developer-tools\\src\\ZendDeveloperTools\\Listener\\ToolbarListener.php(137): ZendDeveloperTools\\Listener\\ToolbarListener->injectToolbar(Object(ZendDe in C:\\Users\\Milan\\workspace\\HopkaupZEND\\vendor\\zendframework\\zendframework\\library\\Zend\\View\\Renderer\\PhpRenderer.php on line 499
adding 'default_template_suffix' key to module.config.php:
return array(
'view_manager' => array(
'default_template_suffix' => 'phtml',
'template_path_stack' => array(
'zenddevelopertools' => __DIR__ . '/../view',
),
),
);
fixes the issue.
Originally posted by @minow at zendframework/zend-developer-tools#94
Just as a reminder, the FirePHP listener is currently an empty callback
Originally posted by @Ocramius at zendframework/zend-developer-tools#56
Hi.
Broken page because the code is displayed unescaped.
It seems there is a problem in ConfigCollector::unserializeArray().
Originally posted by @mamont77 at zendframework/zend-developer-tools#116
I believe a good addition to ZendDeveloperTools, is to add a tooltip so that when you mouse over any icon or information, it displays information about what that is talking (or title of that information).
Presented the ZendDeveloper for some friends, but they felt a bit of trouble to use, because they do not know what were some of the information displayed.
If the hover, it showed the title of that information, the example below, I think it would be easier for anyone to notice. And this extender title display all items in this wonderful bar.
Originally posted by @apiweb at zendframework/zend-developer-tools#137
Q | A |
---|---|
New Feature | yes |
To be prepared for the december release of PHP 8.0, this repository has some additional TODOs to be tested against the new major version.
In order to make this repository compatible, one has to follow these steps:
composer.json
to provide support for PHP 8.0 by adding the constraint ~8.0.0
composer.json
to drop support for PHP less than 7.3composer.json
to implement phpunit 9.3 which supports PHP 7.3+.travis.yml
to ignore platform requirements when installing composer dependencies (simply add --ignore-platform-reqs
to COMPOSER_ARGS
env variable).travis.yml
to add PHP 8.0 to the matrix (NOTE: Do not allow failures as PHP 8.0 has a feature freeze since 2020-08-04!)this PR sets up a page, where you can view former collected toolbar entries by accessing the route /zdt-background-reque.
Known Bugs:
Missing:
Originally posted by @Blaimi at zendframework/zend-developer-tools#211
Is there any plan to support zend-expressive as well ?
PS: see also zendframework/zend-expressive-skeleton#157
Originally posted by @belgattitude at zendframework/zend-developer-tools#241
Can read text when exception is thrown and Whoops library is used. https://github.com/Ppito/laminas-whoops
The text should be readable regardless if Laminas contains DeveloperTools module or not.
As described in doctrine/DoctrineORMModule#567 there is a problem with zend-eventmanager 3.x.
The trigger()
method is not fully compatible with zend-eventmanager 3.x.
Originally posted by @thomasvargiu at zendframework/zend-developer-tools#244
Firebug show this error on this function:
self.show = function() {
slide(0);
toggleTrigger.innerHTML = "◄";
toggleTrigger.setAttribute("title", "Hide Toolbar");
hidden = false;
cookie.set(cookieKeyHidden, 0);
};
and there is no icon to close toolbar
Originally posted by @sjanjic at zendframework/zend-developer-tools#155
Mine does not fit panel height (4 modules are missed at the bottom)
Originally posted by @vgarvardt at zendframework/zend-developer-tools#115
Would it be possible to add all the CSS Markup into a CSS File so that when you view the source in a browser you don't have to scroll to find your code?
Right now I have to scroll past all the ZDT CSS Markup in the source to look at my own source and it can be quite annoying at times.
Originally posted by @diemuzi at zendframework/zend-developer-tools#118
Psalm uncovered wrong types returned by serialization methods.
Before 2.9.0 can be tagged this issue and other psalm complaints must be addressed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.