0fa9f57971
Improvements to upgrade.php script to improve Windows experience
2024-08-21 11:53:38 +01:00
68136ea217
Merge pull request #15052 from snipe/jerm/handle-windows-ca-jank-in-upgrade-script
...
upgrade.php: If we're on windows, make sure we can load intermediate certificates
2024-07-11 09:11:37 +01:00
c8fe002688
upgrade.php: If we're on windows, make sure we can load intermediate certificates
...
According to https://github.com/curl/curl/issues/12155 and 2d6333101a
Some corporate Windows proxy (mis)configurations don't pass along
intermediate certificates in their TLS handshakes, breaking lots of
things that don't work around it.
This creates a problem in our curl calls when checking for
.upgrade_requirements.json, and seems to be the source of errors for a
few of our users: https://github.com/snipe/snipe-it/issues/14826#issuecomment-2197611342
In this change, we detect when running on windows environments and load
the curl option that works around this.
2024-07-08 22:13:14 -07:00
25fabcc1be
More helpful output when we can't read .upgrade_requirements.json
...
Handle json decode errors and display the raw output in such cases, to
better understand what's happening and help debugging
2024-07-08 22:12:09 -07:00
0a5e58201a
Correctly account for "or" dependent extensions in upgrade script
2024-06-27 12:38:50 -07:00
b1e7c772ae
Added exif to required extensions
...
Signed-off-by: snipe <snipe@snipe.net >
2024-05-22 18:27:52 +01:00
5c1d4aff23
Capitalize N instead of y since no is default
2024-05-06 09:00:33 -07:00
20920c262d
Feat: add no-interactive flag for upgrade.php
...
Having a no-interactive flag is useful because attempting
to automate snipe-it upgrades is currently extremely janky.
You have to either:
a) read the prompts and pass in the input (the "correct" way)
b) pipe in input, e.g. `yes` and hope no new prompts
are added.
With the `no-interactive` flag, this can be fixed by both
allowing new prompts to be added without conflict
to user prompts, but also allowing automated upgrades (you could
choose to crash, or assign defaults).
2024-04-16 11:54:50 -05:00
f4c1460c2b
remove help text options until i put together the help text
2024-02-12 19:18:26 -08:00
bb2e1de0a8
Change how we check forward-looking upgrade requirements
...
In https://github.com/snipe/snipe-it/pull/14128 we added the capability
for the upgrade.php script to check version requirements _before_
downloading the new source, to help keep from breaking installations.
Turns out, `file_get_contents()` isn't a reliable way to grab a url, because
some systems have `allow_url_fopen` turned off in their PHP
configurations.
In this iteration, we swap that out for a curl function, while also
adding more error handling, the ability to entirely skip the
PHP version checks if for some reason you Just Can't query the upgrade
json correctly, as well as adding a lot of helpful text around the whole
issue.
Additionally, I've added some error checking around DB backups and
initial artisan down-ing, since shell_exec would happily march right
past any errors.
2024-02-12 19:18:26 -08:00
4e59b83885
Merge pull request #14128 from snipe/jerm/upgrade-dot-php
...
Add remote requirements checking to upgrade.php
2024-01-25 10:09:03 -08:00
a9d175a396
Check for max PHP version
...
Signed-off-by: snipe <snipe@snipe.net >
2023-07-05 18:47:48 +01:00
3a2b54fd47
Add libsodium shim, and mark the sodium extension as 'optional'
...
Trying to handle some composer.lock conflicts, as savely as possible.
2023-02-15 18:16:39 -08:00
ec2afee57d
Fixed yoda operator
...
Signed-off-by: snipe <snipe@snipe.net >
2023-02-06 12:39:12 -08:00
b10ea0c25c
Removed unused variable
...
Signed-off-by: snipe <snipe@snipe.net >
2023-02-06 12:38:56 -08:00
686d1aaae7
Removed unused variable
...
Signed-off-by: snipe <snipe@snipe.net >
2023-02-06 12:38:29 -08:00
fe3b9f9e86
Added a self-update suggestion in the upgrader
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-25 19:18:37 -07:00
2b5b3273e2
Strip quote marks from env_values
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-24 20:52:03 -07:00
fa2a3e4b03
Added a line break
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-24 20:08:04 -07:00
94a337fc9e
Rearrange a few thing
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-24 20:03:10 -07:00
8d9cdf9c15
Check for APP_ENV
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-24 19:56:42 -07:00
43e97ea6ea
Make printout more consistent
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-24 19:36:01 -07:00
b67ed3eac2
Check for present APP_KEY as well
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-24 19:24:03 -07:00
116ce931ce
Fixed path name to backup temp dir
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-24 18:44:32 -07:00
15d0fb4feb
Added permissions check
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-24 18:40:15 -07:00
132b164a74
Slightly clarified error text
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-24 17:51:46 -07:00
bdbe2c3ac6
Added a simple .env checker into the upgrader
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-24 17:43:23 -07:00
d316a3f044
Added trailing comma per convention
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-17 19:13:07 -07:00
105750bfde
Delete vendor/symfony/translation/TranslatorInterface.php in upgrader
...
Signed-off-by: snipe <snipe@snipe.net >
2022-05-17 19:11:03 -07:00
686e58806f
Update upgrade.php with newer requires
...
Signed-off-by: snipe <snipe@snipe.net >
2021-11-22 15:31:23 -08:00
c668cc3103
Typo in upgrade.php
...
Fixed typo on line 181. bootsrap/cache/services.php -> bootstrap/cache/services.php
2021-11-11 17:05:24 +00:00
bf7a856fa6
Update minimum PHP requirements to 7.2.5
2021-02-02 21:05:37 -08:00
65e6d56f1f
Display the extension error at the bottom of the extension list to make it more noticable
2020-12-15 14:09:42 -08:00
615051cf66
Skip posix_getpwuid in upgrader if posix isn’t installed
...
We don’t need it for anything else, so no need to require it. Posix not being installed usually means it’s a windows machine.
2020-11-25 01:19:32 -08:00
72126f7d44
Removed duplicate extension checks
2020-11-12 13:24:53 -08:00
31d0b4a46c
Merge remote-tracking branch 'origin/develop'
2020-11-10 12:39:55 -08:00
5759d4819e
Improved upgrade.php script to check for PHP extensions ( #8712 )
...
* Troubleshooting gd detection :(
* Welp, that didn’t work.
* Improvements to the update script that will make it easier to maintain
* Improved spacing
* Nicer intro
* Sorry for all the commits - I have to push in order to test :(
* More display improvements
* Phrasing!
* More formatting
* Removed extra line break
* Few more formatting changes
* Remove the config caching - it’s too confusing for users
* Added comments
* Temp required extension in the array so I can show output :)
* Added ascii x
* removed extra line break
* Made error message clearer
* Remove extra line
* Removed farts
* Changed phrasing for PHP upgrade warning
* Small tweaks per PR review
* Some spacing fixes
* Added confirmation of the either/ors
* Minor formatting tweaks
* Fixed weird indenting?
* Fixed missing $unused_file variable
2020-11-10 12:39:10 -08:00
c49788dd9f
Fixed weird linebreaks in upgrade.php
2020-11-10 09:08:13 -08:00
3641a6d451
Additional extension checking
2020-11-10 09:06:44 -08:00
8c79070cd9
Added some extension checking for upgrade.php
2020-11-10 08:47:35 -08:00
f8563bec94
Added some extension checking for upgrade.php
2020-11-10 08:46:19 -08:00
89d9b830a0
Updated PHP requirement
2020-11-09 21:05:41 -08:00
f138d3b781
Fixed typo
2020-11-03 01:00:37 -08:00
1379821876
Removed accompanying method, since we don’t use it
2020-10-21 12:02:25 -07:00
90dddee923
Remove the storage moving commands - we don’t use this
2020-10-21 12:00:40 -07:00
87464e6ec0
Merge branch 'develop' into integrations/2020-04-15-v5-merge
...
# Conflicts:
# README.md
# app/Http/Controllers/AccessoriesController.php
# app/Http/Controllers/Api/AssetsController.php
# app/Http/Controllers/Api/LicensesController.php
# app/Http/Controllers/Api/LocationsController.php
# app/Http/Controllers/Api/SettingsController.php
# app/Http/Controllers/Api/UsersController.php
# app/Http/Controllers/AssetModelsController.php
# app/Http/Controllers/Assets/AssetsController.php
# app/Http/Controllers/Auth/ForgotPasswordController.php
# app/Http/Controllers/CategoriesController.php
# app/Http/Controllers/CompaniesController.php
# app/Http/Controllers/ComponentsController.php
# app/Http/Controllers/ConsumablesController.php
# app/Http/Controllers/CustomFieldsetsController.php
# app/Http/Controllers/DepartmentsController.php
# app/Http/Controllers/LicensesController.php
# app/Http/Controllers/LocationsController.php
# app/Http/Controllers/ManufacturersController.php
# app/Http/Controllers/SettingsController.php
# app/Http/Controllers/SuppliersController.php
# app/Http/Controllers/UsersController.php
# app/Http/Requests/AssetRequest.php
# app/Http/Requests/ImageUploadRequest.php
# app/Models/LicenseSeat.php
# app/Models/Location.php
# app/Models/Setting.php
# composer.json
# composer.lock
# config/database.php
# config/version.php
# npm-shrinkwrap.json
# package.json
# public/css/AdminLTE.css
# public/css/AdminLTE.css.map
# public/css/overrides.css
# public/css/overrides.css.map
# public/css/skins/skin-blue-light.css
# public/css/skins/skin-blue.css
# public/css/skins/skin-green-dark.min.css
# public/js/app.js
# public/js/bootstrap-table.js
# public/js/bootstrap/js/bootstrap.js
# public/js/bootstrap/js/bootstrap.min.js
# public/js/build/all.js
# public/js/build/vue.js
# public/js/build/vue.js.map
# public/js/demo.js
# public/js/ekko-lightbox.js
# public/js/ekko-lightbox.min.js
# public/js/extensions/export/bootstrap-table-export.js
# public/js/extensions/multiple-sort/bootstrap-table-multiple-sort.js
# public/js/extensions/multiple-sort/bootstrap-table-multiple-sort.min.js
# public/js/extensions/toolbar/bootstrap-table-toolbar.min.js
# public/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js
# public/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js
# public/js/plugins/timepicker/bootstrap-timepicker.js
# public/js/plugins/timepicker/bootstrap-timepicker.min.js
# public/js/vue.js
# public/mix-manifest.json
# resources/assets/js/bootstrap-js.js
# resources/assets/js/bootstrap.min.js
# resources/assets/js/ekko-lightbox.js
# resources/assets/js/ekko-lightbox.min.js
# resources/assets/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js
# resources/assets/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js
# resources/assets/js/plugins/chartjs/Chart.js
# resources/assets/js/plugins/timepicker/bootstrap-timepicker.js
# resources/assets/js/plugins/timepicker/bootstrap-timepicker.min.js
# resources/assets/less/AdminLTE.less
# resources/assets/less/overrides.less
# resources/assets/less/skins/_all-skins.less
# resources/assets/less/skins/skin-black.less
# resources/assets/less/skins/skin-blue.less
# resources/assets/less/skins/skin-green.less
# resources/assets/less/skins/skin-purple.less
# resources/assets/less/skins/skin-red.less
# resources/assets/less/skins/skin-yellow.less
# resources/assets/less/variables.less
# resources/js/components/importer/importer-file.vue
# resources/lang/en/auth/message.php
# resources/lang/en/passwords.php
# resources/lang/es-CO/general.php
# resources/lang/es-ES/general.php
# resources/lang/es-VE/general.php
# resources/less/skins/skin-black-dark.less
# resources/less/skins/skin-blue-dark.less
# resources/less/skins/skin-contrast.less
# resources/less/skins/skin-green-dark.less
# resources/less/skins/skin-orange-dark.less
# resources/less/skins/skin-orange.less
# resources/less/skins/skin-purple-dark.less
# resources/less/skins/skin-red-dark.less
# resources/less/skins/skin-yellow-dark.less
# resources/views/accessories/checkin.blade.php
# resources/views/accessories/checkout.blade.php
# resources/views/accessories/edit.blade.php
# resources/views/account/profile.blade.php
# resources/views/account/view-assets.blade.php
# resources/views/asset_maintenances/edit.blade.php
# resources/views/auth/passwords/email.blade.php
# resources/views/auth/passwords/reset.blade.php
# resources/views/categories/edit.blade.php
# resources/views/companies/edit.blade.php
# resources/views/components/checkin.blade.php
# resources/views/components/checkout.blade.php
# resources/views/components/edit.blade.php
# resources/views/consumables/checkout.blade.php
# resources/views/consumables/edit.blade.php
# resources/views/custom_fields/fields/edit.blade.php
# resources/views/custom_fields/fieldsets/edit.blade.php
# resources/views/dashboard.blade.php
# resources/views/departments/edit.blade.php
# resources/views/groups/edit.blade.php
# resources/views/hardware/audit.blade.php
# resources/views/hardware/bulk-checkout.blade.php
# resources/views/hardware/bulk.blade.php
# resources/views/hardware/checkin.blade.php
# resources/views/hardware/checkout.blade.php
# resources/views/hardware/edit.blade.php
# resources/views/hardware/index.blade.php
# resources/views/hardware/quickscan.blade.php
# resources/views/hardware/view.blade.php
# resources/views/importer/import.blade.php
# resources/views/layouts/basic.blade.php
# resources/views/layouts/default.blade.php
# resources/views/layouts/edit-form.blade.php
# resources/views/licenses/checkin.blade.php
# resources/views/licenses/checkout.blade.php
# resources/views/licenses/edit.blade.php
# resources/views/locations/edit.blade.php
# resources/views/manufacturers/edit.blade.php
# resources/views/modals/upload-file.blade.php
# resources/views/models/bulk-edit.blade.php
# resources/views/models/custom_fields_form.blade.php
# resources/views/models/edit.blade.php
# resources/views/partials/bootstrap-table.blade.php
# resources/views/partials/forms/edit/address.blade.php
# resources/views/partials/forms/edit/asset-select.blade.php
# resources/views/partials/forms/edit/category-select.blade.php
# resources/views/partials/forms/edit/category.blade.php
# resources/views/partials/forms/edit/company-select.blade.php
# resources/views/partials/forms/edit/company.blade.php
# resources/views/partials/forms/edit/department-select.blade.php
# resources/views/partials/forms/edit/depreciation.blade.php
# resources/views/partials/forms/edit/email.blade.php
# resources/views/partials/forms/edit/image-upload.blade.php
# resources/views/partials/forms/edit/item_number.blade.php
# resources/views/partials/forms/edit/location-profile-select.blade.php
# resources/views/partials/forms/edit/location-select.blade.php
# resources/views/partials/forms/edit/location.blade.php
# resources/views/partials/forms/edit/maintenance_type.blade.php
# resources/views/partials/forms/edit/manufacturer-select.blade.php
# resources/views/partials/forms/edit/manufacturer.blade.php
# resources/views/partials/forms/edit/minimum_quantity.blade.php
# resources/views/partials/forms/edit/model-select.blade.php
# resources/views/partials/forms/edit/model_number.blade.php
# resources/views/partials/forms/edit/name.blade.php
# resources/views/partials/forms/edit/notes.blade.php
# resources/views/partials/forms/edit/order_number.blade.php
# resources/views/partials/forms/edit/phone.blade.php
# resources/views/partials/forms/edit/purchase_cost.blade.php
# resources/views/partials/forms/edit/purchase_date.blade.php
# resources/views/partials/forms/edit/quantity.blade.php
# resources/views/partials/forms/edit/serial.blade.php
# resources/views/partials/forms/edit/status.blade.php
# resources/views/partials/forms/edit/submit.blade.php
# resources/views/partials/forms/edit/supplier-select.blade.php
# resources/views/partials/forms/edit/supplier.blade.php
# resources/views/partials/forms/edit/user-select.blade.php
# resources/views/reports/custom.blade.php
# resources/views/settings/alerts.blade.php
# resources/views/settings/asset_tags.blade.php
# resources/views/settings/barcodes.blade.php
# resources/views/settings/branding.blade.php
# resources/views/settings/general.blade.php
# resources/views/settings/labels.blade.php
# resources/views/settings/ldap.blade.php
# resources/views/settings/localization.blade.php
# resources/views/settings/security.blade.php
# resources/views/setup/user.blade.php
# resources/views/suppliers/edit.blade.php
# resources/views/users/bulk-edit.blade.php
# resources/views/users/edit.blade.php
# resources/views/users/ldap.blade.php
# resources/views/users/print.blade.php
# resources/views/users/view.blade.php
# routes/api.php
# routes/web/hardware.php
# webpack.mix.js
2020-04-20 23:20:34 -07:00
7e3f718797
Update local instance of composer.phar on upgrade.
2020-04-03 13:13:30 -04:00
5290c47e2a
Merge branch 'develop' into v5-master-develop-integration
...
# Conflicts:
# .env.example
# .travis.yml
# Dockerfile
# README.md
# app/Console/Commands/LdapSync.php
# app/Console/Kernel.php
# app/Http/Controllers/AccessoriesController.php
# app/Http/Controllers/Api/AccessoriesController.php
# app/Http/Controllers/Api/AssetsController.php
# app/Http/Controllers/Api/LocationsController.php
# app/Http/Controllers/Api/SettingsController.php
# app/Http/Controllers/Api/UsersController.php
# app/Http/Controllers/AssetModelsController.php
# app/Http/Controllers/Assets/AssetFilesController.php
# app/Http/Controllers/Assets/AssetsController.php
# app/Http/Controllers/CategoriesController.php
# app/Http/Controllers/CompaniesController.php
# app/Http/Controllers/ComponentsController.php
# app/Http/Controllers/ConsumablesController.php
# app/Http/Controllers/DepartmentsController.php
# app/Http/Controllers/LicensesController.php
# app/Http/Controllers/LocationsController.php
# app/Http/Controllers/ManufacturersController.php
# app/Http/Controllers/ReportsController.php
# app/Http/Controllers/SettingsController.php
# app/Http/Controllers/SuppliersController.php
# app/Http/Controllers/UsersController.php
# app/Http/Middleware/EncryptCookies.php
# app/Http/Requests/AssetRequest.php
# app/Http/Transformers/AssetMaintenancesTransformer.php
# app/Importer/AssetImporter.php
# app/Models/AssetMaintenance.php
# app/Models/Location.php
# app/Models/User.php
# composer.json
# composer.lock
# config/backup.php
# config/database.php
# config/version.php
# public/mix-manifest.json
# resources/lang/en-ID/general.php
# resources/lang/vi/admin/settings/general.php
# resources/views/accessories/edit.blade.php
# resources/views/hardware/view.blade.php
# resources/views/layouts/default.blade.php
# tests/api/ApiCategoriesCest.php
2019-11-18 19:49:39 -08:00
124b249df4
Fixed #7289 - git fetch before checkout in upgrade.php
2019-08-15 01:32:20 -07:00
0eef0fc1dd
Sync with develop branch. ( #6377 )
...
Without this change argv[1] is ignored.
2018-10-31 11:11:41 -07:00