Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add `What's new` file #241

Merged
merged 1 commit into from Oct 27, 2013

Conversation

Projects
None yet
5 participants
Member

cristianoc72 commented Oct 24, 2013

Add What's new file, describing major changes and how to upgrade from Propel 1 to Propel 2. It's based on UPDATE file.

@staabm staabm and 1 other commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
-Propel 1.6 is a new backwards compatible iteration of the Propel 1.x branch. As usual, don't forget to rebuild your model once you upgrade to this new version.
+Propel 2 represents an evolution of our favorite orm: it follows PSR-0, PSR-1, PRS-2, PSR-3 Php standards, it has a more rational architecture an some enhancements which improve its features and make your coding easier and more enjoyable. But it presents some backward compatibility breaks.
@staabm

staabm Oct 25, 2013

Member

"an some enhancement" -> "and some enhancement"

@staabm staabm and 1 other commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
-```
-
-In addition to hydrating translations, `joinWithI18n()` sets the correct locale on results, so you don't need to call `setLocale()` for each result.
-
-**Tip**: `joinWithI18n()` adds a left join with two conditions. That means that the query returns all items, including those with no translation. If you need to return only objects having translations, add `Criteria::INNER_JOIN` as second parameter to `joinWithI18n()`.
-
-Last but not least, Propel's `i18n` behavior is a drop-in replacement for symfony's `i18n` behavior. That means that with a couple more parameters, the locale can be accessed using `setCulture()`, and the `i18n_columns` parameter can be omitted if you explicit the `i18n` table.
-
-Just like the `versionable` behavior, the `i18n` behavior is thoroughly unit-tested and [fully documented]((../behaviors/i18n.html)).
-
-## XML/YAML/JSON/CSV Parsing and Dumping ##
-
-ActiveRecord and Collection objects now have the ability to be converted to and from a string, using any of the XML, YAML, JSON, and CSV formats.
-
-The syntax is very intuitive: ActiveRecord and collection objects now offer a `toXML()` and a `fromXML()` method (same for YAML, JSON, and CSV). Here are a few examples:
+use My\Model\Namespace\ModelClass;
@staabm

staabm Oct 25, 2013

Member

I think there should be a note, that people upgrading from 1.x need to add some use statements to their code

@cristianoc72

cristianoc72 Oct 26, 2013

Member

Uhm....I'm not so sure: use statements are about namespace and Propel 1.x users, already working with namespace, still know use statement. For those users never working with namespace before, at line 88 we suggest them to read official documentation about it, so we can reasonably suppose that they know use statement when they arrive at this point.

@staabm staabm and 1 other commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
-Taking advantage of the dumping abilities just introduced, all ActiveRecord objects now have a string representation based on a YAML dump of their properties:
+In earlier versions, Propel provided database queries via some generated Peer classes.
+Starting from version 1.5, a new object oriented query api, called [Active Query](http://propelorm.org/reference/model-criteria.html), was introduced. This feature was immediately a first class citizen in Propel world, near the good old Peer classes.
+Now, Propel 2 leaves Peers, which are no longer available, and Active Query generated classes are the only Propel query api (of course, it's still possible to directly execute SQL code).
@staabm

staabm Oct 25, 2013

Member

api -> API ?

@staabm staabm and 1 other commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
-`PropelCollection` objects also take advantage from this possibility:
+Please, refer to [Propel api](http://api.propelorm.org/2.0-master/) and read the generated Query and TableMap classes, for other details.

@staabm staabm and 2 others commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
-Combining two generated filters with a logical `OR` used to be impossible in previous Propel versions - the alternative was to use `orWhere()` or `combine()`, but that meant losing all the smart defaults of generated filters.
+* `ConnectionInterface`: Propel connection object, based on PDO Connection interface
@staabm

staabm Oct 25, 2013

Member

based on PDO Connection interface -> based on PHPs builtin PDO class

@jaugustin

jaugustin Oct 25, 2013

Member

Fully qualified class name would be better here ?

@cristianoc72

cristianoc72 Oct 26, 2013

Member

Both fixed

@staabm staabm and 1 other commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
-Creating a Join with more than one condition is now very easy. Just call `ModelCriteria::addJoinCondition($joinName, $condition)` after a `ModelCriteria::join()` to add further conditions to a join:
+`Propel::setConnection()` is removed.

@staabm staabm and 1 other commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
-Propel 1.6 introduces a new set of column types. The database-agnostic implementation allows these column types to work on all supported RDBMS.
+ public function setAppData(AppData $parent)
@cristianoc72

cristianoc72 Oct 26, 2013

Member

Fixed. Here and in the whole document.

@staabm staabm and 1 other commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
-To achieve this query using Propel, call the new `addSelectQuery()` method to use a first query as the source for the SELECT part of a second query:
+Propel\Runtime\ActiveQuery\Criteria::addOr operates only on existing conditions, where prior it would `OR` to a condition to on the same column (if it existed).
@staabm

staabm Oct 25, 2013

Member

Propel\Runtime\ActiveQuery\Criteria::addOr

@staabm staabm and 1 other commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
- propel.builder.pluralizer.class = builder.util.StandardEnglishPluralizer
+#### Propel\Runtime\Util\PropelModelPager::count() ####
+
+Propel\Runtime\Util\PropelModelPager::count() now return the number of items in the collection.
@staabm

staabm Oct 25, 2013

Member

Propel\Runtime\Util\PropelModelPager::count()

@staabm staabm commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
+* Propel\Generator\Model\ScopedElement ---> Propel\Generator\Model\ScopedMappingModel
Member

staabm commented Oct 25, 2013

great job @cristianoc72 !!

Owner

willdurand commented Oct 25, 2013

Thanks @cristianoc72!

Note that there is an issue with your page though (cf. travis-ci):

Conversion error: There was an error converting 'documentation/whats-new.markdown'

@robin850 robin850 commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
-
-### Versionable behavior ###
-
-Once enabled on a table, the `versionable` behavior will store a copy of the ActiveRecord object in a separate table each time it is saved. This allows to keep track of the changes made on an object, whether to review modifications, or revert to a previous state.
-
-The classic Wiki example is a good illustration of the utility of the `versionable` behavior:
-
-```xml
-<table name="wiki_page">
- <column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
- <column name="title" type="VARCHAR" required="true" />
- <column name="body" type="LONGVARCHAR" />
- <behavior name="versionable" />
-</table>
+```shell
+bin/propel
@robin850

robin850 Oct 25, 2013

Member

vendor/bin/propel here, no ?

@robin850 robin850 commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
-## Join With Several Conditions ##
+>**Tip**: Internally, `Propel::getAdapter()` proxies to `Propel::getServiceContainer()->getAdapter()`. The `Propel` class was refactored to keep only one static class and to be more extensible. It remains the easy entry point to all the necessary services provided by Propel.
@robin850

robin850 Oct 25, 2013

Member

Here I think that we will need to add a <br>. Otherwise, there will be a display issue on the site.

@robin850 robin850 commented on an outdated diff Oct 25, 2013

documentation/whats-new.markdown
-There wasn't any one-stop place to read about the abilities of the generated Active Record objects in the Propel documentation. Since Propel 1.6, the new [Active Record reference](active-record.html) makes it easier to learn the usage of Propel models using code examples.
+* Propel\Generator\Model\Table::containsColumn
+* Propel\Generator\Model\VendorInfo::addParameter
+* Propel\Generator\Model\Column::setTypeFromString
+* Propel\Generator\Model\Column::getPropelType
+* Propel\Generator\Model\Column::getDefaultSetting
+* Propel\Generator\Model\Column::makeList
+* Propel\Generator\Model\ForeignKey::getLocalColumnNames
+* Propel\Generator\Model\ForeignKey::getForeignColumnNames
+* Propel\Generator\Model\Table::printPrimaryKey
+* Propel\Generator\Model\Table::printList
+* Propel\Generator\Model\PropelTypes::getCreoleTypes
+* Propel\Runtime\Om\BaseObject
@robin850

robin850 Oct 25, 2013

Member

We could also use backticks here to wrap code spans, what do you think ?

Member

robin850 commented Oct 25, 2013

Really awesome @cristianoc72! Thank you! ❤️

@willdurand willdurand added a commit that referenced this pull request Oct 27, 2013

@willdurand willdurand Merge pull request #241 from cristianoc72/propel2
Add `What's new` file
d520770

@willdurand willdurand merged commit d520770 into propelorm:propel2 Oct 27, 2013

1 check passed

default The Travis CI build passed
Details
Owner

willdurand commented Oct 27, 2013

<3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment