These questions came up some years ago. My responses are included. (Photo art above is from Andreas Farsatis).
Question: Is the way and goal of Patanjali’s Yoga and Sri Sankara’s Advaita Vedanta the same?
Answer: The ways might be a little different, and to the extent that goals can be talked about in this context, the goal is the same. Kaivalya (from Patanjali) implies Complete Aloneness. Self is One without a second. This is the same in Advaita Vedanta, although the terminology may be slightly different. Aloneness can also be interpreted as All-One-Ness. Sri Ramana himself has said in an answer to a question that the right practice of Yoga and Tantra also leads to Self-Realization.
Question: Is Samadhi (Nirvikalpa) the goal of Advaita Vedanta?
Answer: The concept of goals is not exactly a good fit in the philosophy of Advaita Vedanta. Advaita Vedanta holds that there is no goal to be achieved in terms of Enlightenment. You already are the goal. The Advaita Philosophy in a nutshell is contained in the Mahavakya (great saying), “You are That!”
According to Advaita Vedanta, this has to be recognized by the individual through proper reflection and meditation on one’s own nature. To the extent that goals can be spoken of in the field of relativity, Nirvikalpa Samadhi in a way, may be considered both the means and the goal. Sri Ramana has distinguished between Kevala Nirvikalpa Samadhi and Sahaj Nirvikalpa Samadhi. Kevala Nirvikalpa Samadhi is temporary in which the mind is consciously absorbed in the Self/Heart, but sprouts back at the end of the Samadhi.
Ramana Maharshi points out that although the Self is self evident, It is Recognized as the Supreme Clarity and as Sat-Chit-Ananda, in Nirvikalpa Samadhi, as the medium of the mind is absent. Here the Self Sees It Self By It Self and Through It Self. When the vasanas (latent karmic tendencies) are weakened and the Self spontaneously and effortlessly shines forth in all states of consciousness and all states of existence are known to exist in the Self only, that is Sahaj Samadhi. The mind has completely resolved itself in the Self. This is the Supreme Silence. The notion of goal or no goal, yoga or vedanta, bondage or liberation can have no meaning here.
Question: Did Sri Sankara refute the philosophy of yoga?
Answer: I am not a scholar on Sri Sankra’s Advaita philosophy but hold the view that Advaita Vedanta is not inconsistent with the practices of Yoga. Sri Sankara himself wrote several works related to Yoga and Shakti, although some question whether the author was Sankra himself. Those types of scholarly debates are endless and have no definitive conclusion.