Skip to content

Commit

Permalink
Added upgrading notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Majkl578 committed Jul 15, 2017
1 parent 527ac5b commit b9ba940
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions UPGRADING-2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Upgrading from 1.x to 2.0
=========================


## BC breaking changes

Native parameter and return types were added.
As a consequence, some signatures were changed and will have to be adjusted in sub-classes. You can find a list of major changes to public API below.

#### Doctrine\Common\Collections\Collection

| before | after |
|-------------------------------:|:-----------------------------------------------|
| add($element) | add($element): bool |
| clear() | clear(): void |
| contains($element) | contains($element): bool |
| isEmpty() | isEmpty(): bool |
| removeElement($element) | removeElement($element): bool |
| containsKey($key) | containsKey($key): bool |
| getKeys() | getKeys(): array |
| getValues() | getValues(): array |
| set($key, $value) | set($key, $value): void |
| toArray() | toArray(): array |
| exists(Closure $p) | exists(Closure $p): bool |
| filter(Closure $p) | filter(Closure $p): self |
| forAll(Closure $p) | forAll(Closure $p): bool |
| map(Closure $func) | map(Closure $func): self |
| partition(Closure $p) | partition(Closure $p): array |
| slice($offset, $length = null) | slice(int $offset, ?int $length = null): array |
| count() | count(): int |
| getIterator() | getIterator(): \Traversable |
| offsetSet($offset, $value) | offsetSet($offset, $value): void |
| offsetUnset($offset) | offsetUnset($offset): void |
| offsetExists($offset) | offsetExists($offset): bool |

#### Doctrine\Common\Collections\AbstractLazyCollection

| before | after |
|----------------:|:----------------------|
| isInitialized() | isInitialized(): bool |
| initialize() | initialize(): void |
| doInitialize() | doInitialize(): void |

#### Doctrine\Common\Collections\ArrayCollection

| before | after |
|----------------------------:|:----------------------------------|
| createFrom(array $elements) | createFrom(array $elements): self |
| __toString() | __toString(): string |

0 comments on commit b9ba940

Please sign in to comment.