PHPUnit xdebug.coverage_enable=On message - macos

How to get through "You need to set xdebug.coverage_enable=On in your php.ini." message?
I have set xdebug.coverage_enable=On in the proper (--ini) php.ini file but it had no effect. Im on mac os x snow leopard

What version of xdebug are you using?
php --ri xdebug
will tell you that version (amongst everything else)
PHP_CodeCoverage 1.0.2 (which is used by PHPUnit to collect code coverage information) has this bit of source code
if (version_compare(phpversion('xdebug'), '2.2.0-dev', '>=') &&
!ini_get('xdebug.coverage_enable')) {
die("You need to set xdebug.coverage_enable=On in your php.ini.\n");
}
Based on this logic you would get this error only if you have installed xdebug 2.2.0-dev. Which, in my opinion should not be used before it is stable.
xdebug 2.1.0 is stable and works well enough.
If you however are not running 2.2.0-dev, then this starts to look like a bug, and you need to give more information about what versions of everything relevant you are using.
Update - it looks like this was an actual bug in PHP_CodeCoverage that was fixed in 1.0.2 3 days ago. You probably had an older version. Upgrade, and it should be fine now.

Related

Elixir debugger crashes erlang on macOS

macOS Big Sur 11.3.1 elixir 1.9.4 erlang 22.0
I am brand new to Elixir and I am trying to run a debugger for the first time. I run my webserver's development environment with iex -S mix and get the interactive elixir prompt. Then I type :debugger.start() and receive an immense output and then erlang crashes.
This is a small snippet, but the actual output is huge.
== NULL" failed in Register(): Class "wxTextValidator" already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() multiple times or linked some object file twice)?
I have to use the versions listed at the top of the post, the project is version locked. Does anyone have any insight into what is causing this? It may be related to what I had to do to install erlang to begin with. But I'm not sure.
Thank you in advance.
I have never used the debugger, but I believe it relies on some of the same components as the observer. I would recommend installing Elixir and Erlang via asdf -- that makes it easier to install specific versions.
Once you've got things installed, you can use homebrew to install wxmac
brew install wxmac
Then to your mix.exs, add :observer, :wx to your extra_applications, e.g.
extra_applications: [:logger, :observer, :wx]

Upgrading topology from Python 2 to 3

I had a Streamparse topology that was originally developed using Python 2. I am now trying to upgrade it to Python 3 using the 2to3 tool. I have also upgraded Streamparse to 3.15.1 (not sure which version the topology was originally developed against). When I try to run my topology using sparse run -d I get the following error:
AttributeError: 'ShellBoltSpec' object has no attribute 'componentId'
I presume it is because the ShellBoltSpec class has changed from Python 2 to Python 3 but I have no idea how to go about fixing this. Does anybody have any suggestions?
Regardless of 2to3, it could be that upgrading Streamparse to version 3.x.x broke backwards compatibility with the previous version you worked with, if that was 2.x.x or below. If so, you need to explicitly edit your code to be compatible with Steamparse 3.x.x.

Gentoo package mask not working with exact version number

I installed mysql-5.6.42 on a Gentoo system. There's a newer version 5.7.24, but I don't want to upgrade for that version. So I masked the package under /etc/portage/package.mask
=dev-db/mysql-5.6.42
When I want to upgrade for example php portage wants to upgrade mysql to 5.7.24.
Why does package.mask not work?
I tried <=dev-db/mysql-5.7.0 the result is the same.
Please check your versions again
=dev-db/mysql-5.6.24 vs. >dev-db/mysql-5.6.42.
echo ">dev-db/mysql-5.6.42" > /etc/portage/package.mask/mysql
I think there is a typo in your question. Perhaps it is also in your config.
See also: https://wiki.gentoo.org/wiki/Knowledge_Base:Masking_a_package

Updating Ruby from 2.3 to 4.2 with RVM: "The requested url does not exist(22)"

When running
rvm install ruby-4.2.7
I get the following error:
The requested url does not exist(22): 'https://cache.ruby-lang.org/pub/ruby/4.2/ruby-4.2.7.tar.bz2'
It then tries the fallback which also fails. I've run through a couple different SO articles, tried different versions of RVM, and also specified a desired patch level (p95) to no avail.
I think there is something that I don't understand about how that URL is generated. It's my first day at my new job, I'm setting up my environment and this error is killing me!
Thanks!
You can update Ruby but only to version 2.4.0.
Try reading "Installfest". That's the quickest Ruby and Rails installation instruction I know and it includes installing RVM.

IntelliJ PHP Interpreter not finding homebrew installed PHP in Mac OS X

IntelliJ will not detect installed PHP even though it does exist and can be used from the command line. I have installed php via brew install php54. Below is a screenshot of my issue along with evidence that it does exist. I've tried clicking the refresh button many times, but it will not pick up the binary.
I just had the same problem. Through some hackery, I discovered it was due to some ansi escape sequences in my prompt. From your screenshot it looks like you might have the same or a similar issue.
Essentially, IntelliJ uses a php script to create an XML string out of some PHP configuration items, including $_SERVER. The $_SERVER superglobal contains environment variables and therefore picked up the escape character (0x1b) in the sequence. Since the escape character is invalid in XML, IntelliJ rejected the output and concluded the PHP interpreter was bad.
Once I removed the ansi sequences from my prompt, IntelliJ recognized the PHP interpreter right away.
Hope this helps.
I had the same issue, and it turned out my Homebrew install was severely out of date when I installed PHP. To fix it, I ran:
brew update && brew upgrade
With some quick help from jetbrains support, the latest EAP version fixed it for me: http://confluence.jetbrains.com/display/IDEADEV/IDEA+14+EAP
http://youtrack.jetbrains.com/issue/WI-23045
If you prefer to keep investigating the issue, see Chris' answer and search the idea.log for something like:
INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/php.xml file is null
idea.log locations
I've just now come back to this after some time and it looks like the latest version IntelliJ works with PHP installed via Homebrew. So I'm going to mark this as resolved.

Resources