1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-07 12:00:09 +02:00
Commit Graph

51 Commits

Author SHA1 Message Date
382cb177be Correctly load presets from config file 2022-05-21 15:24:40 +02:00
db8197df3d 👌 Handle multiple modes w/ Xdebug menu item
This commit also fixes the width of the header items.
2022-05-19 19:06:03 +02:00
40e404fe24 👌 Prototype (non-functional) for presets 2022-05-19 01:50:15 +02:00
990152d77d Allow replacing of config values 2022-05-19 00:08:26 +02:00
2e61479c75 Allow reading of configuration files 2022-05-18 19:45:16 +02:00
0579ebb1c1 ️ More efficient extension parsing 2022-05-18 19:23:56 +02:00
b0c62e226a 👌 Code cleanup 2022-05-15 15:15:49 +02:00
12163bc87b 🔀 Merge branch 'main' into dev/5.4 2022-05-13 17:04:07 +02:00
bd34c2b255 👌 Improved nginx file parsing 2022-05-13 00:24:54 +02:00
540ea5c310 👌 Changes to updater 2022-05-10 18:34:34 +02:00
4ba2b25f18 👌 App version parsing 2022-05-10 18:09:22 +02:00
884784d024 🐛 Handle trailing semicolon (#170) 2022-05-10 10:26:48 +02:00
e81ff2870d Add test and prepare for new prerelease 2022-05-10 01:00:18 +02:00
997fb27596 👌 Update copyright, verbose logging tweak 2022-05-07 18:43:36 +02:00
99881bf4cd ♻️ WIP: Refactor determining PHP configuration
The way .ini files are loaded is changing with this commit. Instead of
directly saving which extensions were found, the extensions loaded are
now determined by reading the .ini file.

However, there are some performance concerns here. Perhaps it is worth
*not* reloading the contents of these files unless absolutely necessary.
2022-05-04 20:25:59 +02:00
4d04275c57 Added linting 2022-05-03 18:16:26 +02:00
ef9e0fd916 Begin work on Xdebug mode switcher (#168) 2022-05-01 22:07:18 +02:00
af8807f799 🔀 Merge bugfixes from 5.2 into 5.3 2022-04-23 12:25:18 +02:00
df506e4128 🐛 Fix various minor issues (discovered via #162)
- Renaming the configuration files from `www.conf` to the backup
  (`disabled-by-phpmon`) will now succeed if the `disabled-by-phpmon`
  file already exists. This would fail if the `disabled-by-phpmon` file
  already existed in previous builds.

- The PHP-FPM alert when there's an issue with a missing socket
  configuration file has been tweaked and now contains a workaround if
  you want to run a newer version of PHP (e.g. PHP 8.2) that is not
  officially supported by Valet yet.

- When attempting to list the PHP version numbers, the `parse()` method
  is now used, as opposed to `PhpVersionNumber.make()`, which couldn't
  correctly handle pre-release versions of PHP.

- Updated tests to reflect these changes to `PhpVersionNumber`.
2022-04-20 12:19:02 +02:00
2c0c0c5a11 Correctly detect secured proxies 2022-04-12 20:43:57 +02:00
f0f7a3f7d6 👌 Scan proxies (#105) 2022-04-11 22:56:40 +02:00
8304d774c3 ♻️ Refactoring of files and tests 2022-04-02 15:48:21 +02:00
faeea4e866 Ensure normal nginx file does not have proxy 2022-03-31 18:28:47 +02:00
6470daf7d3 Added test to parse the proxy address 2022-03-31 18:27:26 +02:00
94139a3669 🚚 Moved test files into separate directories 2022-03-31 18:09:50 +02:00
78d8030ed6 Fix tests 2022-03-25 23:55:41 +01:00
1d74e1536c Add default site to site list (#125) 2022-03-20 14:38:58 +01:00
1d6cfd419e Fix tests 2022-03-17 23:32:13 +01:00
a8bad8447a 👌 isolatedVersion as a lazy property 2022-03-15 18:27:38 +01:00
ca8f5a8fbe Speed up nginx parsing 2022-03-15 18:16:28 +01:00
a0e7aec228 Parse nginx files + tests 2022-03-14 23:35:08 +01:00
692d3c143f ♻️ Refactor Composer window logic 2022-02-23 13:39:49 +01:00
dae47e3779 ♻️ Refactor startup procedure 2022-02-11 23:24:38 +01:00
f5af33c098 🐛 Correctly parse RC PHP version (#132)
It'll be a while before a new release candidate is available, but this
bug has now been resolved.

A new `PhpVersionNumber.parse` method has been added which can throw.

The `VersionExtractor` class is now capable of extracting version
numbers from all strings now too, and isn't just used to determine
the Valet version number.

New tests have been added to handle these scenarios.

This commit also removes the phpmon-cli component, which wasn't being
updated or maintained (it was an experiment).
2022-02-08 18:51:16 +01:00
d0f7d2c5e9 Handle >= and > constraints 2022-01-29 19:10:17 +01:00
567373f8da Version constraint checks (#84)
The version constraint checks will also be used in the future to
evaluate whether any given site's PHP constraint (if set) is
valid for the currently linked version of PHP.

For example, assuming you have PHP 8.1.2 linked, we could evaluate:

* A site requires "8.0" -> invalid
* A site requires "^8.0" -> valid
* A site requires "^8.0.0" -> valid
* A site requires "~8.0" -> valid
* A site requires "~8.0.0" -> invalid

Currently, this constraint check is used to determine which versions
that are currently installed are good suggestions to switch to.

If you have a site with constraint "^8.0" for example, and you have
PHP 8.0 and 8.1 installed (with 8.1 linked), then you will get a
suggestion to switch back to 8.0.
2022-01-23 03:59:29 +01:00
d2cd567fd2 Filter only needed services (#72) 2022-01-11 21:22:17 +01:00
a5212b436e Tweaked test copy (#72) 2022-01-11 21:22:17 +01:00
b16250c2be Added tests for Homebrew service parsing (#72) 2022-01-11 21:22:17 +01:00
3b4a1a0654 Enable parsing of Homebrew services JSON (#72) 2022-01-11 21:22:17 +01:00
e76c6e14e4 ♻️ Added logger class 2021-12-21 17:06:03 +01:00
a6387e96e7 ♻️ Separate some of the PHP config logic from the app 2021-12-21 15:30:50 +01:00
e5ba074936 Check Valet version and compare to recommended version
As part of the boot procedure, recommend upgrading Valet if the version
seems to be too old. For version 4.1 of PHP Monitor, the version has
been hard-coded to 2.16.2 (for PHP 8.1 compatibility).
2021-12-16 01:44:43 +01:00
967743715b ♻️ Cleanup 2021-11-29 18:33:20 +01:00
0986b97051 ♻️ Add valet command (#34), read Valet configuration (#58) 2021-11-29 18:33:20 +01:00
493b5945f9 👌 Major changes to PHP version detection
* The information extracted from Homebrew's JSON command now also
  includes information about linked keg and installations.

* The mapped versions in the App class now contain information about
  the Homebrew installation as well.

* A HomebrewDiagnostics class has been added, which is currently able
  to detect conflicts between the `php` formulae of core and the
  `shivammathur/php` tap (which is currently an issue, see #54)

* Alerts are now displayed as critical if they are truly problematic.

* PhpInstallation was renamed to ActivePhpInstallation, to make room
  for a generic PhpInstallation object which contains cached info.

* Shell.pipe() now returns the contents of standardError if
  standardOutput was empty and there was some data in standardError.
  This makes it easier to debug the output of commands that output to
  standardError. (For example, failed brew commands might.)
2021-11-28 02:20:56 +01:00
23720c5dc9 🐛 Fix #45: Adjusted regex to support spaces 2021-06-07 19:13:52 +02:00
0c0e7fc87d Extension loading improvements (#31) and more
* The README has been updated with additional information
* The acknowledgements section has been added to the README
* The php@X.X/opt/bin/php-config binary is now used (#39)
* Extensions are now loaded from all possible .ini files
* PHP Monitor's preferences window can now be triggered via hotkey
* The first nine extensions can be triggered via hotkey
2021-04-07 16:58:05 +02:00
2f15af4ff8 Improved test 2021-04-01 20:44:53 +02:00
e29e8416d5 Fix tests, add test for version detection 2021-04-01 20:38:24 +02:00