It's great news that Drupal 8 Beta 1 was released. It implies that the API's have reached a reasonably stable (but not immutable) state.
In moving from the final alpha 15 to beta 1, I stumbled across the following.
(1) The url() function has been removed. In its place, you can use \Drupal::url() which takes a route name, not a path. For example, instead of
use this call, where optimizely.settings is a route that is defined in the module's .routing.yml file.
Where the route takes parameters, pass a second argument to url() that is a keyed array which provides the names and values of those parameters. For example, for the following route,
# The rest of the route definition ...
you can make a call such as,
\Drupal::url('optimizely.delete.oid', array('oid' => $oid))
Caveat: you cannot use this function in hook_install(). Doing so will cause the install to bail out and leave things in a weird state that will likely leave you befuddled and frustrated. I got the generic, unhelpful message: The website has encountered an error. Please try again later.
So in hook_install() I removed the links in a message that is displayed upon completion of the installation. Some plain explanatory text is provided instead.
(2) The l() function takes a Url object as its second argument instead of a path. It is now in the Drupal class. Instead of
use something like this,
\Drupal::l(t('Cancel'), new Url('optimizely.settings'))
However, same caveat as above. You can't use this function in hook_install() or it will bomb out and leave the install in a partially completed state. Not good.
Drupal 8.0.0 beta 1 released
Remove most remaining url() calls