Code Monkey home page Code Monkey logo

zend-stdlib's Introduction

zend-stdlib

Repository abandoned 2019-12-31

This repository has moved to laminas/laminas-stdlib.

Build Status Coverage Status

Zend\Stdlib is a set of components that implements general purpose utility class for different scopes like:

  • array utilities functions;
  • general messaging systems;
  • string wrappers;
  • etc.

Benchmarks

We provide scripts for benchmarking zend-stdlib using the PHPBench framework; these can be found in the benchmark/ directory.

To execute the benchmarks you can run the following command:

$ vendor/bin/phpbench run --report=aggregate

zend-stdlib's People

Contributors

akrabat avatar bakura10 avatar binarykitten avatar blanchonvincent avatar dasprid avatar evandotpro avatar ezimuel avatar freeaqingme avatar froschdesign avatar iwalz avatar jonathanmaron avatar kokspflanze avatar maks3w avatar marc-mabe avatar michalbundyra avatar micheh avatar mikaelkael avatar mpinkston avatar mwillbanks avatar ocramius avatar ojhaujjwal avatar prolic avatar ralphschindler avatar samsonasik avatar sgehrig avatar thinkscape avatar veewee avatar waltertamboer avatar wdalmut avatar weierophinney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zend-stdlib's Issues

Check Documentation Code Blocks

Check code blocks are correct

TLDR; Check in all files that codeblocks are correct, in PSR-2 format and have PHP syntax highlighting applied.

Code blocks should be in the following format...

```php
 'ZEND-FRAMEWORK');

// No required options
$rendererOptions = array();
$renderer = Barcode::factory(
    'code39', 'image', $barcodeOptions, $rendererOptions
);

```

Note the three backticks then php in the opening fence, and the closing fence is just three backticks. It's common for the opening backticks to have no code type, or something like source.

Code should also have been automatically formatted into PSR-2 format, but sometimes these slip through the net.

Check All Headers In Documentation

Check headers are correct

TLDR; Headers should use the #, ## etc to format different levels of headers, and not be underlines using ===== or ``-----`, or be psuedo header using bold

Check all headers on the documentation - headers should use the hash style of declaration rather then be underlined with equals or dashes. The more hashes, the more of a subheading. Eg:

  • # is equal to <h1>
  • ## is equal to <h2>
  • ### is equal to <h3>
  • #### is equal to <h4>
  • ##### is equal to <h5>

Headings should be appropriate for their level in the documentation.

Psuedo headers using bold tags ** should be replaced with appropriate level of heading tag.

Zend-Stdlib@Develop Branch could not be installed

When i clone the Project, cd into the directory, switch branch to develop and run composer install it returns an error.
Same problem could be seen in Travis history for commit #33.
I think the problem is related to the change of the branch alias - but i'am not sure.

php version issue starting at 2.5.2

The required php version went from ">=5.3.23" in 2.5.1 to ">=5.5" in 2.5.2. Shouldn't that change have been done in 2.5.0 instead of in a patch version?

RequestInterface missing getPost

As of zend-mvc Zend\Mvc\Controller\AbstractController, you'll get the RequestInterface as a response of AbstractController::getRequest().

Thus will lead to issues on resolving getPost() in Autocompletions. IMHO, getPost method should be required to any RequestInterface implementing class.

Example

class DummyController extends \Zend\Mvc\Controller\AbstractController 
{
    public function dummyAction() 
    {
        $request = $this->getRequest();
        $postValues = $request->getPost();
    }    
}

The getPost method will work, since \Zend\Http\Request implements it. But Autocompletion wont resolve this, since the return value is RequestInterface.

Minimize duplicated code on ArrayUtils

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/7405
User: @malukenho
Created On: 2015-04-02T12:17:39Z
Updated At: 2015-04-15T07:44:16Z
Body


Comment

User: @Ocramius
Created On: 2015-04-02T14:46:53Z
Updated At: 2015-04-02T14:46:53Z
Body
Closing as inapplicable


Comment

User: @malukenho
Created On: 2015-04-02T14:48:30Z
Updated At: 2015-04-02T14:48:30Z
Body
@Ocramius if I use $value instanceof Traversable || is_array($value) instead?


Comment

User: @Maks3w
Created On: 2015-04-02T15:44:29Z
Updated At: 2015-04-02T15:44:29Z
Body
Some parts of the code are written by this way just for make the code more legible.

May this could be more close to both purposes:

if (
  $value instanceof Traversable
  || is_array($value)
) {
  // ...
}

Comment

User: @Ocramius
Created On: 2015-04-02T16:00:16Z
Updated At: 2015-04-02T16:00:16Z
Body
Yeah, what I wanted to suggest is to loop instead of doing a recursive call to static::iteratorToArray()


Comment

User: @malukenho
Created On: 2015-04-09T19:21:46Z
Updated At: 2015-04-09T19:21:46Z
Body
@Ocramius I tried using foreach, but I ended up repeating a lot more code.


Comment

User: @Ocramius
Created On: 2015-04-15T07:44:16Z
Updated At: 2015-04-15T07:44:16Z
Body

but I ended up repeating a lot more code.

Yes, this happens a lot in performance-oriented code


Provide support for PHP 7.2

We need to test against 7.2, and fix any errors observed.

Additionally, we can:

  • Remove support for HHVM
  • Add support for PHP 7.1

Zend\Stdlib\Hydrator interfaces no longer accepted by Zend\Form

I happened to do a "composer update" on one of my projects very soon after Zend\Form 2.6.0 was released, and because of my version constraint (~2.5) it was installed...and then my form broke with this error:

Argument 1 passed to Zend\Form\Fieldset::setHydrator() must implement interface Zend\Hydrator\HydratorInterface, instance of ******\UserQueryHydrator given

Since my custom hydrator implemented the Zend\Stdlib\Hydrator\HydratorInterface directly instead of inheriting from AbstractHydrator I could no longer use my custom hydrator in forms.

The fix was simple (replace references to "Stdlib\Hydrator" with "Hydrator") but it's still a break. IMO the better way to fix it would be to update the interfaces in Zend\Stdlib\Hydrator to extend the new ones from the Zend\Hydrator namespace. If that's an acceptable solution I can send a PR

Zend\Stdlib\PriorityList reports incorrect count when inserting duplicate items

See https://github.com/zendframework/zf2/blob/master/library/Zend/Stdlib/PriorityList.php#L66

Zend\Stdlib\PriorityList increments $this->count every single time insert($name, $value) is called, regardless of whether $name already exists.

This results in an incorrect count being calculated when inserting items with the same $name.

For example, to see this issue:

$list = new \Zend\Stdlib\PriorityList();
$list->insert('test', 'value');
$list->insert('test', 'value');
$list->insert('test', 'value');

print sprintf("List count: %d\n", count($list));
print sprintf("Array count: %d\n", count($list->toArray()));

$list->remove('test');

print sprintf("List count after removing 1 item: %d\n", count($list));
print sprintf("Array count after removing 1 item: %d\n", count($list->toArray()));

// -- outputs: --
// List count: 3
// Array count: 1
// List count after removing 1 item: 2
// Array count after removing 1 item: 0

Missing Commit

Hi,

Our composer install is failing (Using prefer-dist on our build server) and a commit / tgz seems to have disappeared?

  - Installing zendframework/zend-stdlib (2.3.0)
    Downloading: 100%         
    Failed to download zendframework/zend-stdlib from dist: '/Users/rawkode/Development/TeamRock/Blackbird/symfony2-application/application/vendor/zendframework/zend-stdlib/Zend/Stdlib/b6a780f333e513e358f7df0ebdf9c6cb' is not a zip archive.
    Now trying to download from source
  - Installing zendframework/zend-stdlib (2.3.0)
    Cloning d1c481b8a43f2f079b16d3567960ba539e9dacaa
    d1c481b8a43f2f079b16d3567960ba539e9dacaa is gone (history was rewritten?)

ArrayUtils::inArray should use strict in_array?

Related: zendframework/zend-form#18

In Zend\Form\View\Helper\FormSelect ArrayUtils::inArray is called with the strict parameter false. This causes an issue with string matching ('1.1' and '1.10' treated equivalent):

<?php
$needle = '1.10';
$haystack = ['1.1'];

assert(in_array($needle, $haystack) === false);
// PHP Warning:  assert(): Assertion failed in <file> on line 5

(3v4l: https://3v4l.org/HKM8Q)

Simply changing FormSelect to use strict=true breaks an existing test which uses integer keys in the value options array.

Since ArrayUtils::inArray uses string casting to work around in_array's wonky non-strict behaviour, shouldn't the call to in_array always have strict=true?

diff --git a/src/ArrayUtils.php b/src/ArrayUtils.php
index 17e3ae3..69b9721 100644
--- a/src/ArrayUtils.php
+++ b/src/ArrayUtils.php
@@ -199,7 +199,7 @@ abstract class ArrayUtils
                 }
             }
         }
-        return in_array($needle, $haystack, $strict);
+        return in_array($needle, $haystack, true);
     }

     /**

I've tested this change here (all tests pass) and against zend-form (where it fixes the reported issue).

What's the protocol for testing changes to packages which may have knock-on effects on other packages? Pull every repo that has a dependency on stdlib, apply the patch, and run the tests?

Stdlib\Parameters - References Stdlib\ArrayObject constant whilst extending PhpArrayObject

Just to make the class more concrete and reference the same constants (even though they contain the same variable for now).

In the constructor you are using ArrayObject::ARRAY_AS_PROPS, whilst the class itself is extending the PHP Native ArrayObject:

use ArrayObject as PhpArrayObject;

Whilst this seems fine at the moment, if there is a future PHP change this could lead to a breakage.

I would propose line 29:

parent::__construct($values, ArrayObject::ARRAY_AS_PROPS);

be changed to:

parent::__construct($values, PhpArrayObject::ARRAY_AS_PROPS);

This also has the added benefit of making the Parameters class and subsequently Zend\Http\PhpEnvironment\Request more compatible with earlier versions of PHP.

Error by use Expressive 2.0.1 with Skeleton Application

Hello,
directly after the installation of the Skeleton Expressive Application I get the following error:

[10-Mar-2017 09:24:30 UTC] PHP Fatal error: Class Zend\Stdlib\PriorityList contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Countable::๏ฟฝ) in D:\webworkspace\projects\zend-skeleton\vendor\zendframework\zend-stdlib\src\PriorityList.php on line 15

Why?

PHP 7 compatability issue

$ php bin/php7cc.php ../some-symfony-project

File: ../some-symfony-project/vendor/zendframework/zend-stdlib/src/Hydrator/ClassMethods.php
Line 220. Indirect variable, property or method access: $object->{$this->hydrationMethodsCache[$propertyFqn]}($this->hydrateValue($property, $value, $data));

File: ../some-symfony-project/vendor/zendframework/zend-stdlib/src/CallbackHandler.php
Line 122. Function argument(s) returned by "func_get_args" might have been modified: func_get_args();

Allow define order of options in AbstractOptions

In some cases the order of options passed as array in AbstractOptions::setFromArray() is important.

E.g. An option 'host' differs by option resource_id, than the following two snippets produce a different result and produces WTF moments.

$options = new MyOptions([
    'host' => 'example.com',
    'resource_id' => 'example',
]);
$options = new MyOptions([
    'resource_id' => 'example',
    'host' => 'example.com',
]);

For more information read here: zendframework/zendframework#6381

Check Documentation Tables

Check the tables in a document

TLDR; All tables should be in the format of GHFM using | and - as horizontal and vertical separators respectively

Check all tables are in the correct format. Please don't use leading and trailing | - more information on github flavoured markdown tables can be found here.

Optimization of the SplPriorityQueue

I'm sorry, I do not do PR. But I'll show you the code.

Event Manager uses the queue.

  1. For the experiment, I did a SplPriorityQueue with php. If you add an element to the queue, this leads to complex calculations. But not every Queue will be used by the event manager!!!!!!!
  • Therefore, I propose to add items only to the array, but SplPriorityQueue create only when the getIterator() method uses.
  1. Delete operations are very complex in terms of computing. Two or more operations - even worse :)
  • The solution is the same. I propose to add items only to the array, but SplPriorityQueue create only when the getIterator() method uses.
<?php

namespace Zend\Stdlib;

use Countable;
use IteratorAggregate;
use Serializable;

/**
 * Optimized for add and remove operations.
 */
class PriorityQueue implements Countable, IteratorAggregate, Serializable
{
    const EXTR_DATA     = 0x00000001;
    const EXTR_PRIORITY = 0x00000002;
    const EXTR_BOTH     = 0x00000003;

    /**
     * Inner queue class to use for iteration
     * @var string
     */
    protected $queueClass = 'Zend\Stdlib\SplPriorityQueue';

    /**
     * Actual items aggregated in the priority queue. Each item is an array
     * with keys "data" and "priority".
     * @var array
     */
    protected $items      = [];

    /**
     * Inner queue object
     * @var SplPriorityQueue
     */
    protected $queue;

    /**
     * Insert an item into the queue
     *
     * Priority defaults to 1 (low priority) if none provided.
     *
     * @param  mixed $data
     * @param  int $priority
     * @return PriorityQueue
     */
    public function insert($data, $priority = 1)
    {
        $priority = (int) $priority;
        $this->items[] = [
            'data'     => $data,
            'priority' => $priority,
        ];
        $this->queue = null;
        return $this;
    }

    /**
     * Remove an item from the queue
     *
     * This is different than {@link extract()}; its purpose is to dequeue an
     * item.
     *
     * This operation is potentially expensive, as it requires
     * re-initialization and re-population of the inner queue.
     *
     * Note: this removes the first item matching the provided item found. If
     * the same item has been added multiple times, it will not remove other
     * instances.
     *
     * @param  mixed $datum
     * @return bool False if the item was not found, true otherwise.
     */
    public function remove($datum)
    {
        $found = false;
        foreach ($this->items as $key => $item) {
            if ($item['data'] === $datum) {
                unset($this->items[$key]);
                $this->queue = null;
                $found = true;
                break;
            }
        }
        return $found;
    }

    /**
     * Is the queue empty?
     *
     * @return bool
     */
    public function isEmpty()
    {
        return (0 === $this->count());
    }

    /**
     * How many items are in the queue?
     *
     * @return int
     */
    public function count()
    {
        return count($this->items);
    }

    /**
     * Peek at the top node in the queue, based on priority.
     *
     * @return mixed
     */
    public function top()
    {
        return $this->getIterator()->top();
    }

    /**
     * Extract a node from the inner queue and sift up
     *
     * @return mixed
     */
    public function extract()
    {
        return $this->getQueue()->extract();
    }

    /**
     * Retrieve the inner iterator
     *
     * SplPriorityQueue acts as a heap, which typically implies that as items
     * are iterated, they are also removed. This does not work for situations
     * where the queue may be iterated multiple times. As such, this class
     * aggregates the values, and also injects an SplPriorityQueue. This method
     * retrieves the inner queue object, and clones it for purposes of
     * iteration.
     *
     * @return SplPriorityQueue
     */
    public function getIterator()
    {
        $queue = $this->getQueue();
        return clone $queue;
    }

    /**
     * Serialize the data structure
     *
     * @return string
     */
    public function serialize()
    {
        return serialize($this->items);
    }

    /**
     * Unserialize a string into a PriorityQueue object
     *
     * Serialization format is compatible with {@link Zend\Stdlib\SplPriorityQueue}
     *
     * @param  string $data
     * @return void
     */
    public function unserialize($data)
    {
        foreach (unserialize($data) as $item) {
            $this->insert($item['data'], $item['priority']);
        }
    }

    /**
     * Serialize to an array
     *
     * By default, returns only the item data, and in the order registered (not
     * sorted). You may provide one of the EXTR_* flags as an argument, allowing
     * the ability to return priorities or both data and priority.
     *
     * @param  int $flag
     * @return array
     */
    public function toArray($flag = self::EXTR_DATA)
    {
        switch ($flag) {
            case self::EXTR_BOTH:
                return $this->items;
            case self::EXTR_PRIORITY:
                return array_map(function ($item) {
                    return $item['priority'];
                }, $this->items);
            case self::EXTR_DATA:
            default:
                return array_map(function ($item) {
                    return $item['data'];
                }, $this->items);
        }
    }

    /**
     * Specify the internal queue class
     *
     * Please see {@link getIterator()} for details on the necessity of an
     * internal queue class. The class provided should extend SplPriorityQueue.
     *
     * @param  string $class
     * @return PriorityQueue
     */
    public function setInternalQueueClass($class)
    {
        $this->queueClass = (string) $class;
        return $this;
    }

    /**
     * Does the queue contain the given datum?
     *
     * @param  mixed $datum
     * @return bool
     */
    public function contains($datum)
    {
        foreach ($this->items as $item) {
            if ($item['data'] === $datum) {
                return true;
            }
        }
        return false;
    }

    /**
     * Does the queue have an item with the given priority?
     *
     * @param  int $priority
     * @return bool
     */
    public function hasPriority($priority)
    {
        foreach ($this->items as $item) {
            if ($item['priority'] === $priority) {
                return true;
            }
        }
        return false;
    }

    /**
     * Get the inner priority queue instance
     *
     * @throws Exception\DomainException
     * @return SplPriorityQueue
     */
    protected function getQueue()
    {
        if (null === $this->queue) {
            $this->queue = new $this->queueClass();
            if (!$this->queue instanceof \SplPriorityQueue) {
                throw new Exception\DomainException(sprintf(
                    'PriorityQueue expects an internal queue of type SplPriorityQueue; received "%s"',
                    get_class($this->queue)
                ));
            }
            foreach ($this->items as $item) {
                $this->queue->insert($item['data'], $item['priority']);
            }
        }
        return $this->queue;
    }

    /**
     * Add support for deep cloning
     *
     * @return void
     */
    public function __clone()
    {
        if (null !== $this->queue) {
            $this->queue = clone $this->queue;
        }
    }
}

Check Documentation For Other Things

Check docs for other problems

TLDR; Cast your eye over the documetation for any problems not covered in the other issues

Things slip through the net, so check the documentation for other problems that have been missed. Common other problems include

  • Bullet lists (should be single * then space at the start of line)
  • Inline code - should be marked by three backticks at start and finish
  • bookdown.json file is correctly formated and has the right escaping
  • Links between documentation using RST have been stripped
  • Any other RST has been removed correctly
  • Anything and everything not covered

If you end up fixing the same problem over and over, please ping Gary Hockin - we may be able to add bespoke issue for that problem, or fix in automated capacity

Missing multibyte extension in composer.json

As you are using the multibyte extension in the string wrapper, this should also be mentioned in the composer.json file, like described in this blog post. I am running a project on heroku using this library, and I have to add this extension now to my project, although it would belong here.

Is there any reason not to add this? Otherwise I would provide a PR.

[Suggestion] Code split for Array Utility

Looking at some dependency graph for zend components, one way of requiring zend-stdlib is to use the array functions.

Some of these libraries are:

  1. Zend\Config
  2. Zend\Router
  3. Zend\View
  4. Zend\ConfigAggregator - (copy-pasted code because it ONLY needs the array utility)

Separating this may have a relevant value to packages that utilizes array functions such as the framework itself since the default configuration is in array.

Ported repository: https://github.com/php-refactoring/zend-array-utility

Pros:

  • Be able to upgrade the array utility classes, such as array sort, merge, find, etc.
  • Will be able to stress test and benchmark all scenarios.
  • We can have separate documentation on how to use this library.
  • Zend Components and other packages that requires zend-stblib but not using the Array* classes will not be (that much) affected.

Cons:

  • Zend components and other packages that requires zend-stblib and uses the Array* classes will be affected. Thus, it will require zendframework/zend-array-utility as dependecy for zend-stdlib to be BC compatible.

To do:

  • Include the array utility package as zendframework/zend-array-utility as dependecy for zend-stdlib
  • Integration testing for components requiring zend-stdlib and uses the Array* classes
  • Dedicated documentation for array utilities

Problem with serializing/unserializing of ArrayObject on PHP 7.4

I found the problem that related to PHP 7.4 session unserializing. I made some tests and found that if some class (Zend\Stdlib\ArrayObject in this case) implements Serializable interface and has some property (object of stdClass for example) it failed to decode if stored in session.

Code to reproduce the issue

include "../vendor/autoload.php";

// Shared object that acts as property of two another objects stored in session
$testPropertyObj = new stdClass();
$testPropertyObj->name = 'test';

// Two instances of \SerializableClass that shares property
$sessionObject = [
    'obj1' => new \Zend\Stdlib\ArrayObject(['custom' => $testPropertyObj]),
    'obj2' => new \Zend\Stdlib\ArrayObject(['custom' => $testPropertyObj])
];

session_start();

$_SESSION = $sessionObject;

Expected results

On the second run the stored in session array of objects should should be available in $_SESSION array.

Actual results

On the second run the script rise errors then tries to restore second object of session.

Notice: unserialize(): Error at offset 41 of 222 bytes in C:\SERVER\projects\zf3\mt4\vendor\zendframework\zend-stdlib\src\ArrayObject.php on line 409

Notice: Trying to access array offset on value of type bool in C:\SERVER\projects\zf3\mt4\vendor\zendframework\zend-stdlib\src\ArrayObject.php on line 412

Notice: Trying to access array offset on value of type bool in C:\SERVER\projects\zf3\mt4\vendor\zendframework\zend-stdlib\src\ArrayObject.php on line 413

Warning: session_start(): Failed to decode session object. Session has been destroyed in C:\SERVER\projects\zf3\mt4\public_html\test.php on line 16

Fatal error: Uncaught Zend\Stdlib\Exception\InvalidArgumentException: Passed variable is not an array or object, using empty array instead in C:\SERVER\projects\zf3\mt4\vendor\zendframework\zend-stdlib\src\ArrayObject.php:184 Stack trace: #0 C:\SERVER\projects\zf3\mt4\vendor\zendframework\zend-stdlib\src\ArrayObject.php(413): Zend\Stdlib\ArrayObject->exchangeArray(NULL) #1 [internal function]: Zend\Stdlib\ArrayObject->unserialize('a:4:{s:7:"stora...') #2 C:\SERVER\projects\zf3\mt4\public_html\test.php(16): session_start() #3 {main} thrown in C:\SERVER\projects\zf3\mt4\vendor\zendframework\zend-stdlib\src\ArrayObject.php on line 184

This makes impossible to use Zend_Authentication (and other components that uses ArrayObject to store some data in session) with PHP 7.4 because in stores identity as Zend ArrayObject.

When i remove implementing of Serializable interface from ArrayObject class declaration it starts to work normally in PHP 7.4

Check For Blockquotes In Docs

Check the document for bad blockquoutes

TLDR; Check blockquotes are formatted correctly using > and check headings in blockquotes are using ###

Blockquotes are donated by a single greater than character and then a space. Make sure all the blockquotes in every doc file are correctly formatted. Headings in blockquotes should use ### and not bold.

Any paragraph spacing in blockquotes should be marked using a single greater than, then a space.

grapheme_substr inconsistency as compared to substr

grapheme_substr from Intl have differing behavior as compared to substr:

var_dump(substr('a', 1, null)); //  string(0) ""`
var_dump(grapheme_substr('a', 1, null)); // bool(false)

It looks like on php 5.x it also produces warning.

This behavior needs to be investigated against other wrappers and corrected if needed.

Repository not found

Hello,

During the composer install task of my CI, an error occurs when composer tries to install zendframework/zend-stdlib : the repository is not found git://github.com/zendframework/Component_ZendStdlib.git .

Here is the console output :

[exec]   - Installing zendframework/zend-stdlib (2.3.4)
[exec]     Downloading: connection...    Failed to download zendframework/zend-stdlib from dist: The "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/280e4ee6a8fea96b3de00a39174758b4002a7358" file could not be downloaded (HTTP/1.1 404 Not Found)
[exec]     Now trying to download from source
[exec]   - Installing zendframework/zend-stdlib (2.3.4)
[exec]     Cloning 280e4ee6a8fea96b3de00a39174758b4002a7358
[exec] 
[exec] 
[exec]                                                                                                                   
[exec]   [RuntimeException]                                                                                              
[exec]   Failed to clone [email protected]:zendframework/Component_ZendStdlib.git via git, https, ssh protocols, aborting.  
[exec]   - git://github.com/zendframework/Component_ZendStdlib.git                                                       
[exec]     fatal: remote error:                                                                                          
[exec]       Repository not found.                                                                                       
[exec]   - https://github.com/zendframework/Component_ZendStdlib.git                                                     
[exec]     fatal: Authentication failed                                                                                  
[exec]   - [email protected]:zendframework/Component_ZendStdlib.git                                                         
[exec]     Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.       
[exec]     ERROR: Repository not found.                                                                                  
[exec]     fatal: The remote end hung up unexpectedly

Do you know how to solve this ?
Any comments are appreciated,

thanks ๐Ÿ˜„

Invalid zip file, history was rewritten?

When running composer install we get

 - Installing zendframework/zend-stdlib (2.3.0)
    Downloading: 100%         
    Invalid zip file, retrying...
  - Installing zendframework/zend-stdlib (2.3.0)
    Downloading: 100%         
    Invalid zip file, retrying...
  - Installing zendframework/zend-stdlib (2.3.0)
    Downloading: 100%         
    Failed to download zendframework/zend-stdlib from dist: '/home/vagrant/Web/vendor/zendframework/zend-stdlib/Zend/Stdlib/e5d7b5d9eb93124bf2160eeac532bea2' is not a zip archive.
    Now trying to download from source
  - Installing zendframework/zend-stdlib (2.3.0)
    Cloning d1c481b8a43f2f079b16d3567960ba539e9dacaa
    d1c481b8a43f2f079b16d3567960ba539e9dacaa is gone (history was rewritten?)



  [RuntimeException]                                                           
  Failed to execute git checkout 'd1c481b8a43f2f079b16d3567960ba539e9dacaa' -  
  - && git reset --hard 'd1c481b8a43f2f079b16d3567960ba539e9dacaa' --          
  fatal: reference is not a tree: d1c481b8a43f2f079b16d3567960ba539e9dacaa     

composer update "fixes" the issue but that is not a solution. If nothing has changed we should not need to run update. Before we had a problem with 404 errors that composer update was a solution but it isn't, it just a quick fix.

Why there are these problems with this library and is there something else other than running composer update all the time to fix it?

move NamingStrategy to inside Stategy

I think NamingStrategy classes can be moved to inside Strategy to collect the strategies. To avoid bc break, we can made old NamingStrategy classes extends Strategy\NamingStrategy\StrategyName.

Any thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.