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

Update for disabled module #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

alexpts
Copy link

@alexpts alexpts commented Mar 29, 2021

Disabled module has config:

[blackfire]
;extension="/usr/local/Cellar/blackfire-php80/1.53.0/blackfire.so"
blackfire.agent_socket = unix:///usr/local/var/run/blackfire-agent.sock
;blackfire.log_level = 3
;blackfire.log_file = /tmp/blackfire.log

I have error on update:

==> Upgrading blackfireio/blackfire/blackfire-php80 1.53.0 -> 1.54.0
==> Downloading https://packages.blackfire.io/homebrew/blackfire-php_1.54.0-darwin_amd64-php80.tar.gz
######################################################################## 100.0%
Error: An exception occurred within a child process:
  Utils::Inreplace::Error: inreplace failed
/usr/local/etc/php/8.0/conf.d/ext-blackfire.ini:
  expected replacement of /^(zend_)?extension=.+$/ with "extension=\"/usr/local/Cellar/blackfire-php80/1.54.0/blackfire.so\""

Disabled module have config:
```
[blackfire]
;extension="/usr/local/Cellar/blackfire-php80/1.53.0/blackfire.so"
blackfire.agent_socket = unix:///usr/local/var/run/blackfire-agent.sock
;blackfire.log_level = 3
;blackfire.log_file = /tmp/blackfire.log
```

Now I have error on update:
```
==> Upgrading blackfireio/blackfire/blackfire-php80 1.53.0 -> 1.54.0
==> Downloading https://packages.blackfire.io/homebrew/blackfire-php_1.54.0-darwin_amd64-php80.tar.gz
######################################################################## 100.0%
Error: An exception occurred within a child process:
  Utils::Inreplace::Error: inreplace failed
/usr/local/etc/php/8.0/conf.d/ext-blackfire.ini:
  expected replacement of /^(zend_)?extension=.+$/ with "extension=\"/usr/local/Cellar/blackfire-php80/1.54.0/blackfire.so\""
```
@alexpts
Copy link
Author

alexpts commented Apr 21, 2021

@romainneutron can you review and merge PR?

@alexpts
Copy link
Author

alexpts commented Sep 3, 2021

@fabpot can you check PR and merge?

Co-authored-by: Jérémy Derussé <jeremy@derusse.com>
@alexpts
Copy link
Author

alexpts commented Sep 3, 2021

LGTM

@byan
Copy link

byan commented Oct 11, 2021

merge it please~~~

I often disable it for xdebug's compatiblity.

@pierredup
Copy link

@blackfire-tortue-geniale any chance to get this PR merged? This error still happens with every update

==> Upgrading blackfireio/blackfire/blackfire-php74
  1.74.1 -> 1.75.0

Error: An exception occurred within a child process:
  Utils::Inreplace::Error: inreplace failed
/opt/homebrew/etc/php/7.4/conf.d/ext-blackfire.ini:
  expected replacement of /^(zend_)?extension=.+$/ with "extension=\"/opt/homebrew/Cellar/blackfirephp74/1.75.0/blackfire.so\""

@@ -164,7 +164,7 @@ def config_filepath
def write_config_file
if config_filepath.file?
inreplace config_filepath do |s|
s.gsub!(/^(zend_)?extension=.+$/, "extension=\"#{module_path}\"")
s.gsub!(/^(;\s*)?(zend_)?extension=.+$/, "extension=\"#{module_path}\"")

Choose a reason for hiding this comment

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

Should it not be

Suggested change
s.gsub!(/^(;\s*)?(zend_)?extension=.+$/, "extension=\"#{module_path}\"")
s.gsub!(/^(;\s*)?(zend_)?extension=.+$/, "\\1extension=\"#{module_path}\"")

Otherwise, it explicitly enables the module which has been disabled, so it must be manually disabled again.

@pierredup
Copy link

Is there any chance to get this PR merged? This error still happens with every update

==> Upgrading blackfireio/blackfire/blackfire-php74
  1.76.0 -> 1.77.0

Error: An exception occurred within a child process:
  Utils::Inreplace::Error: inreplace failed
/opt/homebrew/etc/php/7.4/conf.d/ext-blackfire.ini:
  expected replacement of /^(zend_)?extension=.+$/ with "extension=\"/opt/homebrew/Cellar/blackfire-php74/1.77.0/blackfire.so\""

cc @blackfire-tortue-geniale @fabpot @nicolas-grekas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants