Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Update the Direct Message text limit #40

Merged
merged 3 commits into from
Aug 15, 2017

Commits on Aug 15, 2017

  1. Completes testing for zendframework#34

    Adds tests for all new classes (`RateLimit`, `Media`, `Image`, `Video`),
    refactoring source code where issues or redundancies were found. Added a
    number of new exceptions, as new code was raising SPL exceptions instead
    of component exceptions.
    
    Updates the library to only support PHP 7.1+, which also requires an
    upgrade to PHPUnit 6.0. This meant converting `setExpectedException()`
    calls to `expectException()`/`expectExceptionMessage()`, and using the
    namespaced versions of PHPUnit classes. Classes were updated to use
    scalar type hints and return type hints.
    
    QA tooling was upgraded as follows:
    
    - Adds 7.1 and 7.2 to testing matrix, allowing failures on 7.2
    - Ensures appropriate deps are installed for PHP 5.6
    - Use composer scripts for unit tests, CS checks
    
    The file validation routine was updated. Instead of doing a
    `file_exists()` call, and then an `fopen()` to determine readability, we
    can just do `is_readable()`. That said, the operation needs to be
    wrapped in an error handler, as both it and `file_exists()` emit an
    `E_WARNING` on failure.
    
    Finally, refactors the `Media` class to use distinct properties
    instead of a `$data` array, and remove the
    `__get()`/`__isset()`/`__set()` implementations.
    weierophinney committed Aug 15, 2017
    Configuration menu
    Copy the full SHA
    358ab97 View commit details
    Browse the repository at this point in the history
  2. Do not remove xdebug support

    Causes issues with PHP 7.2, and unable to find a clean way to ensure
    the removal is only run with PHP 7.1. We can disable it later if
    necessary.
    weierophinney committed Aug 15, 2017
    Configuration menu
    Copy the full SHA
    2e29a15 View commit details
    Browse the repository at this point in the history
  3. Updates direct message creation to impose a limit

    Per https://dev.twitter.com/rest/reference/post/direct_messages/events/new,
    DM text can be no more than 10k characters in length.
    weierophinney committed Aug 15, 2017
    Configuration menu
    Copy the full SHA
    321f56b View commit details
    Browse the repository at this point in the history