Commit Graph

249 Commits

Author SHA1 Message Date
Loz Calver
29fa365d10
Fix support for setting TEMP_PATH in .env (fixes #8099) (#10138) 2021-11-16 09:35:28 +13:00
Maxime Rainville
0da15f0f27 Merge branch '4.7' into 4 2021-01-19 15:33:56 +13:00
Ingo Schommer
5f7239fc3d
Merge pull request #9765 from open-sausages/pulls/4/test-setup-confusion
Warn on database misconfiguration in test runs
2021-01-14 09:18:14 +13:00
William Desportes
c932d7e7fb
Fix the phpdoc blocks 2020-12-21 22:23:23 +01:00
Steve Boyd
af933e8226 MNT Double quote yaml string, fix phpcs warnings 2020-11-30 11:37:35 +13:00
Ingo Schommer
a3ae4922e4
Brand naming
Co-authored-by: Aaron Carlino <unclecheese@leftandmain.com>
2020-11-12 15:32:26 +13:00
Ingo Schommer
6306d2ede3 More specific "database missing" error message
It's misleading to imply that an .env doesn't exist when it's not what the actual check looks for.
It's also poor design to hardcode an unrelated error message in a "redirect to installer" function,
which only worked because this function was called from exactly one other place where this
error message was correct.
2020-11-12 13:51:24 +13:00
Garion Herman
e89ae93ac9 FIX Harden hasMethod() against invalid values
This method should typehint the incoming value once union types are
available, but for now this ensures that method_exists() is not called
on scalar values, which is unsupported in PHP 8.
2020-10-28 09:34:33 +13:00
Guy Marriott
478d487f0e
Merge pull request #9707 from robbieaverill/pulls/4.7/exceptions 2020-10-01 17:16:43 -07:00
Garion Herman
8ad4c4e024 FIX Fix namespace parsing under PHP 8, tweak readability of parser
$hadNamespace was ambiguously named, so the original PHP 8 support
update marked it true when it was strictly meant to indicate that a
namespace separator token had been encountered, resulting in bungled
parsing of complex class specs like Class(["arg" => true]).
2020-09-30 16:16:30 +13:00
Robbie Averill
27bd5d12e3 ENH Replace E_USER_ERROR errors with exceptions 2020-09-24 23:51:21 -07:00
Dan Hensby
ae0ece2b02
Merge pull request #9665 from creative-commoners/pulls/4/php8-fqcn-token 2020-09-18 20:44:22 +01:00
Garion Herman
f1c94e6d54 FIX Allow quotes in expected ReflectionExceptions within tests 2020-09-15 17:40:42 +12:00
Garion Herman
bad0662291 FIX Disable libxml_disable_entity_loader() calls in PHP 8 2020-09-15 17:40:42 +12:00
Sam Minnee
09fb33e657 FIX: Avoid passing non-class to get_parent_class()
Throws errors in PHP 8
2020-09-15 17:40:42 +12:00
Steve Boyd
4c3a5441b2 Merge branch '4.6' into 4 2020-09-09 13:58:35 +12:00
Nicolaas
27c1c72912
FIX ModuleManifest::getModuleByPath fix to ensure right module is returned (#9569)
* FIX: ModuleManifest::getModuleByPath returns the wrong module #9561
Co-authored-by: Nicolaas Thiemen <nt@sunnysideup.co.nz>
2020-09-09 13:47:36 +12:00
Sam Minnee
622cf8b914 FIX: Drop parameter names in Injector instantiation to preserve behaviour in PHP 8
Fixes #9667
2020-09-07 17:24:00 +12:00
Garion Herman
08010d5933 NEW Support namespace tokens in ClassInfo::parse_class_spec()
The T_NAME_QUALIFIED and T_NAME_FULLY_QUALIFIED tokens are introduced
in PHP 8, and encapsulate theentire FQCN, replacing the previous
structure of a group of T_STRINGs and T_NS_SEPARATORs.
2020-09-07 17:23:56 +12:00
Garion Herman
680adbd10b NEW Add recipe-core to default VersionProvider module list
Recipe versions are a more useful indicator than the framework module
version, so if installed we want to show the recipe-core version. The
cms module expands upon this to include recipe-cms.
2020-08-26 14:49:11 +12:00
Garion Herman
c143941e44
Merge pull request #9628 from creative-commoners/pulls/4/version-provider
NEW Additional logic for VersionProvider
2020-08-21 14:25:23 +12:00
Sam Minnée
b810b7d5c9
API: Allow for user-created objects to have values passed in the constructor (#8591) 2020-08-20 12:28:31 +12:00
Steve Boyd
e19ef240f7 NEW VersionProvider now supports recipes as well as modules 2020-08-11 13:04:48 +12:00
Jackson Darlow
fcc7a9ce5b
Added array declaration to VersionProvider::$modules
Co-authored-by: Robbie Averill <robbie@averill.co.nz>
2020-06-15 11:44:43 +12:00
Jackson Darlow
dfc01457d6 #3236 Added missing config definitions (private statics) 2020-06-11 13:35:15 +12:00
Garion Herman
50484417da Merge branch '4.5' into 4 2020-04-23 23:11:46 +12:00
Daniel Hensby
237b2d5f74
Convert array delcarations to short array syntax 2020-04-20 18:58:09 +01:00
mattclegg
2169891651
BUGFIX: Ensure realpath returns a string for stripos
[Deprecated] stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
2020-04-19 11:21:34 +05:45
Michal Kleiner
30c3b127c1 NEW Add ClassInfo method to get all classes with a given extension applied 2020-03-24 10:48:35 +13:00
Maxime Rainville
acd7d94167 Merge branch '4.4' into 4.5 2020-02-17 13:07:26 +13:00
Serge Latyntcev
ad1b00ec7d [CVE-2019-19325] XSS through non-scalar FormField attributes
Silverstripe Forms allow malicious HTML or JavaScript to be inserted
through non-scalar FormField attributes, which allows performing XSS (Cross-Site Scripting)
on some forms built with user input (Request data). This can lead to phishing attempts
to obtain a user's credentials or other sensitive user input.
There is no known attack vector for extracting user-session information or credentials automatically,
it required a user to fall for the phishing attempt.
XSS can also be used to modify the presentation of content in malicious ways.
2020-02-17 09:58:29 +13:00
Mojmir Fendek
e2bea6b41f API Add withConfig method (#9011)
* With config functionality added.
* Update docs/en/02_Developer_Guides/04_Configuration/00_Configuration.md
2019-10-31 16:12:04 +13:00
Serge Latyntcev
33a28394d6 Merge branch '4.4' into 4 2019-10-18 15:59:28 +13:00
Serge Latyntcev
0cf5d4cbe2 Merge branch '4.3' into 4.4 2019-10-18 15:58:13 +13:00
Serge Latyntcev
46b9530d88 PSR2 linting fixes 2019-10-18 15:31:39 +13:00
Serge Latyntcev
7873efde9c Merge branch '4.4' into 4 2019-10-18 10:58:19 +13:00
Michal Kleiner
1a2dbfd3a5
Update conditional logic when checking array keys before removing methods in CustomMethods 2019-09-30 10:17:59 +13:00
Michal Kleiner
52a039f631 Check array keys existence prior to their usage when removing methods in CustomMethods 2019-09-27 14:57:15 +12:00
UndefinedOffset
571a4d9ace NEW: Added support for config condition if PHP extension is loaded 2019-07-02 14:55:36 -03:00
Aaron Carlino
c747b1f8d3 Merge branch '4.3' into 4.4 2019-06-10 17:32:07 +12:00
Aaron Carlino
f766555d61 Merge branch '4.2' into 4.3 2019-06-10 17:27:05 +12:00
Serge Latyntcev
ca56e8d78e [CVE-2019-12246] Denial of Service on flush and development URL tools 2019-06-10 17:23:56 +12:00
Ingo Schommer
8324235eda API Opt-out of in-memory caching factory
In-memory caches are typically more resource constrained (number of items and storage space).
Give cache consumers an opt-out if they are expecting to create large caches with long lifetimes.
Use case: https://github.com/silverstripe/silverstripe-assets/pull/282
2019-06-07 12:21:10 +12:00
Andre Kiste
0c6c57f1ef Add getFieldMap method to retrieve a list of all fields for any giv… (#8892)
* Add `getFieldMap` method to retrieve a list of all fields for any given class

* Add `TagsToShortcodeTask` to upgrading guide

Adding after the file migration part as this is where it makes the most sense to run it.

* `getFieldMap` accepts an array

* Move to `DataObjectSchema`

* Add `HTMLVarchar` to documentation
Minor refactoring

* Add test for checking that `subclassesfor` works without the base class
Add test `DataObjectSchema::getFieldMap` returns the correct array

* Remove cms dependency
2019-04-30 10:43:14 +12:00
Rafael Marins de Sousa
68337bd8be Including is_array validation to getEnv method. When SS website is deployed to FortRabbit .env file is read as string what causes the website to crash, due to the lack of type check at getEnv method. 2019-04-04 15:41:13 +13:00
Aaron Carlino
fc6213c293 Merge branch '4.3' into 4 2019-03-27 13:25:57 +13:00
Aaron Carlino
9eac374b13 Use strcasecmp 2019-03-27 12:40:56 +13:00
Aaron Carlino
aa491d9294 Fix tests 2019-03-20 12:33:00 +13:00
Aaron Carlino
39a29fa2f6 ENHANCEMENT: has_extension() should allow injector overrides 2019-03-20 12:33:00 +13:00
Aaron Carlino
ab5bbda88c Merge branch '4.3' into 4 2019-01-10 12:31:27 +13:00