cask :v1 => 'phpstorm-eap' do
  version '141.1717'
  sha256 'af6087323b15205d10ede18e4aea176c6dab569adc47d0eb00d4de07ad88693d'

  url "https://download.jetbrains.com/webide/PhpStorm-EAP-#{version}.dmg"
  name 'PhpStorm EAP'
  homepage 'https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program'
  license :commercial

  app 'PhpStorm EAP.app'

  zap :delete => [
                  '~/Library/Application Support/WebIde90',
                  '~/Library/Caches/WebIde90',
                  '~/Library/Logs/WebIde90',
                  '~/Library/Preferences/WebIde90',
                  '~/Library/Preferences/com.jetbrains.PhpStorm-EAP.plist',
                  '~/.WebIde90',
                 ]

  caveats <<-EOS.undent
    #{token} requires Java 6 like any other IntelliJ-based IDE.
    You can install it with
    brew cask install caskroom/homebrew-versions/java6
    The vendor (JetBrains) doesn't support newer versions of Java (yet)
    due to several critical issues, see details at
    https://intellij-support.jetbrains.com/entries/27854363
  EOS
end

cask :v1 => 'phpstorm-eap' do
  version '141.1717'
  sha256 'af6087323b15205d10ede18e4aea176c6dab569adc47d0eb00d4de07ad88693d'

  url "http://download.jetbrains.com/webide/PhpStorm-EAP-#{version}.dmg"
  homepage 'http://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program'
  license :commercial

  app 'PhpStorm EAP.app'

  postflight do
    plist_set(':JVMOptions:JVMVersion', '1.6+')
  end

  zap :delete => [
                  '~/Library/Application Support/WebIde80',
                  '~/Library/Preferences/WebIde80',
                  '~/Library/Preferences/com.jetbrains.PhpStorm-EAP.plist',
                 ]
end

--- 
+++ 
@@ -2,19 +2,28 @@
   version '141.1717'
   sha256 'af6087323b15205d10ede18e4aea176c6dab569adc47d0eb00d4de07ad88693d'
 
-  url "http://download.jetbrains.com/webide/PhpStorm-EAP-#{version}.dmg"
-  homepage 'http://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program'
+  url "https://download.jetbrains.com/webide/PhpStorm-EAP-#{version}.dmg"
+  name 'PhpStorm EAP'
+  homepage 'https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program'
   license :commercial
 
   app 'PhpStorm EAP.app'
 
-  postflight do
-    plist_set(':JVMOptions:JVMVersion', '1.6+')
-  end
+  zap :delete => [
+                  '~/Library/Application Support/WebIde90',
+                  '~/Library/Caches/WebIde90',
+                  '~/Library/Logs/WebIde90',
+                  '~/Library/Preferences/WebIde90',
+                  '~/Library/Preferences/com.jetbrains.PhpStorm-EAP.plist',
+                  '~/.WebIde90',
+                 ]
 
-  zap :delete => [
-                  '~/Library/Application Support/WebIde80',
-                  '~/Library/Preferences/WebIde80',
-                  '~/Library/Preferences/com.jetbrains.PhpStorm-EAP.plist',
-                 ]
+  caveats <<-EOS.undent
+    #{token} requires Java 6 like any other IntelliJ-based IDE.
+    You can install it with
+    brew cask install caskroom/homebrew-versions/java6
+    The vendor (JetBrains) doesn't support newer versions of Java (yet)
+    due to several critical issues, see details at
+    https://intellij-support.jetbrains.com/entries/27854363
+  EOS
 end
Upgrade PhpStorm EAP to 141.1717

Upgrade PhpStorm EAP to 141.1717 - feedback from @sebroeder & @vitorgalvao
