Permalink
Commits on Sep 25, 2018
  1. NEW: Add Hierarchy::prepopulate_numchildren_cache() (#8380)

    sminnee authored and maxime-rainville committed Sep 25, 2018
    * NEW: Add Hierarchy::prepopulate_numchildren_cache()
    API: Hierarchy::stageChildren() customisations must be applied to the base class and not include record-specific behaviour.
    
    Adds the ability to prepopulate the cache for Hierarchy::numChildren()
    in a batch.
    
    Note that this optimisation means that stageChildren() is not called on
    each record in order to calculate numChildren(). This means that the
    structure of the stageChildren() query must be the same for all records
    and the behaviour cannot be customised only for a subclass of the base
    data class. For example, apply your customisations to SiteTree and not
    a subclass.
    
    This is an useful part of optimising the query count on tree generation.
    See #8379
    
    * NEW: Add Hierarchy::prepopulateTreeDataCache()
    
    This provides a more extensible way of preopulating caches for optimised
    tree generation.
    
    Fixes #8391
Commits on Sep 19, 2018
  1. NEW: Add ?showqueries=backtrace

    sminnee committed Sep 19, 2018
    This variant of showqueries will include a backtrace after each query.
    This is extremely verbose but can be helpful when diagnosing where
    queries have come from.
    
    This is something that I have frequently added as a local hack on my
    environment, I figured that exposing it as a formal feature would be
    useful.
Commits on Jul 23, 2018
  1. FIX: Remove X-Requested-With from default Vary header

    sminnee authored and dhensby committed Jul 4, 2018
    3.x forward port of #8242
Commits on May 21, 2018
  1. Add semver reference in core committers guide

    sminnee committed May 21, 2018
Commits on Feb 17, 2018
  1. NEW: Add record count to dev/build output.

    sminnee committed Feb 17, 2018
    This small piece of metadata is intended to expose record counts to
    developers as an information radiator: from time to time, SilverStripe
    tables can get very large, and this exposes this information without
    the developer seeking it out. 
    
    It’s reasonable to expect that count(*) calls aren’t too time consuming,
    even on large tables.
    
    On a small test run, dev/build execution went from 3.85s to 3.98s (a 3%
    or 130ms increase). Given the small relative impact it should be okay.
    Where this is inappropriate, it can be disabled with a config setting.
Commits on Nov 5, 2017
  1. FIX: Fix ContextSummary behaviour with UTF8 chars

    sminnee committed Nov 5, 2017
    Fixes #1396
    
    Ensure that DBTextTest has UTF8 test cases
Commits on Oct 20, 2017
  1. Merge branch '4.0' into 4

    sminnee committed Oct 20, 2017
Commits on Oct 8, 2017
  1. Fixed incorrect statement on ID generation

    sminnee committed Oct 8, 2017
Commits on Aug 25, 2017
  1. FIX: Removed unnecessary database_is_ready call.

    sminnee committed Aug 25, 2017
    This shaves about 45ms from every request (PHP 7.1 on a 2013 rMBP), 
    cutting down execution time of a “hello world” controller by about 33%.
    
    database_is_ready is still used in dev/build and ?flush=1 to stop people
    from people bypassing security by DOSing the database or otherwise
    forcing a DatabaseException
Commits on Aug 22, 2017
  1. FIX: Prevent repeated lookup of obj.dependencies by Injector

    sminnee authored and Damian Mooyman committed Aug 21, 2017
    This unnecessary repeated call to Injector slows down the construction
    of frequently instantiated classes.
    
    On admin/pages, this reduced execution from 1.67s to 1.56s, and it
    reduced the impact of having an extension added to DBField by 33%
    (from 100ms to 67ms)
Commits on Aug 15, 2017
  1. FIX: Remove deprecated assert() usage.

    sminnee committed Aug 15, 2017
    This stopped working in PHP 7.2
Commits on Aug 14, 2017
  1. FIX: Fix latent bug in DataObject

    sminnee committed Aug 14, 2017
    This didn’t show up until we ran tests on PHP 7.3-dev
  2. NEW: Test php 7.2

    sminnee committed Aug 14, 2017
    Travis now supports PHP 7.2 testing, and we should add this to our suite
    so that SilverStripe 4 can be released with PHP 7.2 support.
    
    PHP 7.2 is due for released in November, a little after when SS4 is
    expected to go stable.
Commits on Jun 29, 2017
  1. FIX: DataObject::get_one() misses return null, not false

    sminnee committed Jun 29, 2017
    Fixes #5441
Commits on Jun 28, 2017
  1. API: ModulePath template global now takes any composer package name.

    sminnee authored and Damian Mooyman committed Jun 27, 2017
    NEW: URL generation now handled by pluggable ResourceURLGenerator service.
    NEW: Requirements::javascript() and Requirements::css() now support “vendor/package:resource” syntax.
    
    These changes will make it easier to us to fully abstract:
     - file access from module location
     - file location from URL generation
    
    API: ModulePath template global now takes any composer package name.
    NEW: URL generation now handled by pluggable ResourceURLGenerator service.
    NEW: Requirements::javascript() and Requirements::css() now support “vendor/package:resource” syntax.
    
    These changes will make it easier to us to fully abstract:
     - file access from module location
     - file location from URL generation
  2. MINOR: Drop dual MYSQL/PGSQL builds for PHP7

    sminnee committed Jun 28, 2017
    We can get away with testing MySQL on PHP 5.6
    and PHP 7.1 and testing PGSQL on PHP 7.0. We don’t
    need a full matrix.
  3. MINOR: More PHP7 in travis builds

    sminnee committed Jun 28, 2017
    PHP7 is faster than PHP5.6 so we should use it for as many builds
    as possible.
    
    This leaves 1 build - the coverage build - running on PHP5.6
    and puts the rest on PHP7.
Commits on Jun 27, 2017
  1. fix - session now uses request

    sminnee authored and Damian Mooyman committed Jun 25, 2017
  2. API: Director::handleRequest() is no longer static - use a Director s…

    sminnee authored and Damian Mooyman committed Jun 25, 2017
    …ervice
    
    NEW: Add HTMLMiddlewareAware trait to HTTPApplication, Director, and RequestHandler
    NEW: Allow service specs to be passed to Director rules.
    
    This refactor of the controller middlewares takes a service definition
    approach rather than a static-method-and-config approach that Director
    historically had.
    
    The use of a trait for middleware means that the Middlewares array
    property can be defined on RequestHandler, Director, and HTTPApplication
    objects in the same way.
  3. API: Remove $sid argument of Session::start()

    sminnee authored and Damian Mooyman committed Jun 25, 2017
    NEW: Pass HTTPRequest to session
    NEW: Pass HTTPReuqest optionally to Director statics
    
    The session handler now expects to operate on a specific
    HTTPRequest object.
  4. NEW: Add TrustedProxyMiddleware

    sminnee authored and Damian Mooyman committed Jun 23, 2017
    API: SS_TRUSTED_PROXY_HOST_HEADER replace with middleware config
    API: SS_TRUSTED_PROXY_PROTOCOL_HEADER replace with middleware config
    API: SS_TRUSTED_PROXY_IP_HEADER replace with middleware config
    API: Front-End-Https = “on” header no longer supported
    
    This middleware replaces the TRUSTED_PROXY setting and shifts its
    configuration out of the env vars and bootstrap and into the Director
    flow.
  5. NEW: Add HTTPRequest::getScheme()/setScheme()

    sminnee authored and Damian Mooyman committed Jun 23, 2017
    NEW: Add HTTPRequest::setIP()
    API: Rely on HTTPRequestBuilder to set scheme and IP
    
    These changes tidy up HTTPRequest making it a container for information
    and removing special logic from it.
    
    This makes it less feature-rich: it doesn’t contain trusted-proxy logic.
    This will be able to provided by a middleware.
    
    The new getScheme() method is designed to be closish to PSR-7’s
    getUri()->getScheme() equivalent.
    
    There are no more direct $_SERVER references in HTTPRequest.
  6. NEW: Register Injector::inst()->get(HTTPRequest)

    sminnee authored and Damian Mooyman committed Jun 23, 2017
    HTTPRequest is provided as a service so that global references for
    session, hostname, etc can be facilitated. It’s a bit of a hack and
    should be avoided but we’re unlikely to scrub it completely from the
    Silverstripe 4 code.
  7. API: Replace Director::direct() with Director::handleRequest().

    sminnee authored and Damian Mooyman committed Jun 23, 2017
    There was no longer any code in direct() and so I opted to expose the
    handleRequest() method instead.
  8. NEW: Moved allowed-hosts checking to a middleware.

    sminnee authored and Damian Mooyman committed Jun 23, 2017
  9. NEW: Move session activation to SessionMiddleware.

    sminnee authored and Damian Mooyman committed Jun 23, 2017
  10. NEW: Replace AuthenticationRequestFilter with AuthenticationMiddleware

    sminnee authored and Damian Mooyman committed Jun 23, 2017
  11. NEW: Replace FlushRequestFilter with FlushMiddleware

    sminnee authored and Damian Mooyman committed Jun 23, 2017
  12. FIX: Add tests for middleware

    sminnee authored and Damian Mooyman committed Jun 23, 2017
  13. DOC: Documentation and upgrade notes for director middleware

    sminnee authored and Damian Mooyman committed Jun 22, 2017
  14. API: Deprecate RequestFilter.

    sminnee authored and Damian Mooyman committed Jun 22, 2017
    NEW: Allow application of HTTPMiddleware to Director.
    
    Director can now use the same HTTPMiddleware objects as the app object.
    They can be applied either globally or pre-rule.
  15. NEW: Allow “%$” prefix in Injector::get()

    sminnee authored and Damian Mooyman committed Jun 22, 2017
    Injector::get() looks up services by name. In yaml config it can make
    things clearer to prefix service names by %$, which is how they must
    be prefixed when referencing nested services within service definitions.
    
    This change means that any other system referencing services will
    support an optional prefix without needing to specifically code support
    in themselves.
Commits on Jun 26, 2017
  1. FIX: Allow DB::setConfig() in _config.php

    sminnee committed Jun 25, 2017
    This wasn’t working because the database was being validated before
    _config.php was loaed.
    
    This is how the installer sets config so this is an important fix.
Commits on Jun 7, 2017
  1. NEW: Add AuthenticationHandler interface

    sminnee authored and Firesphere committed May 7, 2017
    NEW: Add IdentityStore for registering log-in / log-out data
    NEW: Add AuthenticationRequestFilter for managing login
    NEW: Add Security:setCurrentUser() / Security::getCurrentUser()
    NEW: Add FunctionalTest::logOut()